var Ce=(o,d,a)=>new Promise((r,i)=>{var e=n=>{try{s(a.next(n))}catch(l){i(l)}},t=n=>{try{s(a.throw(n))}catch(l){i(l)}},s=n=>n.done?r(n.value):Promise.resolve(n.value).then(e,t);s((a=a.apply(o,d)).next())});(function(o,d){window.tsnfors=getPar("targetServerNameForOverride")||getPar("host")?"?targetServerNameForOverride="+(getPar("targetServerNameForOverride")||getPar("host")):"",d.user={getQueryRetailId:function(a){for(var r=window.location.search.substring(1),i=r.split("&"),e=0;e-1},changeSearch:function(a){var r=this;return!!(a&&r.isIOS()&&r.getQueryRetailId(location.href)!=a&&location.href.indexOf("/pages/wap/bundle.html")<0&&r.isWeiXin()&&location.href.indexOf("/shop/item.html")<0&&location.href.indexOf("/gallery/item.html")<0)},saveRetailId:function(){var a=this,r=location.origin,i=location.pathname;if(a.getQueryRetailId(!0))window.localStorage.encryptId=a.getQueryRetailId(!0),window.sessionStorage.encryptId=a.getQueryRetailId(!0);else if(location.href.indexOf("myroom")<0&&location.href.indexOf("aroom")<0&&location.href.indexOf("/views/")<0&&location.href.indexOf("/pay/")<0){var e=a.clearRetailId(location.search),t=window.localStorage.encryptId||window.sessionStorage.encryptId,s=r+i+(t?e?e+"&diliater="+t:"?diliater="+t:e);a.changeSearch(t)?location.search=e?e+"&diliater="+t:"?diliater="+t:history.replaceState({},"",s)}},clearRetailId:function(a){for(var r=a.split("&"),i="",e=0,t=r.length;e-1?e+1!==t&&(i+="?"):s.indexOf("diliater=")==0||(i+=i&&i!="?"?"&"+s:s)}return i},isIOS9:function(){var a=function(){var e=/OS ((\d+_?){2,3})\s/;if(navigator.userAgent.match(/iPad/i)||navigator.platform.match(/iPad/i)||navigator.userAgent.match(/iP(hone|od)/i)||navigator.platform.match(/iP(hone|od)/i)){var t=e.exec(navigator.userAgent);if(t.length>0)return t[0].replace("OS","").replace("os","").replace(/\s+/g,"").replace(/_/g,".")}return""},r=a(),i=r.split(".");return!!(i&&i.length>0&&parseInt(i[0])==9)},isIOS13:function(){var a=function(){var e=/OS ((\d+_?){2,3})\s/;if(navigator.userAgent.match(/iPad/i)||navigator.platform.match(/iPad/i)||navigator.userAgent.match(/iP(hone|od)/i)||navigator.platform.match(/iP(hone|od)/i)){var t=e.exec(navigator.userAgent);if(t.length>0)return t[0].replace("OS","").replace("os","").replace(/\s+/g,"").replace(/_/g,".")}return""},r=a(),i=r.split(".");return!!(i&&i.length>0&&parseInt(i[0])==13)},isIOS:function(){var a=navigator.userAgent,r=!!a.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return r},createRetailId:function(a){for(var r=this,i=location.origin,e=location.pathname,t=a.userId,s=r.getQueryRetailId()||decrypt&&(window.localStorage.encryptId||window.sessionStorage.encryptId)&&decrypt(window.localStorage.encryptId||window.sessionStorage.encryptId).split(",")||[],n=t?[t]:[],l=0,c=s.length;l-1){for(var t={},s=e.split("&"),n=0;n-1&&(location.href=t)),a&&a(n)},error:function(n){d.ajaxSend=!1,r&&r(res)}})},login:function(a,r,i,e){var t={},s=navigator.userAgent.toLowerCase(),n;(n=s.match(/msie/))?t.msie=n[0]:(n=s.match(/trident/))?t.trident=n[0]:(n=s.match(/edge/))?t.chrome=n[0]:(n=s.match(/firefox/))?t.firefox=n[0]:(n=s.match(/360/))||(n=s.match(/metasr/))||(n=s.match(/ubrowser/))||(n=s.match(/qqbrowser/))||(n=s.match(/chrome/))?t.chrome=n[0]:(n=s.match(/safari/))&&(t.safari=n[0]);try{myextension&&(n[0]="xxBrowser")}catch(l){}if(n||(n=["otherBrowser"]),n[0]=="trident"||n[0]=="msie"?n[0]="Internet Explorer":n[0]=="edge"?n[0]="Microsoft Edge":n[0]=="metasr"?n[0]="metasr":n[0]=="chrome"?n[0]="Chrome":n[0]=="firefox"?n[0]="Firefox":n[0]=="safari"?n[0]="Safari":n[0]=="ubrowser"&&(n[0]="Uc"),d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",headers:{resolution:window.screen.width+"*"+window.screen.height,browsername:n[0]},url:"/api/disk/login"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify({encrypted:!0,isGraphicCode:0,name:a,password:encrypt(r)}),success:function(l){d.ajaxSend=!1,i&&i(l),l.success||localStorage.removeItem("isSaveAPWordKey")},error:function(l){d.ajaxSend=!1,e&&e(l)}})},newLogin:function(a,r,i){var e={},t=navigator.userAgent.toLowerCase(),s;(s=t.match(/msie/))?e.msie=s[0]:(s=t.match(/trident/))?e.trident=s[0]:(s=t.match(/edge/))?e.chrome=s[0]:(s=t.match(/firefox/))?e.firefox=s[0]:(s=t.match(/360/))||(s=t.match(/metasr/))||(s=t.match(/ubrowser/))||(s=t.match(/qqbrowser/))||(s=t.match(/chrome/))?e.chrome=s[0]:(s=t.match(/safari/))&&(e.safari=s[0]);try{myextension&&(s[0]="xxBrowser")}catch(n){}if(s||(s=["otherBrowser"]),s[0]=="trident"||s[0]=="msie"?s[0]="Internet Explorer":s[0]=="edge"?s[0]="Microsoft Edge":s[0]=="metasr"?s[0]="metasr":s[0]=="chrome"?s[0]="Chrome":s[0]=="firefox"?s[0]="Firefox":s[0]=="safari"?s[0]="Safari":s[0]=="ubrowser"&&(s[0]="Uc"),d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",headers:{resolution:window.screen.width+"*"+window.screen.height,browsername:s[0]},url:"/api/disk/login"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(a),success:function(n){d.ajaxSend=!1,r&&r(n),n.success||localStorage.removeItem("isSaveAPWordKey")},error:function(n){d.ajaxSend=!1,i&&i(n)}})},loginout:function(a,r){var i=this;if(d.ajaxSend)return!1;d.ajaxSend=!0;var e=getCookie("token"),t=getCookie("stoken"),s=getCookie("atoken");e==t&&(setCookie("atoken",""),setCookie("stoken",s)),o.ajax({type:"get",headers:{token:e,stoken:getCookie("stoken")},url:"/api/disk/logout"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",success:function(n){d.ajaxSend=!1,i.clearUrlRetailId(),localStorage.removeItem("isSaveAPWordKey"),a&&a(n)},error:function(n){d.ajaxSend=!1,r&&r(n)}})},checkLoginName:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"get",url:"/api/user/checkLoginName"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:{loginName:a},success:function(e){d.ajaxSend=!1,r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},sendRegisterVerify:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",url:"/api/school/sendRegisterVerify"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify({mobilePhone:a}),success:function(e){if(d.ajaxSend=!1,(!e.success&&parseInt(e.code)==601||!e.success&&parseInt(e.code)==400)&&layer.open({content:"\u53D1\u9001\u9A8C\u8BC1\u7801\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",skin:"msg",time:2}),!e.success)switch(e.message?e.message.split("Permits:")[1]:""){case"2":e.message="1\u5206\u949F\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"5":e.message="1\u5C0F\u65F6\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"20":e.message="\u5F53\u5929\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u660E\u5929\u518D\u8BD5";break}r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},sendRegisterOrLogin:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",url:"/api/school/sendRegisterOrLogin"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify({mobilePhone:a}),success:function(e){if(d.ajaxSend=!1,(!e.success&&parseInt(e.code)==601||!e.success&&parseInt(e.code)==400)&&layer.open({content:"\u53D1\u9001\u9A8C\u8BC1\u7801\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",skin:"msg",time:2}),!e.success)switch(e.message?e.message.split("Permits:")[1]:""){case"2":e.message="1\u5206\u949F\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"5":e.message="1\u5C0F\u65F6\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"20":e.message="\u5F53\u5929\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u660E\u5929\u518D\u8BD5";break}r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},mobileLogin:function(a,r,i){var e=this;if(d.ajaxSend)return!1;d.ajaxSend=!0,a.sourceChannel=getPagesFrom();var t=e.getchannel();a.ip=t.ip,a.channel=t.channel,a.sourceJson=t.sourceJson,a.clueSourceType=t.sourceType,a.sourceId=t.sourceId,a.gmtStart=t.gmtStart,a.shareUserId=t.shareUserId,a.pvid=t.pvid,a.uvcid=t.uvcid,o.ajax({type:"get",url:"/api/user/mobileLogin"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:a,success:function(s){d.ajaxSend=!1,r&&r(s)},error:function(s){d.ajaxSend=!1,i&&i(s)}})},sendRegisterBySchool:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",url:"/api/school/sendRegisterBySchool"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify({mobilePhone:a}),success:function(e){if(d.ajaxSend=!1,(!e.success&&parseInt(e.code)==601||!e.success&&parseInt(e.code)==400)&&layer.open({content:"\u53D1\u9001\u9A8C\u8BC1\u7801\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",skin:"msg",time:2}),!e.success)switch(e.message?e.message.split("Permits:")[1]:""){case"2":e.message="1\u5206\u949F\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"5":e.message="1\u5C0F\u65F6\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"20":e.message="\u5F53\u5929\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u660E\u5929\u518D\u8BD5";break}r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},sendVerificationCode:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0;var e={mobilePhone:a.detail||""};o.ajax({type:"post",url:"/api/school/sendforgetPassword"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(e),success:function(t){if(d.ajaxSend=!1,(!t.success&&parseInt(t.code)==601||!t.success&&parseInt(t.code)==400)&&layer.open({content:"\u53D1\u9001\u9A8C\u8BC1\u7801\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",skin:"msg",time:2}),!t.success)switch(t.message?t.message.split("Permits:")[1]:""){case"2":t.message="1\u5206\u949F\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"5":t.message="1\u5C0F\u65F6\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"20":t.message="\u5F53\u5929\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u660E\u5929\u518D\u8BD5";break}r&&r(t)},error:function(t){d.ajaxSend=!1,i&&i(t)}})},checkVerificationCode:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",url:"/api/user/checkVerificationCode"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(a),success:function(e){if(d.ajaxSend=!1,(!e.success&&parseInt(e.code)==601||!e.success&&parseInt(e.code)==400)&&layer.open({content:"\u53D1\u9001\u9A8C\u8BC1\u7801\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",skin:"msg",time:2}),!e.success)switch(e.message?e.message.split("Permits:")[1]:""){case"2":e.message="1\u5206\u949F\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"5":e.message="1\u5C0F\u65F6\u5185\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u7A0D\u5019\u518D\u8BD5";break;case"20":e.message="\u5F53\u5929\u77ED\u4FE1\u53D1\u9001\u53D7\u9650, \u8BF7\u660E\u5929\u518D\u8BD5";break}r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},ajaxSetPwd:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"put",url:"/api/user/setPwd"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(a),success:function(e){d.ajaxSend=!1,r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},ajaxRegister:function(a,r,i){var e=this;if(d.ajaxSend)return!1;d.ajaxSend=!0,a.sourceChannel=getPagesFrom();var t=e.getchannel();a.ip=t.ip,a.channel=t.channel,a.sourceJson=t.sourceJson,a.clueSourceType=t.sourceType,a.sourceId=t.sourceId,a.gmtStart=t.gmtStart,a.shareUserId=t.shareUserId,a.pvid=t.pvid,a.uvcid=t.uvcid,o.ajax({type:"post",url:a.captchaInput?"/api/user/userRegister"+window.tsnfors:"/api/user/register"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(a),success:function(s){d.ajaxSend=!1,r&&r(s)},error:function(s){d.ajaxSend=!1,i&&i(s)}})},getchannel:function(){var a=sessionStorage.getItem("cluechannel")?JSON.parse(sessionStorage.getItem("cluechannel")):{},r=sessionStorage.getItem("sourceip");return a.ip=r||"",a.uvcid=localStorage.uvcid||"",a.pvid=sessionStorage.getItem("pvid")||"",a},addClientSchool:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"post",url:"/api/school/addClientSchool"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(a),success:function(e){d.ajaxSend=!1,r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},checkLoginNameExist:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"get",url:"/api/user/checkLoginNameExist"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:a,success:function(e){d.ajaxSend=!1,r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},checkPhoneExists:function(a,r,i){if(d.ajaxSend)return!1;d.ajaxSend=!0,o.ajax({type:"get",url:"/api/user/phone/check"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:a,success:function(e){d.ajaxSend=!1,r&&r(e)},error:function(e){d.ajaxSend=!1,i&&i(e)}})},addClientSchoolCheck:function(a,r){o.ajax({type:"post",url:" /api/school/addClientSchoolCheck",contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify(a),success:function(i){d.ajaxSend=!1,r&&r(i)},error:function(i){d.ajaxSend=!1,catchback&&catchback(i)}})},getRefereeId:function(){var a=this,r=window.roominfo&&parseInt(roominfo==null?void 0:roominfo.refereeState)==0,i=a.getQueryRetailId(),e=new Base64,t=r?void 0:Array.isArray(i)?e.encode(encrypt(i[0])):void 0;return t},getCouponShareId:function(){var a=void 0;if(window.decrypt&&localStorage.encryptId){var r=window.decrypt(localStorage.encryptId).split(",");r.length>1&&(a=r[1])}var i=new Base64;return i.encode(encrypt(a))},qrcodeloginWeChat:function(a,r){var i=layer.open({title:"",className:"layui-layer-antd layui-layer-initeantd ",skin:"nohasbtn",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(e){var t=o(e);o.ajax({type:"get",url:"/api/wechat/data",contentType:"application/json;charset=utf-8",dataType:"json",data:{type:"2"},success:function(s){const{appId:n,sig:l}=s,c=`https://dev.filesbox.cn/wechat_login.html?&cdnPath=${window.location.origin}&sig=${l}`,f="cn";new window.WxLogin({id:"wechatLogin",appid:n,scope:"snsapi_login,snsapi_userinfo",self_redirect:!0,redirect_uri:encodeURIComponent(c),state:"xxxx",lang:f})},error:function(s){}})},content:''})},qrcodeloginenWeChat:function(a,r){var i=layer.open({title:"",className:"layui-layer-antd layui-layer-initeantd ",skin:"nohasbtn",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(e){var t=o(e);o.ajax({type:"get",url:"/api/wechat/data",contentType:"application/json;charset=utf-8",dataType:"json",data:{type:"7"},success:function(s){const{sig:n,agentId:l}=s,c=`${location.origin}/enwechat_login.html?sig=${n}`,f="zh";new window.WwLogin({id:"wwLogin",login_type:"CorpApp",appid:"ww2d1e9bafb529c21f",agentid:l,self_redirect:!0,redirect_uri:encodeURIComponent(c),state:"STATE",lang:f})},error:function(s){}})},content:''})},qrcodelogindingding:function(a,r){var i=layer.open({title:"",className:"layui-layer-antd layui-layer-initeantd ",skin:"nohasbtn",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(e){var t=o(e),s="",n=`${location.origin}/api/ding/login/callback`,l=window.roominfo;window.DTFrameLogin({id:"dingLogin",width:280,height:280},{redirect_uri:encodeURIComponent(n),client_id:l.dingClientId,scope:"openid",response_type:"code",state:"dddd",prompt:"consent"},c=>Ce(this,null,function*(){const{authCode:f}=c;f===s||localStorage.getItem("dingAccess")=="1"||(s=f,o.ajax({type:"get",url:"/api/ding/login/callback",contentType:"application/json;charset=utf-8",dataType:"json",data:{authCode:f,state:"dddd"},success:function(p){const{data:v={}}=p;v.token&&(setCookie("token",v.token),window.location.reload())},error:function(p){}}))}),c=>{})},content:'\u4F7F\u7528\u9489\u9489\u626B\u7801\u767B\u5F55
'})},qrcodeloginapp:function(a,r){var i=this,e=layer.open({title:"",className:"layui-layer-antd layui-layer-initeantd ",skin:"nohasbtn",anim:"scale",scrollbar:!1,cancel:function(t,s){i.websocket&&i.websocket.close(),layer.close(e)},end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(t){var s=o(t),n=s.find(".appLoginBox");i.qrcodeBox=n,i.getQrCodeLoginUrl(function(l){n.html(""),n.qrcode(l.data.qrUrl)})},content:'\u4F7F\u7528FilesBox App\u626B\u4E00\u626B\u767B\u5F55
'})},dialogBtnx:function(a){var r=this,i=a.data||{},e=layer.open({title:"",className:"layui-layer-antd layui-layer-initeantd ",skin:"nohasbtn",anim:"scale",scrollbar:!1,cancel:function(t,s){r.websocket&&r.websocket.close(),layer.close(e)},end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(t){var s=o(t)},content:''})},newloginWeChat:function(a,r){var i=this,e=/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(window.navigator.userAgent)&&window.frames.length!=parent.frames.length,t=getPar("redirectUrl")||"",s=window.roominfo||{};if(s.schoolType=="2"){if(!/MicroMessenger/.test(window.navigator.userAgent)){o(".isterspan.other").find("a").eq(0).remove();return}o.ajax({type:"post",url:"/api/user/wechat/miniApp/auth/gen"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify({clientCode:"h5",page:"packageC/pages/web-login/web-login",useScene:"login"}),success:function(n){if(n.success){var l=n.data||{},c=l.key||"",f=l.params||{},p=f.appUsername,v=f.path+"?scene="+f.scene,m='\u5FAE\u4FE1\u767B\u5F55
',g=' ';o(".tabwxlogin_wxbtn").remove(),o(".tabwxlogin_labelone").after(m),o(".isterspan.other").find("a").eq(0).remove(),o(".isterspan.other").prepend(g),i.genkey=c||"",i.resultQueryTimer&&clearInterval(i.resultQueryTimer),i.resultQueryTimer=setInterval(function(){o.ajax({type:"get",url:"/api/user/wechat/miniApp/auth/resultQuery"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:{key:i.genkey},success:function(h){if(h.success){var b=h.data||{},C=b.token||"";C&&(setCookie("token",C),a&&a(h),window.mainHome?window.mainHome.getLoginUser():location.reload(),layer.closeAll(),i.resultQueryTimer&&clearInterval(i.resultQueryTimer))}else parseInt(h.code)==602?layer.open({content:"\u8D26\u53F7\u88AB\u9501\u5B9A",skin:"msg",time:2}):parseInt(h.code)==400?layer.open({content:"\u7F51\u6821\u5DF2\u7981\u6B62\u6CE8\u518C",skin:"msg",time:2}):parseInt(h.code)==509?layer.open({content:"\u60A8\u7684\u8D26\u53F7\u5DF2\u5728\u591A\u5904\u767B\u5F55\uFF0C\u6B64\u8BBE\u5907\u5DF2\u88AB\u9650\u5236\uFF0C\u8BF7\u5C3D\u5FEB\u4FEE\u6539\u5BC6\u7801\u6216\u8005\u8054\u7CFB\u5BA2\u670D\u4EBA\u5458",skin:"msg",time:2}):layer.open({content:h.message||"\u9A8C\u8BC1\u7801\u4E0D\u6B63\u786E",skin:"msg",time:2}),i.resultQueryTimer&&clearInterval(i.resultQueryTimer)},error:function(h){}})},2e3)}else o(".tabwxlogin_wxbtn").remove(),o(".isterspan.other").find("a").eq(0).remove(),layer.open({content:n.message||"\u63A5\u53E3\u8BF7\u6C42\u9519\u8BEF",skin:"msg",time:2});a&&a(n)},error:function(n){console.log("scanLogin",n)}})}},loginWeChat:function(a,r){var i=this,e=/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(window.navigator.userAgent)&&window.frames.length!=parent.frames.length,t=getPar("redirectUrl")||"",s=window.roominfo||{},n=!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);s.schoolType=="2"?o.ajax({type:"post",url:"/api/user/wechat/miniApp/auth/gen"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:JSON.stringify({clientCode:"scheme",page:"packageC/pages/web-login/web-login",useScene:"login"}),success:function(l){if(l.success){var c=l.data||{},f=c.base64Image||"",p=c.url||"";i.genkey=c.key||"",i.resultQueryTimer&&clearInterval(i.resultQueryTimer),i.resultQueryTimer=setInterval(function(){o.ajax({type:"get",url:"/api/user/wechat/miniApp/auth/resultQuery"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:{key:i.genkey},success:function(v){var m=v.data||{},g=m.token||"";g&&(setCookie("token",g),layer.closeAll(),layer.open({content:"\u767B\u5F55\u6210\u529F",skin:"msg",time:2}),i.resultQueryTimer&&clearInterval(i.resultQueryTimer),location.href.indexOf("getcoupons.html")>-1?location.reload():window.mainHome?window.mainHome.getLoginUser():location.reload())},error:function(v){}})},2e3),p&&(window.location.href=p)}else layer.open({content:l.message,skin:"msg",time:2});a&&a(l)},error:function(l){console.log("scanLogin",l)}}):window.__wxjs_environment==="miniprogram"?wx.miniProgram.navigateTo({url:"../miniGetInfo/miniGetInfo"}):/MicroMessenger/.test(window.navigator.userAgent)?o.ajax({type:"get",url:"/api/user/wxh5Login"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:{refereeId:i.getRefereeId(),sourceChannel:getPagesFrom()},success:function(l){window.localStorage.callbackLoginUrl=t.indexOf("activityDetails")>-1?location.origin+t:e?window.parent.location.href:window.location.href,e?window.parent.location.href=l.data.url:window.location.href=l.data.url,a&&a(l)},error:function(l){r&&r(l)}}):layer.open({content:"\u8BE5\u529F\u80FD\u4EC5\u652F\u6301\u5FAE\u4FE1\u5185\u4F7F\u7528",skin:"msg",time:2})},loginQQ:function(a,r){var i=this,e=i.getchannel();e.refereeId=i.getRefereeId(),e.sourceChannel=getPagesFrom(),e.clueSourceType=e.sourceType,delete e.sourceType,o.ajax({type:"get",url:"/api/user/qqlogin"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:e,success:function(t){window.localStorage.callbackLoginUrl=window.location.href,window.location.href=t.url,a&&a(t)},error:function(t){r&&r(t)}})},loginWeiBo:function(a,r){var i=this,e=i.getchannel();e.refereeId=i.getRefereeId(),e.sourceChannel=getPagesFrom(),e.clueSourceType=e.sourceType,delete e.sourceType,o.ajax({type:"get",url:"/api/user/weibo"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:e,success:function(t){window.localStorage.callbackLoginUrl=window.location.href,window.location.href=t.url,a&&a(t)},error:function(t){r&&r(t)}})},loginAlipay:function(a,r){var i=this;if(/AlipayClient/.test(window.navigator.userAgent)){var e=i.getchannel();e.refereeId=i.getRefereeId(),e.sourceChannel=getPagesFrom(),e.clueSourceType=e.sourceType,delete e.sourceType,o.ajax({type:"get",url:"/api/user/alipaylogin"+window.tsnfors,contentType:"application/json;charset=utf-8",dataType:"json",data:e,success:function(t){window.localStorage.callbackLoginUrl=window.location.href,window.location.href=t.url,a&&a(t)},error:function(t){r&&r(t)}})}else layer.open({content:"\u8BE5\u529F\u80FD\u4EC5\u652F\u6301\u652F\u4ED8\u5B9D\u5185\u4F7F\u7528",skin:"msg",time:2})},loginLayer:function(a,r,i){var b,C,T,j;var e=this;if(window.roominfo)clearTimeout(e.getRoomInfoTimeout);else return e.getRoomInfoTimeout=setTimeout(function(){e.getAjaxRoomInfo(function(){e.loginLayer(a,r,i)}),clearTimeout(e.getRoomInfoTimeout)},300),!1;var t=[];parseInt((b=window.roominfo)==null?void 0:b.isLoginnameLogin)==1&&t.push("account"),parseInt((C=window.roominfo)==null?void 0:C.isSmsLogin)==1&&t.push("shortMessage"),parseInt((T=window.roominfo)==null?void 0:T.isLoginnameLogin)==1&&parseInt((j=window.roominfo)==null?void 0:j.isSmsLogin)==1&&(t=r?r.type:t);for(var s=t,n=o(".module[data-type=registerLogin]"),l=[],c=0,f=n.length;c-1||location.href.indexOf("yunke.zto.com")>-1)location.href="/pages/wap/logins.html";else if(location.href.indexOf("rcyj.xx.cn")>-1)location.href="https://m.rencaiyoujia.com/login?toBig=1";else{o("html, body").css({overflow:"hidden",height:"100%"});var h=layer.open({title:"",className:"layui-layer-antd layui-layer-initeantd ",skin:"nohasbtn",anim:"scale",scrollbar:!1,end:function(){i&&i("cancel"),e.resultQueryTimer&&clearInterval(e.resultQueryTimer),o("html, body").css({overflow:"visible",height:"auto"})},success:function(J){var ye,we,be;var u=o(J),P=window.roominfo&&((ye=window.roominfo)==null?void 0:ye.loginType)||"1",_=window.roominfo?(we=window.roominfo)==null?void 0:we.isLoginwindowRegister:1;P=="1"?(u.find(".phonelogin").hide(),u.find(".userlogin").show()):(u.find(".layui-layer-antd").css("marginTop",-77),u.find(".userlogin").hide(),u.find(".phonelogin").show()),isnologinlayertop();var A=u.find(".tabheader a");A.removeClass("active"),A.eq(parseInt(P)-1).addClass("active"),s&&s.length==1&&(A.removeClass("active"),s[0]=="account"?(u.find(".phonelogin").hide(),u.find(".userlogin").show(),A.eq(0).addClass("active").css("width","100%"),A.eq(1).hide()):s[0]=="shortMessage"&&(u.find(".layui-layer-antd").css("marginTop",-77),u.find(".userlogin").hide(),u.find(".phonelogin").show(),A.eq(0).hide(),A.eq(1).addClass("active").css("width","100%")));var G=((be=window.roominfo)==null?void 0:be.isGraphicCode)==1,B=u.find(".account"),N=u.find(".password"),y=B.find(".istertxts"),S=N.find(".istertxts"),V=B.find(".form-explain"),W=N.find(".form-explain"),M=u.find(".userlogin .logbtn"),E=u.find(".checkboxDiv"),R=u.find(".loginCode"),O=R.find(".yantess"),Y=R.find(".form-explain"),ae=u.find(".tabwxlogin_wxbtn"),oe=u.find(".tabwxlogin_accountbtn");G&&(O.on("input",function(){o(this).val().trim()!=""&&R.removeClass("error")}),R.find(".yaned").on("click",function(){o(this).attr("src","/api/user/getVerifyImageCode?cType=2&height=36&width=98&v="+parseInt(Math.random()*100))})),y.on("input",function(){o(this).val().trim()!=""&&B.removeClass("error")}),S.on("input",function(){o(this).val().trim()!=""&&N.removeClass("error")}),oe.on("click",function(){o(".tabwxlogin").hide(),o(".tabheader,.tabcontent").show()}),ae.on("click",function(){e.loginWeChat()}),M.on("click",function(){var w=o(this).prev(".form-explain");if(w.css("height","0px"),y.val().trim()==""&&(B.addClass("error"),V.text("\u8BF7\u8F93\u5165\u8D26\u53F7/\u624B\u673A\u53F7/\u90AE\u7BB1")),S.val().trim()==""&&(N.addClass("error"),W.text("\u8BF7\u8F93\u5165\u5BC6\u7801")),G&&O.val().trim()=="")return R.addClass("error"),Y.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),"";if(S.val().trim()&&y.val().trim())if(G){var k=S.val().trim();e.newLogin({isGraphicCode:1,captchaInput:O.val().trim(),encrypted:!!window.CryptoJS,username:y.val().trim(),password:window.CryptoJS?encrypt(k):k},function(x){if(x.success&&(E.hasClass("on")&&window.encrypt?(localStorage.isSaveAPWordKey=encrypt(JSON.stringify({a:y.val().trim(),b:S.val().trim(),t:Date.now()})),localStorage.removeItem("isSaveAPWordKeyNoOn")):localStorage.isSaveAPWordKeyNoOn=1),a&&a(x),window.mainHome&&x.success)layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer),window.mainHome.getLoginUser();else if(x.success)layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer);else if(x.success){var D=x.data,F="";if(D){var ge=D.errCode;ge=="4012"?F="\u8D85\u8FC7\u9650\u5236\u6B21\u6570"+D.limitCount+"\u6B21\uFF0C\u8BF7"+D.denyTime/60+"\u5206\u949F\u540E\u91CD\u8BD5":F="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u6216\u627E\u56DE\u5BC6\u7801"}else F="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u6216\u627E\u56DE\u5BC6\u7801";w.text(F).css({height:"20px",lineHeight:"24px"})}else{var L=x.message;switch(parseInt(x.code)){case 400:L="\u8BE5\u7F51\u6821\u9700\u8981\u4F7F\u7528\u9501\u5C4F\u6D4F\u89C8\u5668\u767B\u5F55";break;case 403:L="\u8D26\u53F7\u7C7B\u578B\u4E0D\u6B63\u786E";break;case 503:L="\u5DF2\u88AB\u9650\u5236\u767B\u5F55";break;case 509:L="\u60A8\u7684\u8D26\u53F7\u5DF2\u5728\u591A\u5904\u767B\u5F55\uFF0C\u6B64\u8BBE\u5907\u5DF2\u88AB\u9650\u5236\uFF0C\u8BF7\u5C3D\u5FEB\u4FEE\u6539\u5BC6\u7801\u6216\u8005\u8054\u7CFB\u5BA2\u670D\u4EBA\u5458";break;case 602:L="\u975E\u7F51\u6821\u7528\u6237\u7981\u6B62\u767B\u5F55";break;case 606:L="\u7528\u6237\u8D26\u53F7\u88AB\u5220\u9664";break;case 707:L="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break;case 605:R.find(".yaned").click();break;default:R.find(".yaned").click()}parseInt(x.code)==509?(u.find(".logbtnMt15").css("marginTop","32px"),w.text(L).css({height:"auto","min-height":"20px",lineHeight:"16px",fontSize:"12px",marginTop:"-32px",height:"32px"})):(u.find(".logbtnMt15").css("marginTop","16px"),w.text(L).css({height:"auto","min-height":"20px",lineHeight:"18px",height:"20px"}))}})}else e.login(y.val().trim(),S.val().trim(),function(x){if(x.success&&(E.hasClass("on")&&window.encrypt?(localStorage.isSaveAPWordKey=encrypt(JSON.stringify({a:y.val().trim(),b:S.val().trim(),t:Date.now()})),localStorage.removeItem("isSaveAPWordKeyNoOn")):localStorage.isSaveAPWordKeyNoOn=1),a&&a(x),window.mainHome&&x.success)layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer),window.mainHome.getLoginUser();else if(x.success)layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer);else if(x.success){var D=x.data,F="";if(D){var ge=D.errCode;ge=="4012"?F="\u8D85\u8FC7\u9650\u5236\u6B21\u6570"+D.limitCount+"\u6B21\uFF0C\u8BF7"+D.denyTime/60+"\u5206\u949F\u540E\u91CD\u8BD5":F="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u6216\u627E\u56DE\u5BC6\u7801"}else F="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\u6216\u627E\u56DE\u5BC6\u7801";w.text(F).css({height:"20px",lineHeight:"24px"})}else{var L=x.message;switch(parseInt(x.code)){case 400:L="\u8BE5\u7F51\u6821\u9700\u8981\u4F7F\u7528\u9501\u5C4F\u6D4F\u89C8\u5668\u767B\u5F55";break;case 403:L="\u8D26\u53F7\u7C7B\u578B\u4E0D\u6B63\u786E";break;case 503:L="\u5DF2\u88AB\u9650\u5236\u767B\u5F55";break;case 509:L="\u60A8\u7684\u8D26\u53F7\u5DF2\u5728\u591A\u5904\u767B\u5F55\uFF0C\u6B64\u8BBE\u5907\u5DF2\u88AB\u9650\u5236\uFF0C\u8BF7\u5C3D\u5FEB\u4FEE\u6539\u5BC6\u7801\u6216\u8005\u8054\u7CFB\u5BA2\u670D\u4EBA\u5458";break;case 602:L="\u975E\u7F51\u6821\u7528\u6237\u7981\u6B62\u767B\u5F55";break;case 606:L="\u7528\u6237\u8D26\u53F7\u88AB\u5220\u9664";break;case 707:L="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break}parseInt(x.code)==509?(u.find(".logbtnMt15").css("marginTop","32px"),w.text(L).css({height:"auto","min-height":"20px",lineHeight:"16px",fontSize:"12px",marginTop:"-32px",height:"32px"})):(u.find(".logbtnMt15").css("marginTop","16px"),w.text(L).css({height:"auto","min-height":"20px",lineHeight:"18px",height:"20px"}))}})}),i&&o(".registerBtn").parent().hide(),o(".registerBtn").on("click",function(){layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer),e.registerLayer(function(w){w.success&&window.location.reload()})}),o(".forgetPossword").on("click",function(){layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer),e.getPasswordLayer()}),u.on("keydown",function(w){w.keyCode==13&&u.find(".phonelogin .logbtn").click()});var le=u.find(".phonelogin .logbtn"),de=u.find(".pictureCode"),I=u.find(".mobile"),H=u.find(".verCode"),ce=H.find(".istertxts"),re=de.find(".istertxts"),Q=u.find(".mobileNumber"),U=u.find(".mobileCode"),te=u.find(".mobileBtn"),K=Q.find(".istertxts"),z=Q.find(".form-explain"),ne=U.find(".istertxts"),Z=U.find(".form-explain"),fe=te.find(".form-explain"),q=!1;K.on("input",function(){q=!0,Q.removeClass("error"),o(this).val().trim()==""&&(Q.addClass("error"),z.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),q=!1)}),K.on("blur",function(){q=!1,pe=!0,o(this).val().trim()==""?(Q.addClass("error"),z.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),q=!1):/^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/.test(o(this).val())?parseInt(_)==1?(q=!1,e.checkPhoneExists({mobilePhone:o(this).val()},function(w){w.success&&(w.data.isExist==!0||w.data==!0)?q=!0:(q=!1,Q.addClass("error"),z.text("\u8BE5\u624B\u673A\u53F7\u7801\u4E0D\u5B58\u5728,\u8BF7\u7528\u8D26\u53F7\u767B\u5F55"))})):q=!0:(q=!1,Q.addClass("error"),z.text("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801"))}),ne.on("input",function(){U.removeClass("error"),o(this).val().trim()==""&&(U.addClass("error"),Z.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"))});var se=I.find("a.yaned"),ve=!0,pe=!1;se.on("click",function(){q&&ve?(ve=!1,e.sendRegisterOrLogin(K.val().trim(),function(w){if(pe=!0,w.success){pe=!0,q=!0;var k=60;se.css("color","#ccc"),se.text("\u5DF2\u53D1\u9001\uFF08"+k+"\uFF09");var x=setInterval(function(){k=k-1,se.text("\u5DF2\u53D1\u9001\uFF08"+k+"\uFF09"),k==0&&(ve=!0,clearInterval(x),se.css("color","#666"),se.text("\u83B7\u53D6\u9A8C\u8BC1\u7801"))},1e3)}else ve=!0,q=!1,Q.addClass("error"),z.text(w.message)})):K.val().trim()==""&&(Q.addClass("error"),z.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),q=!1)}),le.on("click",function(){var w=!0;if(K.val().trim()==""&&(Q.addClass("error"),z.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),w=!1),ne.val().trim()=="")U.addClass("error"),Z.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),w=!1;else if(!pe)return U.addClass("error"),Z.text("\u8BF7\u5148\u83B7\u53D6\u9A8C\u8BC1\u7801"),!1;function k(x,D){var F=x+"="+D+";path=/";document.cookie=F}w&&q&&e.mobileLogin({mobile:K.val().trim(),smsCode:ne.val().trim(),refereeId:e.getRefereeId()},function(x){x.success?(k("token",x.data.token),a&&a(x),window.mainHome&&window.mainHome.getLoginUser(),layer.close(h),e.resultQueryTimer&&clearInterval(e.resultQueryTimer)):parseInt(x.code)==602?(te.addClass("error"),fe.css("height",28),fe.text("\u8D26\u53F7\u88AB\u9501\u5B9A")):parseInt(x.code)==400?(te.addClass("error"),fe.css("height",28),fe.text("\u7F51\u6821\u5DF2\u7981\u6B62\u6CE8\u518C")):parseInt(x.code)==509?(U.addClass("error"),Z.css({fontSize:"12px",lineHeight:"14px",bottom:"-24px",width:"300px"}),u.find(".mobile .txtAgreement").css({marginTop:"20px"}),Z.text("\u60A8\u7684\u8D26\u53F7\u5DF2\u5728\u591A\u5904\u767B\u5F55\uFF0C\u6B64\u8BBE\u5907\u5DF2\u88AB\u9650\u5236\uFF0C\u8BF7\u5C3D\u5FEB\u4FEE\u6539\u5BC6\u7801\u6216\u8005\u8054\u7CFB\u5BA2\u670D\u4EBA\u5458")):(U.addClass("error"),Z.text(x.message||"\u9A8C\u8BC1\u7801\u4E0D\u6B63\u786E"))})}),o(".userlogintab .tabheader a").on("click",function(w){o(".userlogintab .tabheader a").removeClass("active"),o(this).addClass("active");var k=o(this).attr("loginTypes");k=="1"?(o(".userlogintab .phonelogin").hide(),o(".userlogintab .userlogin").show(),P="1",u.find(".layui-layer-antd").css("marginTop",0)):(u.find(".layui-layer-antd").css("marginTop",-77),o(".userlogintab .userlogin").hide(),o(".userlogintab .phonelogin").show(),P="2"),w.preventDefault()}),u.find("#showPassword").on("click",function(){var w=o(this);w.hasClass("open")?(S.attr("type","password"),w.removeClass("open")):(S.attr("type","text"),w.addClass("open"))});var ee=window.roominfo,Se=u.find(".thirdLoginBox"),me=u.find(".loginwc"),Ie=u.find(".loginqq"),ke=u.find(".loginwb"),je=u.find(".loginpay"),he=u.find(".loginenWechat"),xe=u.find(".logindingding"),Te=function(){var w=window.roominfo,k=(w==null?void 0:w.thirdLoginConfig)?JSON.parse(w==null?void 0:w.thirdLoginConfig):[];k.length||Se.hide(),(k==null?void 0:k.find(x=>x.thirdName=="wechat"))?me.on("click",function(){e.qrcodeloginWeChat()}):me.parent().hide(),(k==null?void 0:k.find(x=>x.thirdName=="enWechat"))?he.on("click",function(){e.qrcodeloginenWeChat()}):he.parent().hide(),(k==null?void 0:k.find(x=>x.thirdName=="dingding"))?xe.on("click",function(){e.qrcodelogindingding()}):xe.parent().hide()},Ne=setInterval(function(){window.roominfo&&(clearInterval(Ne),Te())},100),Ae=!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);(window.__wxjs_environment==="miniprogram"||/MicroMessenger/.test(window.navigator.userAgent))&&(Ie.parent().hide(),ke.parent().hide(),je.parent().hide()),localStorage.isSaveAPWordKeyNoOn&&E.removeClass("on"),E.on("click",function(){E.hasClass("on")?(E.removeClass("on"),localStorage.removeItem("isSaveAPWordKey")):E.addClass("on")});var Le=u.find(".txtAgreement"),Oe=u.find(".agree");if(ee){var Pe=ee==null?void 0:ee.isOpenSchoolRegisterProtocol,ue=ee==null?void 0:ee.schoolRegisterProtocol;if((!Pe||!isJSON(ue))&&Le.hide(),ue&&isJSON(ue)){var X=JSON.parse(ue),ie="";X.length==1?ie+='\u300A'+X[0].title+"\u300B":X.length==2?(ie+='\u300A'+X[0].title+"\u300B\u548C",ie+='\u300A'+X[1].title+"\u300B"):X.length>0&&(ie+='\u300A'+X[0].title+"\u300B\u3001",ie+='\u300A'+X[1].title+"\u300B\u548C",ie+='\u300A'+X[2].title+"\u300B"),Oe.html(ie)}}},content:'\u4F7F\u7528\u5FAE\u4FE1\u767B\u5F55
\u5FAE\u4FE1\u767B\u5F55
\u6216\u4F7F\u7528\u8D26\u53F7\u767B\u5F55
\u767B\u5F55
'+e.renderLoginCode()+'
\u5341\u5929\u5185\u514D\u767B\u5F55
\u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u7ECF\u540C\u610F\u5982\u4E0B\u534F\u8BAE\uFF1A \u767B\u5F55\u5373\u4EE3\u8868\u60A8\u5DF2\u7ECF\u540C\u610F\u5982\u4E0B\u534F\u8BAE\uFF1A '})}},renderLoginCode:function(){var a=window.roominfo||{};if((a==null?void 0:a.isGraphicCode)!=1)return"";var r='';return r},registerLayer:function(a){var r=this,i=window.roominfo,e=(i==null?void 0:i.schoolType)=="2",t=(i==null?void 0:i.isStrongPwd)==1;if(i&&parseInt(i==null?void 0:i.isLoginwindowRegister)==1)layer.open({content:e?"\u516C\u53F8\u5DF2\u5F00\u542F\u7981\u6B62\u6CE8\u518C\uFF0C\u8BF7\u8054\u7CFB\u516C\u53F8\u7BA1\u7406\u5458":"\u8BE5\u7F51\u6821\u5DF2\u7981\u6B62\u6CE8\u518C\uFF0C\u8BF7\u8054\u7CFB\u8BE5\u7F51\u6821\u7BA1\u7406\u5458",skin:"msg",time:2});else if(location.href.indexOf("zto.xx.cn")>-1||location.href.indexOf("yunke.zto.com")>-1)location.href="/pages/wap/register.html";else if(location.href.indexOf("rcyj.xx.cn")>-1)location.href="https://m.rencaiyoujia.com/register2?toBig=1";else{if(!i)return!1;var s=(i==null?void 0:i.loginNameMin)||6,n=t?8:(i==null?void 0:i.passwordMin)||3,l=s+"-20\u4F4D\u8D26\u53F7\uFF0C\u4EE5\u5B57\u6BCD\u5F00\u5934\u7684\u82F1\u6587\u3001\u6570\u5B57",c=n+"-24\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199";o("html, body").css({overflow:"hidden",height:"100%"});var f=layer.open({title:"\u7528\u6237\u6CE8\u518C",className:"layui-layer-antd layui-layer-forget layui-layer-initeantd",anim:"scale",end:function(){layer.close(f),o("html, body").css({overflow:"visible",height:"auto"})},success:function(p){var v=o(p);r.checkRegister.init(v,r);var m=v.find(".sexs"),g=v.find(".account").find(".istertxts"),h=v.find(".password").find(".istertxts"),b=v.find(".realname").find(".istertxts"),C=v.find(".schoolName").find(".istertxts"),T=v.find(".gradeName").find(".istertxts"),j=v.find(".className").find(".istertxts"),J=v.find(".mobile").find(".istertxts"),u=v.find(".verCode").find(".istertxts"),P=v.find(".referee").find(".istertxts"),_=v.find(".pictureCode").find(".istertxts");v.find(".registerAwaybtn").on("click",function(){var V=o(this).prev(".form-explain");V.css("height","0px");var W=r.checkRegister.check(v,r);if(W){var M=new Base64,E={loginName:g.val().trim(),password:h.val().trim(),refereeLoginName:r.checkRegister.refereeHideState?void 0:P.val().trim(),refereeId:r.checkRegister.refereeHideState?void 0:Array.isArray(r.checkRegister.refereeUids)?M.encode(encrypt(r.checkRegister.refereeUids[0])):void 0,sex:m.find(".curs").hasClass("sexnan")?1:0,sourceSchoolName:C.val().trim(),sourceGradeName:T.val().trim(),sourceClassName:j.val().trim()};r.checkRegister.vRealname&&(E.realName=b.val().trim()),r.checkRegister.verCodebtn?(E.mobilePhone=J.val().trim(),E.smsCode=u.val().trim()):E.captchaInput=_.val().trim()||1111,r.ajaxRegister(E,function(R){R.success?(layer.close(f),layer.open({content:"\u6CE8\u518C\u6210\u529F",skin:"msg",time:2}),a&&a(R)):(V.text(R.message).css("height","24px"),v.find("#vContainer").attr("src","/api/user/getVerifyImageCode?cType=2&height=36&width=98&v="+Date.now()))})}}),v.find(".gologin").on("click",function(){layer.close(f),r.loginLayer()});var A=v.find(".txtAgreement"),G=v.find(".agree");if(i){var B=i==null?void 0:i.isOpenSchoolRegisterProtocol,N=i==null?void 0:i.schoolRegisterProtocol;if((!B||!isJSON(N))&&A.hide(),N&&isJSON(N)){var y=JSON.parse(N),S="";y.length==1?S+='\u300A'+y[0].title+"\u300B":y.length==2?(S+='\u300A'+y[0].title+"\u300B\u548C",S+='\u300A'+y[1].title+"\u300B"):y.length>0&&(S+='\u300A'+y[0].title+"\u300B\u3001",S+='\u300A'+y[1].title+"\u300B\u548C",S+='\u300A'+y[2].title+"\u300B"),G.html(S)}}},content:' \u7537 \u5973
\u6CE8\u518C\u5373\u4EE3\u8868\u60A8\u5DF2\u7ECF\u540C\u610F\u5982\u4E0B\u534F\u8BAE\uFF1A \u5DF2\u6709\u5E10\u53F7\uFF1F\u9A6C\u4E0A\u767B\u5F55
'})}},checkRegister:{init:function(a,r){var i=this,e=window.roominfo,t=(e==null?void 0:e.isStrongPwd)==1;i.roominfo=e,i.isCompany=(e==null?void 0:e.schoolType)=="2";var s=(e==null?void 0:e.loginNameMin)||6,n=t?8:(e==null?void 0:e.passwordMin)||3;i.loginNameTip=s+"-20\u4F4D\u8D26\u53F7\uFF0C\u4EE5\u5B57\u6BCD\u5F00\u5934\u7684\u82F1\u6587\u3001\u6570\u5B57",i.passwordTip=n+"-24\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",i.regExpNameMin=new RegExp("^[a-zA-Z][a-zA-Z0-9]{"+(s-1)+",19}$"),i.regExpPasswordMin=new RegExp("^.{"+n+",24}$"),i.passwordStrongTip="\u5BC6\u7801\u81F3\u5C11\u5305\u542B\u5927\u5199\u5B57\u6BCD\uFF0C\u5C0F\u5199\u5B57\u6BCD\uFF0C\u6570\u5B57",i.mbloo=!1,i.checkSchoolName=!0,i.checkGradeName=!0,i.checkClassName=!0,i.accountEvent(a,r),i.passwordEvent(a,r),i.realNameEvent(a,r),i.mobileEvent(a,r),i.pictureCodeEvent(a,r),i.schoolNameEvent(a,r),i.gradeNameEvent(a,r),i.classNameEvent(a,r),i.sexEvent(a,r),i.refereeEvent(a,r)},check:function(a,r){var i=this;return i.bloo=!0,i.accountEvent(a,r,!0),i.passwordEvent(a,r,!0),i.refereeEvent(a,r,!0),i.vRealname&&i.realNameEvent(a,r,!0),i.verCodebtn?i.mobileEvent(a,r,!0):i.pictureCodeEvent(a,r,!0),i.checkClassName&&i.classNameEvent(a,r,!0),i.checkGradeName&&i.gradeNameEvent(a,r,!0),i.checkSchoolName&&i.schoolNameEvent(a,r,!0),!!(i.bloo&&i.abloo&&i.mbloo)},accountEvent:function(a,r,i){var e=this,t=a.find(".account"),s=t.find(".istertxts"),n=t.find(".form-explain");if(i)return s.val().trim()==""?(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u7528\u6237\u540D"),e.bloo=!1):e.regExpNameMin.test(s.val().trim())||(t.addClass("error"),n.text(e.loginNameTip),e.bloo=!1),!1;t.removeClass("error"),s.on("input",function(){t.removeClass("error"),o(this).val().trim()==""?(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u7528\u6237\u540D")):e.regExpNameMin.test(o(this).val())||(t.addClass("error"),n.text(e.loginNameTip))}),e.abloo=!0,s.on("blur",function(){r.checkLoginName(s.val().trim(),function(l){l.success&&(parseInt(l.data)==0?(t.addClass("error"),n.text("\u8D26\u53F7\u5DF2\u5B58\u5728!"),e.abloo=!1):e.abloo=!0)})})},passwordEvent:function(a,r,i){var e=this,t=a.find(".password"),s=a.find(".confirm"),n=t.find(".istertxts"),l=s.find(".istertxts"),c=t.find(".form-explain"),f=s.find(".form-explain"),p=!1;if(window.roominfo&&(p=(roominfo==null?void 0:roominfo.isStrongPwd)==1),n.focus(function(){setTimeout(function(){n.attr("type","password")},100)}),l.focus(function(){setTimeout(function(){l.attr("type","password")},100)}),i)return n.val().trim()==""?(t.addClass("error"),c.text("\u8BF7\u8F93\u5165\u5BC6\u7801"),e.bloo=!1):p?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/.test(n.val().trim())||(t.addClass("error"),c.text(e.passwordStrongTip),c.css({fontSize:14}),e.bloo=!1):e.regExpPasswordMin.test(n.val().trim())||(t.addClass("error"),c.text(passwordTip),e.bloo=!1),l.val().trim()==""&&(s.addClass("error"),f.text("\u518D\u6B21\u8F93\u5165\u5BC6\u7801"),e.bloo=!1),l.val().trim()!=n.val().trim()&&(s.addClass("error"),f.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"),e.bloo=!1),!1;t.removeClass("error"),s.removeClass("error"),n.on("input",function(){t.removeClass("error"),o(this).val().trim()==""?(t.addClass("error"),c.text("\u8BF7\u8F93\u5165\u5BC6\u7801")):e.regExpPasswordMin.test(o(this).val())||(t.addClass("error"),c.text(e.passwordTip))}),n.on("blur",function(){o(this).val().trim()==l.val().trim()&&s.removeClass("error")}),l.on("input",function(){s.removeClass("error"),o(this).val().trim()==""&&(s.addClass("error"),f.text("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801"))}),l.on("blur",function(){o(this).val().trim()!=n.val().trim()&&(s.addClass("error"),f.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"))})},realNameEvent:function(a,r,i){var l;var e=this,t=a.find(".realname"),s=t.find(".istertxts"),n=t.find(".form-explain");if(i)return s.val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u60A8\u7684\u771F\u5B9E\u59D3\u540D"),e.bloo=!1),!1;t.removeClass("error"),e.roominfo&&parseInt((l=e.roominfo)==null?void 0:l.isRegisterRealName)==0?(t.hide(),e.vRealname=!1):e.vRealname=!0,s.on("input",function(){t.removeClass("error"),o(this).val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u60A8\u7684\u771F\u5B9E\u59D3\u540D"))})},mobileEvent:function(a,r,i){var m;var e=this,t=a.find(".mobile"),s=t.find(".istertxts"),n=t.find(".form-explain"),l=a.find(".verCode"),c=l.find(".istertxts"),f=l.find(".form-explain"),p=l.find("a.yaned");if(i)return s.val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),e.bloo=!1),c.val().trim()==""&&(l.addClass("error"),f.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),e.bloo=!1),!1;l.removeClass("error"),t.removeClass("error"),e.roominfo&&parseInt((m=e.roominfo)==null?void 0:m.isRegisterPhone)==0&&(l.hide(),t.hide()),s.on("input",function(){e.mbloo=!0,t.removeClass("error"),o(this).val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),e.mbloo=!1)}),s.on("blur",function(){e.mbloo=!0,/^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/.test(o(this).val())||(e.mbloo=!1,t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801"))});var v=!0;p.on("click",function(){e.mbloo&&v?(v=!1,r.sendRegisterVerify(s.val().trim(),function(g){if(parseInt(g.code)==505)t.addClass("error"),n.text("\u8BE5\u624B\u673A\u53F7\u7801\u5DF2\u88AB\u6CE8\u518C!"),e.mbloo=!1,v=!0;else if(g.success){e.mbloo=!0;var h=60;p.css("color","#ccc"),p.text("\u5DF2\u53D1\u9001\uFF08"+h+"\uFF09");var b=setInterval(function(){h=h-1,p.text("\u5DF2\u53D1\u9001\uFF08"+h+"\uFF09"),h==0&&(v=!0,clearInterval(b),p.css("color","#666"),p.text("\u83B7\u53D6\u9A8C\u8BC1\u7801"))},1e3)}})):s.val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),e.mbloo=!1)}),c.on("input",function(){l.removeClass("error"),o(this).val().trim()==""&&(l.addClass("error"),f.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"))})},pictureCodeEvent:function(a,r,i){var c;var e=this,t=a.find(".pictureCode"),s=t.find(".istertxts"),n=t.find(".form-explain"),l=t.find("#vContainer");if(l.on("click",function(){l.attr("src","/api/user/getVerifyImageCode?cType=2&height=36&width=98&v="+Date.now())}),i)return s.val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),e.bloo=!1),!1;t.removeClass("error"),e.roominfo&&parseInt((c=e.roominfo)==null?void 0:c.isRegisterPhone)==1&&(e.verCodebtn=!0,t.hide()),s.on("input",function(){e.mbloo=!0,t.removeClass("error"),o(this).val().trim()==""&&(t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),e.mbloo=!1)}),s.on("blur",function(){mbloo=!0,o(this).val().trim()||(e.mbloo=!1,t.addClass("error"),n.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"))})},schoolNameEvent:function(a,r,i){var m;var e=this,t=e.isCompany?"\u5355\u4F4D":"\u5B66\u6821",s=a.find(".schoolName"),n=s.find(".istertxts"),l=s.find(".form-explain"),c=s.find(".supendSchoolBox");if(i)return n.val().trim()==""?(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"),e.bloo=!1):/[a-zA-Z0-9_\u4e00-\u9fa5]{1,20}$/.test(n.val().trim())||(s.addClass("error"),l.text("\u8BF7\u8F93\u51651-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57"),e.bloo=!1),!1;s.removeClass("error"),e.roominfo&&parseInt((m=e.roominfo)==null?void 0:m.isRegisterSourceSchool)==0?(e.checkSchoolName=!1,s.hide()):e.checkSchoolName=!0;var f=function(g){g.length>0?c.show():c.hide();for(var h="",b=g.length>5?5:g.length,C=0;C"+g[C]+"
";c.html(h)},p=function(){r.getTopFiveSchoolNames(function(g){g.success&&f(g.data)})},v=function(g){r.searchRegisterSchoolNames(g,function(h){h.success&&f(h.data)})};c.on("click","p",function(){n.val(o(this).text()),c.hide(),s.removeClass("error")}),n.focus(function(){o(this).val().trim()||p()}),n.on("input",function(){var g=o(this).val().trim();g?/^[a-zA-Z0-9_\u4e00-\u9fa5]{1,20}$/.test(g)?(g.length<6?v(g):c.hide(),s.removeClass("error")):(s.addClass("error"),l.text("\u8BF7\u8F93\u51651-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57"),c.hide()):(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"),p())}),n.on("blur",function(){var g=o(this);setTimeout(function(){c.hide(),g.val().trim()?s.removeClass("error"):(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"))},500)})},gradeNameEvent:function(a,r,i){var c;var e=this,t=e.isCompany?"\u90E8\u95E8":"\u5E74\u7EA7",s=a.find(".gradeName"),n=s.find(".istertxts"),l=s.find(".form-explain");if(i)return n.val().trim()==""?(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"),e.bloo=!1):n.val().length>11&&(s.addClass("error"),l.text("\u8F93\u5165\u7684\u6700\u5927\u957F\u5EA6\u4E3A11"),e.bloo=!1),!1;s.removeClass("error"),e.roominfo&&parseInt((c=e.roominfo)==null?void 0:c.isRegisterSourceGrade)==0?(e.checkGradeName=!1,s.hide()):e.checkGradeName=!0,n.on("input",function(){var f=o(this).val().trim();f?f.length>11?(s.addClass("error"),l.text("\u8F93\u5165\u7684\u6700\u5927\u957F\u5EA6\u4E3A11")):s.removeClass("error"):(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"))}),n.on("blur",function(){var f=o(this);setTimeout(function(){f.val().trim()?s.removeClass("error"):(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"))},500)})},classNameEvent:function(a,r,i){var c;var e=this,t=e.isCompany?"\u5C0F\u7EC4":"\u73ED\u7EA7",s=a.find(".className"),n=s.find(".istertxts"),l=s.find(".form-explain");if(i)return n.val().trim()==""?(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"),e.bloo=!1):n.val().length>11&&(s.addClass("error"),l.text("\u8F93\u5165\u7684\u6700\u5927\u957F\u5EA6\u4E3A11"),e.bloo=!1),!1;s.removeClass("error"),e.roominfo&&parseInt((c=e.roominfo)==null?void 0:c.isRegisterSourceClass)==0?(e.checkClassName=!1,s.hide()):e.checkClassName=!0,n.on("input",function(){var f=o(this).val().trim();f?f.length>11?(s.addClass("error"),l.text("\u8F93\u5165\u7684\u6700\u5927\u957F\u5EA6\u4E3A11")):s.removeClass("error"):(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"))}),n.on("blur",function(){var f=o(this);setTimeout(function(){f.val().trim()?s.removeClass("error"):(s.addClass("error"),l.text("\u8BF7\u8F93\u5165"+t+"\u540D\u79F0"))},500)})},sexEvent:function(a,r){var i=this,e=a.find(".sexs"),t=e.find("span");t.on("click",function(){t.removeClass("curs"),o(this).addClass("curs")})},refereeEvent:function(a,r,i){var l;var e=this,t=a.find(".referee"),s=t.find(".istertxts"),n=t.find(".form-explain");if(i)return!e.refereeCode&&s.val().trim()!=""&&(t.addClass("error"),n.text("\u8BE5\u63A8\u8350\u4EBA\u4E0D\u5728\u8BE5\u5E73\u53F0\u4E0B"),e.bloo=!1),e.refereePedding&&(t.addClass("error"),n.text("\u7A0D\u5019\uFF0C\u6B63\u5728\u9A8C\u8BC1\u8BE5\u63A8\u8350\u4EBA\u4FE1\u606F"),e.bloo=!1),!1;t.removeClass("error"),e.refereeHideState=e.roominfo&&parseInt((l=e.roominfo)==null?void 0:l.refereeState)==0,e.refereeUids=r.getQueryRetailId(),(e.refereeHideState||e.refereeUids)&&t.hide(),e.refereeCode=!0,e.refereePedding=!1,s.on("blur",function(){if(t.removeClass("error"),!o(this).val().trim())return!1;e.refereePedding=!0,e.refereeCode=!1;var c={loginName:o(this).val().trim(),loginStatus:!1};r.checkLoginNameExist(c,function(f){e.refereePedding=!1,f.success&&f.data.platform?(e.refereeCode=!0,t.removeClass("error")):(t.addClass("error"),n.text("\u8BE5\u63A8\u8350\u4EBA\u4E0D\u5B58\u5728"))})})}},registerSchoolLayer:function(){var a=window.roominfo;if(!a)return!1;var r=6,i=r+"-24\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",e=this;o("html, body").css({overflow:"hidden",height:"100%"});var t=layer.open({title:"\u7F51\u6821\u6CE8\u518C",className:"layui-layer-antd layui-layer-registerSchool",skin:"nohasbtn",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(s){var le,de;var n=o(s),l=n.find(".schoolName"),c=n.find(".domain"),f=n.find(".realname"),p=n.find(".password"),v=n.find(".mobile"),m=n.find(".verCode"),g=n.find("#cookietime"),h=n.find(".createBtn"),b=new RegExp("^[^]{"+r+",24}$");isnologinlayertop();var C=n.find(".derase");C.on("click",function(){localStorage.schoolRegisterProtocolMobile=a==null?void 0:a.schoolRegisterProtocol,window.open("/pages/schoolRegister/schoolRegisterProtocolMobile.html")});var T=n.find(".repic a"),j=l.find(".isterspan"),J=c.find(".isterspan"),u="school";T.on("click",function(){T.removeClass("cur"),o(this).addClass("cur"),o(this).attr("data-ctype")=="school"?(u="school",j.text("\u7F51\u6821\u540D\u79F0"),J.text("\u7F51\u6821\u57DF\u540D"),y.text("\u8BF7\u8F93\u5165\u7F51\u6821\u540D\u79F0")):(u="company",j.text("\u4F01\u4E1A\u540D\u79F0"),J.text("\u4F01\u4E1A\u57DF\u540D"),y.text("\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0"))});var P=l.find(".istertxts"),_=c.find(".istertxts"),A=f.find(".istertxts"),G=p.find(".istertxts"),B=v.find(".istertxts"),N=m.find(".istertxts"),y=l.find(".form-explain"),S=c.find(".form-explain"),V=f.find(".form-explain"),W=p.find(".form-explain"),M=v.find(".form-explain"),E=m.find(".form-explain"),R=!0;P.on("input",function(){l.removeClass("error"),o(this).val().trim()==""?(l.addClass("error"),u=="school"?y.text("\u8BF7\u8F93\u5165\u7F51\u6821\u540D\u79F0"):y.text("\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0")):/^\S{1,20}$/.test(o(this).val())||(l.addClass("error"),y.text("\u6700\u5927\u8F93\u5165\u957F\u5EA6\u4E3A20\u4E2A\u5B57"))}),P.on("blur",function(){e.addClientSchoolCheck({schoolName:P.val().trim()},function(I){I.success&&(parseInt(I.data)==1?(l.addClass("error"),y.text("\u7F51\u6821\u540D\u79F0\u91CD\u590D!"),R=!1):R=!0)})}),_.on("input",function(){c.removeClass("error"),o(this).val().trim()==""?(c.addClass("error"),S.text("\u8BF7\u8F93\u5165\u57DF\u540D")):/^[a-z0-9]{5,20}$/.test(o(this).val())||(c.addClass("error"),S.text("5-20\u4F4D\u82F1\u6587(\u5C0F\u5199)\u6216\u6570\u5B57"))}),_.on("blur",function(){e.addClientSchoolCheck({secondLevelDomain:_.val().trim()},function(I){I.success&&(parseInt(I.data)==2?(c.addClass("error"),S.text("\u7F51\u6821\u57DF\u540D\u91CD\u590D!"),R=!1):R=!0)})}),A.on("input",function(){f.removeClass("error"),o(this).val().trim()==""&&(f.addClass("error"),V.text("\u8BF7\u8F93\u5165\u60A8\u7684\u771F\u5B9E\u59D3\u540D"))}),G.on("input",function(){p.removeClass("error"),o(this).val().trim()==""?(p.addClass("error"),W.text("\u8BF7\u8F93\u5165\u5BC6\u7801")):b.test(o(this).val())||(p.addClass("error"),W.text(i))});var O=!1;B.on("input",function(){O=!0,v.removeClass("error"),o(this).val().trim()==""&&(v.addClass("error"),M.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),O=!1)}),B.on("blur",function(){O=!0,o(this).val().trim()==""?(v.addClass("error"),M.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),O=!1):/^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/.test(o(this).val())?e.addClientSchoolCheck({mobilePhone:o(this).val().trim()},function(I){I.success&&(parseInt(I.data)==3?(v.addClass("error"),M.text("\u8D26\u53F7\u5728\u5E73\u53F0\u4E0A\u5DF2\u5B58\u5728!"),O=!1):parseInt(I.data)==4?(v.addClass("error"),M.text("\u8BE5\u624B\u673A\u53F7\u7801\u5DF2\u88AB\u6CE8\u518C"),O=!1):O=!0)}):(O=!1,v.addClass("error"),M.text("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801"))});var Y=n.find("a.yaned"),ae=!0;if(Y.on("click",function(){O&&ae?(ae=!1,e.sendRegisterBySchool(B.val().trim(),function(I){if(parseInt(I.code)==505)v.addClass("error"),M.text("\u8BE5\u624B\u673A\u53F7\u7801\u5DF2\u88AB\u6CE8\u518C!"),ae=!0,O=!1;else if(I.success){O=!0;var H=60;Y.css("color","#ccc"),Y.text("\u5DF2\u53D1\u9001\uFF08"+H+"\uFF09");var ce=setInterval(function(){H=H-1,Y.text("\u5DF2\u53D1\u9001\uFF08"+H+"\uFF09"),H==0&&(ae=!0,clearInterval(ce),Y.css("color","#666"),Y.text("\u83B7\u53D6\u9A8C\u8BC1\u7801"))},1e3)}})):B.val().trim()==""&&(v.addClass("error"),M.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),O=!1)}),N.on("input",function(){m.removeClass("error"),o(this).val().trim()==""&&(m.addClass("error"),E.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"))}),window.roominfo){var oe=n.find(".esuze");oe.text((le=window.roominfo)==null?void 0:le.platformTopLevelDomain),oe.attr("title",(de=window.roominfo)==null?void 0:de.platformTopLevelDomain)}h.on("click",function(){var I=!0;P.val().trim()==""?(l.addClass("error"),u=="school"?y.text("\u8BF7\u8F93\u5165\u7F51\u6821\u540D\u79F0"):y.text("\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0"),I=!1):/^\S{1,20}$/.test(P.val().trim())||(l.addClass("error"),y.text("\u6700\u5927\u8F93\u5165\u957F\u5EA6\u4E3A20\u4E2A\u5B57"),I=!1),_.val().trim()==""?(c.addClass("error"),S.text("\u8BF7\u8F93\u5165\u57DF\u540D"),I=!1):/^[a-z0-9]{5,20}$/.test(_.val().trim())||(c.addClass("error"),S.text("5-20\u4F4D\u82F1\u6587(\u5C0F\u5199)\u6216\u6570\u5B57"),I=!1),A.val().trim()==""&&(f.addClass("error"),V.text("\u8BF7\u8F93\u5165\u60A8\u7684\u771F\u5B9E\u59D3\u540D"),I=!1),G.val().trim()==""&&(p.addClass("error"),W.text("\u8BF7\u8F93\u5165\u5BC6\u7801!"),I=!1),B.val().trim()==""&&(v.addClass("error"),M.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),I=!1),N.val().trim()==""&&(m.addClass("error"),E.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),I=!1);var H=o(this).prev(".form-explain");if(g.prop("checked")?H.css("height","0px"):(I=!1,H.text("\u60A8\u5C1A\u672A\u540C\u610F\u521B\u5EFA\u7F51\u6821\u670D\u52A1\u534F\u8BAE").css("height","24px")),I&&O){var ce={code:N.val().trim(),mobilePhone:B.val().trim(),password:G.val().trim(),realName:A.val().trim(),schoolName:P.val().trim(),schoolType:u=="school"?1:2,secondLevelDomain:_.val().trim(),sourceChannel:getPagesFrom()};e.addClientSchool(ce,function(re){var te,K;if(re.success){layer.close(t);var Q=layer.open({type:1,title:"",skin:"layui-layer-antd",closeBtn:1,anim:2,area:["350px","300px"],scrollbar:!1,shadeClose:!0,cancel:function(z,ne){},success:function(z,ne){var z=o(s),Z=z.find(".logarm");Z.on("click",function(){layer.close(Q)})},content:' \u6CE8\u518C\u6210\u529F
\u7F51\u6821\u5730\u5740\uFF1A'+_.val().trim()+""+((te=window.roominfo)==null?void 0:te.platformTopLevelDomain)+'
\u7BA1\u7406\u5458\u8D26\u53F7\uFF1A'+B.val().trim()+'
\u7ACB\u5373\u767B\u5F55 '})}else{var U=re.message;switch(parseInt(re.data)){case 1:U="\u7F51\u6821\u540D\u79F0\u91CD\u590D";break;case 2:U="\u7F51\u6821\u57DF\u540D\u91CD\u590D";break;case 4:U="\u9A8C\u8BC1\u7801\u8FC7\u671F";break;case 5:U="\u9A8C\u8BC1\u7801\u6821\u9A8C\u5931\u8D25";break;default:}parseInt(re.code)==1001&&(U="\u7528\u6237\u5DF2\u5B58\u5728"),H.text(U).css("height","24px")}})}})},content:''})},getUsernameLayer:function(a){var r=this;window.location.href="/pages/queryusername.html?designId="+a},getExchangecoupon:function(a){var r=this;layer.open({title:"\u5151\u6362\u4F18\u60E0\u5238",className:"layui-layer-antd layui-layer-getExchangecoupon",anim:"scale",scrollbar:!1,content:' ',success:function(i,e){}})},firstsetPasswordLayer:function(a,r){var i=this;o("html, body").css({overflow:"hidden",height:"100%"});var e=layer.open({title:"\u8BBE\u7F6E\u5BC6\u7801",className:"layui-layer-antd",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(t){var s=o(t),n=s.find(".resetBtn"),l=s.find(".password"),c=s.find(".confirm"),f=l.find(".istertxts"),p=c.find(".istertxts"),v=l.find(".form-explain"),m=c.find(".form-explain"),g=!1,h=3;window.roominfo&&(g=(roominfo==null?void 0:roominfo.isStrongPwd)==1,h=roominfo==null?void 0:roominfo.passwordMin),f.on("input",function(){l.removeClass("error"),o(this).val().trim()==""?(l.addClass("error"),v.text("\u8BF7\u8F93\u5165\u5BC6\u7801")):g?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/.test(f.val().trim())||(l.addClass("error"),v.text("8-24\u4F4D\u5BC6\u7801\uFF0C\u5305\u542B\u5927\u5199\u5B57\u6BCD\uFF0C\u5C0F\u5199\u5B57\u6BCD\uFF0C\u6570\u5B57")):/^[^]{3,24}$/.test(o(this).val())||(l.addClass("error"),v.text(h+"-24\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199"))}),p.on("input",function(){c.removeClass("error"),o(this).val().trim()==""&&(c.addClass("error"),m.text("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801")),o(this).val().trim()!=f.val().trim()&&(c.addClass("error"),m.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"),b=!1)}),p.on("blur",function(){o(this).val().trim()!=f.val().trim()&&(c.addClass("error"),m.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"))});var b=!0;n.on("click",function(){if(b=!0,f.val().trim()==""?(l.addClass("error"),v.text("\u8BF7\u8F93\u5165\u5BC6\u7801"),b=!1):/^[^]{3,24}$/.test(f.val())||(l.addClass("error"),v.text("3-24\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199"),b=!1),p.val().trim()==""&&(c.addClass("error"),m.text("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801"),b=!1),p.val().trim()!=f.val().trim()&&(c.addClass("error"),m.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"),b=!1),b){var C={code:a,detail:r,password:f.val().trim()};i.mobileLogin(C,function(T){T.success?(layer.close(e),layer.open({content:"\u8BBE\u7F6E\u5BC6\u7801\u6210\u529F",skin:"msg",time:2})):layer.open({content:"\u8BBE\u7F6E\u5BC6\u7801\u5931\u8D25\uFF0C",skin:"msg",time:2})})}})},content:''})},resetPasswordLayer:function(a,r){var i=window.roominfo;if(!i)return!1;var e=(i==null?void 0:i.isStrongPwd)==1,t=e?8:(i==null?void 0:i.passwordMin)||3,s=t+"-24\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",n=this;o("html, body").css({overflow:"hidden",height:"100%"});var l=layer.open({title:"\u91CD\u7F6E\u5BC6\u7801",className:"layui-layer-antd layui-layer-forget layui-layer-initeantd",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(c){var f=o(c),p=f.find(".resetBtn"),v=f.find(".password"),m=f.find(".confirm"),g=v.find(".istertxts"),h=m.find(".istertxts"),b=v.find(".form-explain"),C=m.find(".form-explain"),T=new RegExp("^[^]{"+t+",24}$");g.on("input",function(){v.removeClass("error"),o(this).val().trim()==""?(v.addClass("error"),b.text("\u8BF7\u8F93\u5165\u5BC6\u7801")):e?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/.test(g.val().trim())||(v.addClass("error"),b.text("8-24\u4F4D\u5BC6\u7801\uFF0C\u5305\u542B\u5927\u5199\u5B57\u6BCD\uFF0C\u5C0F\u5199\u5B57\u6BCD\uFF0C\u6570\u5B57")):T.test(o(this).val())||(v.addClass("error"),b.text(s))}),h.on("input",function(){m.removeClass("error"),o(this).val().trim()==""&&(m.addClass("error"),C.text("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801")),o(this).val().trim()!=g.val().trim()&&(m.addClass("error"),C.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"),j=!1)}),h.on("blur",function(){o(this).val().trim()!=g.val().trim()&&(m.addClass("error"),C.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"))});var j=!0;p.on("click",function(){if(j=!0,g.val().trim()==""?(v.addClass("error"),b.text("\u8BF7\u8F93\u5165\u5BC6\u7801"),j=!1):e?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/.test(g.val().trim())||(v.addClass("error"),b.text("8-24\u4F4D\u5BC6\u7801\uFF0C\u5305\u542B\u5927\u5199\u5B57\u6BCD\uFF0C\u5C0F\u5199\u5B57\u6BCD\uFF0C\u6570\u5B57"),b.css({fontSize:12}),j=!1):T.test(g.val())||(v.addClass("error"),b.text(s),b.css({fontSize:14}),j=!1),h.val().trim()==""&&(m.addClass("error"),C.text("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801"),j=!1),h.val().trim()!=g.val().trim()&&(m.addClass("error"),C.text("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!"),j=!1),j){var J={code:a,detail:r,password:g.val().trim()};n.ajaxSetPwd(J,function(u){u.success?(layer.close(l),layer.open({content:"\u91CD\u7F6E\u5BC6\u7801\u6210\u529F",skin:"msg",time:2})):layer.open({content:"\u91CD\u7F6E\u5BC6\u7801\u5931\u8D25\uFF0C",skin:"msg",time:2})})}})},content:''})},getPasswordLayer:function(){var a=this;o("html, body").css({overflow:"hidden",height:"100%"});var r=layer.open({title:"\u5FD8\u8BB0\u5BC6\u7801",className:"layui-layer-antd layui-layer-forget layui-layer-initeantd",skin:"nohasbtn",anim:"scale",scrollbar:!1,end:function(){o("html, body").css({overflow:"visible",height:"auto"})},success:function(i){var e=o(i),t=e.find(".mobile"),s=t.find(".resetPassWord"),n=e.find(".email"),l=n.find(".resetPassWord"),c=e.find(".repic a"),f="mobile";c.on("click",function(){c.removeClass("cur"),o(this).addClass("cur"),o(this).attr("data-ctype")=="mobile"?(f="mobile",t.show(),n.hide()):(f="email",t.hide(),n.show())});var p=e.find(".mobileNumber"),v=e.find(".mobileCode"),m=p.find(".istertxts"),g=p.find(".form-explain"),h=v.find(".istertxts"),b=v.find(".form-explain"),C=!1;isnologinlayertop(),m.on("input",function(){C=!0,p.removeClass("error"),o(this).val().trim()==""&&(p.addClass("error"),g.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),C=!1)}),m.on("blur",function(){C=!0,o(this).val().trim()==""?(p.addClass("error"),g.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),C=!1):/^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/.test(o(this).val())||(C=!1,p.addClass("error"),g.text("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801"))}),h.on("input",function(){v.removeClass("error"),o(this).val().trim()==""&&(v.addClass("error"),b.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"))});var T=t.find("a.yaned"),j=!0,J=!1;T.on("click",function(){C&&j?(j=!1,a.sendVerificationCode({detail:m.val().trim(),type:1},function(y){if(y.success){J=!0,C=!0;var S=60;T.css("color","#ccc"),T.text("\u5DF2\u53D1\u9001\uFF08"+S+"\uFF09");var V=setInterval(function(){S=S-1,T.text("\u5DF2\u53D1\u9001\uFF08"+S+"\uFF09"),S==0&&(j=!0,clearInterval(V),T.css("color","#666"),T.text("\u83B7\u53D6\u9A8C\u8BC1\u7801"))},1e3)}else j=!0,C=!1,p.addClass("error"),y.code=="404"?g.text("\u8BE5\u624B\u673A\u672A\u7ED1\u5B9A\u8D26\u53F7"):g.text(y.message)})):m.val().trim()==""&&(p.addClass("error"),g.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),C=!1)}),s.on("click",function(){var y=!0;if(m.val().trim()==""&&(p.addClass("error"),g.text("\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7"),y=!1),h.val().trim()=="")v.addClass("error"),b.text("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"),y=!1;else if(!J)return v.addClass("error"),b.text("\u8BF7\u5148\u83B7\u53D6\u9A8C\u8BC1\u7801"),!1;y&&C&&a.checkVerificationCode({code:h.val().trim(),detail:m.val().trim()},function(S){S.success?(a.resetPasswordLayer(h.val().trim(),m.val().trim()),layer.close(r)):(v.addClass("error"),b.text("\u9A8C\u8BC1\u7801\u4E0D\u6B63\u786E"))})});var u=e.find(".emailUrl"),P=e.find(".emailCode"),_=u.find(".istertxts"),A=u.find(".form-explain"),G=P.find(".istertxts"),B=P.find(".form-explain"),N=!1;_.on("input",function(){N=!0,u.removeClass("error"),o(this).val().trim()==""&&(u.addClass("error"),g.text("\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1"),N=!1)}),_.on("blur",function(){N=!0,o(this).val().trim()==""?(u.addClass("error"),A.text("\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1"),N=!1):/^\w+@\w+\.\w+(\.\w+)*$/.test(o(this).val())||(N=!1,u.addClass("error"),A.text("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740"))})},content:''})},getQRcodeLayer:function(a){var r=this,i=layer.open({type:1,title:"",skin:"layui-layer-antd layui-layer-QRcode",closeBtn:0,anim:2,scrollbar:!1,shadeClose:!0,cancel:function(e,t){},success:function(e,t){var s=o(e),n=s.find(".canvasQR");n.qrcode(location.href);var l=n.find("canvas"),c=s.find(".qrCoderImg"),f=l[0].toDataURL("image/jpg");console.log(f),c.attr("src",f);var p=new Date,v=p.getFullYear()+"_"+(p.getMonth()+1)+"_"+p.getDate()+"_"+(user.useInfo?user.useInfo.realName:"")+".jpg";c.attr("alt",v),c.click(function(){layer.close(i)})},content:''})},getCouponLayer:function(a,r){if(a.length<1)return layer.open({content:"\u4F18\u60E0\u5238\u5DF2\u7ECF\u88AB\u62A2\u5149\u4E86\uFF01",skin:"msg",time:2}),!1;var i=this;i.couponParams=r,o("html, body").css({overflow:"hidden",height:"100%"});var e=layer.open({type:1,title:"\u9886\u53D6\u4F18\u60E0\u5238",className:"layui-layer-antd ",anim:"scale",scrollbar:!1,end:function(t,s){o("html, body").css({overflow:"visible",height:"auto"})},success:function(t,s){var n=o(t),l=n.find(".couponBox");i.renderCouponList(a,l)},content:''})},renderCouponList:function(a,r){for(var i=this,e="",t=function(c){switch(parseInt(c.state)){case 1:return'\u7ACB\u5373\u9886\u53D6
';case 2:return'\u5DF2\u62A2\u5149
';case 3:return'\u5DF2\u9886\u53D6
'}},s=0,n=a.length;s'+(parseInt(l.couponType)==2?""+l.discount/10+"\u6298":"\xA5"+l.price/100+"")+'
'+l.couponName+'
"+t(l)+'
'+getTimeString(l.gmtStart)+"-"+getTimeString(l.gmtEnd)+"
"}r.html(e),i.bindClickCoupon(r)},bindClickCoupon:function(a){var r=this,i=a.find(".couponbtn");i.on("click",function(){var e=o(this).attr("data-couponId");if(!e)return!1;r.getShareCoupon({shareId:e},function(t){t.success&&r.getCdkey({id:t.data,refereeId:r.getCouponShareId()},function(s){s.success?(layer.open({content:"\u9886\u53D6\u6210\u529F\uFF01",skin:"msg",time:2}),r.getDressUpCouponShareList(r.couponParams,function(n){n.success&&r.renderCouponList(n.data,a)})):layer.open({content:"\u9886\u53D6\u5931\u8D25\uFF01"+s.message,skin:"msg",time:2})})})})}},setPagesFrom()})(jQuery,window);function getPar(o,d){var a=d||document.location.href,r=a.indexOf(o+"=");if(r==-1)return"";var i=a.slice(o.length+r+1),e=i.indexOf("&");return e!=-1&&(i=i.slice(0,e)),i}function getPagesFrom(){if(window.sessionStorage){var o=sessionStorage.getItem("pagefrom")||"";return o}else return""}function setPagesFrom(){try{var o=getPar("pagefrom");if(window.sessionStorage&&o!==""){sessionStorage.setItem("pagefrom",o);return}if(document.referrer){var d=document.referrer,a=window.location.hostname;if(d.indexOf(a)>-1)return;var r=getPar("pagefrom",d);window.sessionStorage&&sessionStorage.setItem("pagefrom",r)}}catch(i){console.log("\u83B7\u53D6\u6765\u6E90:",i)}}function isnologinlayertop(){var o=window.navigator.userAgent.toLowerCase(),d=o.indexOf("ucweb")>-1||o.indexOf("ucbrowser")>-1,a=o.indexOf("mqqbrowser")>-1,r=o.indexOf("heytapbrowser")>-1,i=o.indexOf("baiduboxapp")>-1,e=o.indexOf("huaweibrowser")>-1,t=o.indexOf("mzbrowser")>-1,s=!!window.navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);if((d||t||a||r||i||e)&&!s&&window.location.href.indexOf("livecourse_wap")>-1){var n=$("video").height();n&&$(".nohasbtn").css({top:n+10})}}function isJSON(o){if(typeof o=="string")try{var d=JSON.parse(o);return!!(typeof d=="object"&&d)}catch(a){return!1}}function getTimeString(o){if(new Date(parseInt(o))=="Invalid Date"&&new Date(parseInt(o)*1e3)=="Invalid Date")return"--";var d=new Date(parseInt(o)),a=d.getFullYear(),r=d.getMonth()+1,i=d.getDate();return a+"."+r+"."+i}function setCookie(o,d){var a=o+"="+d+";path=/";document.cookie=a}function getCookie(o){for(var d=document.cookie,a=d.split("; "),r=0;r>2,l=(e&3)<<4|t>>4,c=(t&15)<<2|s>>6,f=s&63,isNaN(t)?c=f=64:isNaN(s)&&(f=64),i=i+o.charAt(n)+o.charAt(l)+o.charAt(c)+o.charAt(f);return i},this.decode=function(r){var i="",e,t,s,n,l,c,f,p=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");p>4,t=(l&15)<<4|c>>2,s=(c&3)<<6|f,i=i+String.fromCharCode(e),c!=64&&(i=i+String.fromCharCode(t)),f!=64&&(i=i+String.fromCharCode(s));return i=a(i),i};var d=function(r){r=r.replace(/\r\n/g,`
`);for(var i="",e=0;e127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},a=function(r){for(var i="",e=0,t=0,s=0,n=0,l=0;e191&&t<224?(n=r.charCodeAt(e+1),i+=String.fromCharCode((t&31)<<6|n&63),e+=2):(n=r.charCodeAt(e+1),l=r.charCodeAt(e+2),i+=String.fromCharCode((t&15)<<12|(n&63)<<6|l&63),e+=3);return i}}(function(o,d){var a=4;function r(s){if(this.options={id:"",canvasId:"verifyCanvas",width:"100",height:"30",type:"blend",code:""},Object.prototype.toString.call(s)=="[object Object]")for(var n in s)this.options[n]=s[n];else this.options.id=s;this.options.numArr="0,1,2,3,4,5,6,7,8,9".split(","),this.options.letterArr=i(),this._init(),this.refresh()}r.prototype={version:"1.0.0",_init:function(){var s=d.getElementById(this.options.id),n=d.createElement("canvas");this.options.width=s.offsetWidth>0?s.offsetWidth:"100",this.options.height=s.offsetHeight>0?s.offsetHeight:"30",n.id=this.options.canvasId,n.width=this.options.width,n.height=this.options.height,n.style.cursor="pointer",n.innerHTML="\u60A8\u7684\u6D4F\u89C8\u5668\u7248\u672C\u4E0D\u652F\u6301canvas",s.appendChild(n);var l=this;n.onclick=function(){l.refresh()}},refresh:function(){this.options.code="";var s=d.getElementById(this.options.canvasId);if(s.getContext)var n=s.getContext("2d");else return;if(n.textBaseline="middle",n.fillStyle=t(180,240),n.fillRect(0,0,this.options.width,this.options.height),this.options.type=="blend")var l=this.options.numArr.concat(this.options.letterArr);else if(this.options.type=="number")var l=this.options.numArr;else var l=this.options.letterArr;for(var c=1;c<=a;c++){var f=l[e(0,l.length)];this.options.code+=f,n.font=30+"px SimHei",n.fillStyle=t(50,160),n.shadowOffsetX=e(-1,1),n.shadowOffsetY=e(-1,1),n.shadowBlur=e(-2,2),n.shadowColor="rgba(0, 0, 0, 0.3)";var p=this.options.width/(a+1)*(c-1)+10,v=this.options.height/2,m=e(-15,15);n.translate(p,v),n.rotate(m*Math.PI/180),n.fillText(f,0,0),n.rotate(-m*Math.PI/180),n.translate(-p,-v)}},validate:function(s){var s=s.toLowerCase(),n=this.options.code.toLowerCase();return s==n?!0:(this.refresh(),!1)}};function i(){var s="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";return s.split(",")}function e(s,n){return Math.floor(Math.random()*(n-s)+s)}function t(s,n){var l=e(s,n),c=e(s,n),f=e(s,n);return"rgb("+l+","+c+","+f+")"}o.GVerify=r})(window,document);