window.tsnfors=getPar("targetServerNameForOverride")||getPar("host")?"?targetServerNameForOverride="+(getPar("targetServerNameForOverride")||getPar("host")):"";function getPar(y,I){var S=I||document.location.href,v=S.indexOf(y+"=");if(v==-1)return"";var f=S.slice(y.length+v+1),p=f.indexOf("&");return p!=-1&&(f=f.slice(0,p)),f}if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent))document.write('');else{let y=function(o,d){var t=document.createElement("script");t.type="text/javascript",t.readyState?t.onreadystatechange=function(){(t.readyState=="loaded"||t.readyState=="complete")&&(t.onreadystatechange=null,d(window.wxFocus))}:t.onload=function(){d(window.wxFocus)},t.src=o,document.body.appendChild(t)},I=function(o){var d=document.createElement("div"),t=document.createTextNode(o);return d.appendChild(t),d.innerHTML},S=function(o,d){switch(o){case 0:return d?"\u661F\u671F\u5929":"sunday";case 1:return d?"\u661F\u671F\u4E00":"monday";case 2:return d?"\u661F\u671F\u4E8C":"Tuesday";case 3:return d?"\u661F\u671F\u4E09":"Wednesday";case 4:return d?"\u661F\u671F\u56DB":"Thursday";case 5:return d?"\u661F\u671F\u4E94":"Friday";case 6:return d?"\u661F\u671F\u516D":"saturday"}},v=function(o,d){if(new Date(parseInt(o))=="Invalid Date"&&new Date(parseInt(o)*1e3)=="Invalid Date")return"--";new Date(parseInt(d))=="Invalid Date"&&new Date(parseInt(d)*1e3)=="Invalid Date"&&(d=Date.parse(new Date));var t=d-o;if(t<0)return"\u521A\u521A";if(t<6e4)return parseInt(t/1e3,10)+" \u79D2\u524D";if(t<3600*1e3)return parseInt(t/1e3/60,10)+" \u5206\u949F\u524D";if(t<24*3600*1e3)return parseInt(t/1e3/3600,10)+" \u5C0F\u65F6\u524D";if(t<30*24*3600*1e3)return parseInt(t/1e3/3600/24,10)+" \u5929\u524D";var n=new Date(parseInt(o)),e=parseInt(n.getMonth()+1)<10?"0"+(n.getMonth()+1):n.getMonth()+1,a=parseInt(n.getDate())<10?"0"+n.getDate():n.getDate(),i=parseInt(n.getHours())<10?"0"+n.getHours():n.getHours(),r=parseInt(n.getMinutes())<10?"0"+n.getMinutes():n.getMinutes();return n.getFullYear()+"-"+e+"-"+a+"-"+i+"-"+r},f=function(o,d,t){var n=this,e=document.createElement("script");e.type="text/javascript",e.readyState?e.onreadystatechange=function(){(e.readyState=="loaded"||e.readyState=="complete")&&(e.onreadystatechange=null,d.bind(n)(t))}:e.onload=function(){d.bind(n)(t)},e.src=o,document.body.appendChild(e)},p=function(o){for(var d=window.location.search.substring(1),t=d.split("&"),n=0;n'),document.write(''),document.write(''),document.write(''),document.write(''),document.write(''),document.write(''),document.write('');var scriptUrl="/design/designstatic/common/js/user.js?my_version=",wxFocusUrl="/design/designstatic/common/js/wxFocus.js";f(scriptUrl,function(){var o=window.user,d={loginCount:0,init:function(){if(p("errorCode")){var t=parseInt(p("errorCode")),n="";switch(t){case 602:n="\u975E\u7F51\u6821\u7528\u6237\u7981\u6B62\u767B\u5F55";break;case 606:n="\u5F53\u524D\u8D26\u53F7\u4E0D\u5B58\u5728";break;case 509:n="\u5DF2\u5F00\u542F\u8BBE\u5907\u9650\u5236\uFF0C\u60A8\u53EA\u80FD\u5728\u56FA\u5B9A\u8BBE\u5907\u4E0A\u8FDB\u884C\u767B\u5F55";break;case 601:n="\u5DF2\u7ED1\u5B9A\u5176\u4ED6\u8D26\u53F7";break;case 602:n="\u7528\u6237\u8D26\u53F7\u88AB\u9501\u5B9A";break;case 606:n="\u7528\u6237\u8D26\u53F7\u88AB\u5220\u9664";break;case 707:n="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break;case 709:n="\u975E\u7F51\u6821\u7528\u6237\u4E0D\u80FD\u8FDB\u5165";break}n&&(window.layer?window.layer.msg(n,{icon:5}):alert(n)),window.history.replaceState&&window.history.replaceState(null,null,"/")}var e=this,a=localStorage.getItem("ap");if(a&&JSON.parse(unescape(a)).time-Date.parse(new Date)<1e4){var i=JSON.parse(unescape(a));o.login(i.a,i.p,function(r){r.success&&e.getLoginUser()})}else e.getLoginUser();e.handleBtn(),e.handleClickHref(),e.bindGoBuyCar()},getLoginUser:function(t,n){var e=this;getCookie("token")?o.isLogin(function(a){if(a.success){e.loginUserData=a.data,window.loginUserResponse=a,e.login(a.data,a.timeStamp);var i=window.location;if(t)if(p("redirect"))$("body").append('
\u6B63\u5728\u8DF3\u8F6C\u4E2D\u3002\u3002\u3002
'),setTimeout(function(){i.href=p("redirect")},100);else if(i.pathname=="/"){var r=$('.module[data-jump="1"]').length>0;r?i.reload():($("body").append('
\u6B63\u5728\u8DF3\u8F6C\u4E2D\u3002\u3002\u3002
'),a.data.userTypeExact=="STUDENT"?setTimeout(function(){i.href=window.basePath?"/"+window.basePath+"#/":"/#/"},100):setTimeout(function(){i.href=window.basePath?"/"+window.basePath+"#/":"/#/"},100))}else i.reload()}else e.unlogin(!0);e.realName(a.timeStamp)}):(e.unlogin(),e.realName())},carryStorageLogin:function(){var t=this;if(localStorage.isSaveAPWordKey&&window.CryptoJS&&window.decrypt&&t.loginCount<2){t.loginCount++;var n=decrypt(localStorage.isSaveAPWordKey),e=JSON.parse(n),a=e.a,i=e.b,r=+e.t;Date.now()-r<3600*1e3*24*10&&o.login(a,i,function(c){if(c.success)t.getLoginUser(!0);else{var s=c.message;switch(parseInt(c.code)){case 200:s="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165";break;case 400:s="\u8BE5\u7F51\u6821\u9700\u8981\u4F7F\u7528\u9501\u5C4F\u6D4F\u89C8\u5668\u767B\u5F55";break;case 403:s="\u8D26\u53F7\u7C7B\u578B\u4E0D\u6B63\u786E";break;case 503:s="\u5DF2\u88AB\u9650\u5236\u767B\u5F55";break;case 707:s="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break}if(c.success){var l=c.data;if(l){var u=l.errCode;u=="4012"?s="\u8D85\u8FC7\u9650\u5236\u6B21\u6570"+l.limitCount+"\u6B21\uFF0C\u8BF7"+l.denyTime/60+"\u5206\u949F\u540E\u91CD\u8BD5":s="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}else s="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}window.layer?layer.msg(s,{icon:1}):alert(s)}})}},realName:function(t){var n=this,e=t?parseInt(t):Date.parse(new Date),a;n.nowTime(e);var i=new Date(e).getMinutes(),r=(60-i)*1e3;setTimeout(function(){e=e+r,n.nowTime(e),a=setInterval(function(){e=e+6e4,n.nowTime(e),n.minutes||clearInterval(a)},6e4)},r),a=setInterval(function(){e=e+6e4,n.nowTime(e),n.minutes||clearInterval(a)},6e4)},nowTime:function(t){for(var n=this,e=$(".module[data-type=time]"),a=0,i=e.length;a'+(l.indexOf("headImg")>-1?'
-1?a.headPortrait:(window.cdnPath||"")+a.headPortrait)+'">
':"")+(l.indexOf("username")>-1?'
'+I(a.name||a.nickname||"\u4F5A\u540D")+"
":"")+(l.indexOf("account")>-1?'
'+I(a.name)+"
":"")+(l.indexOf("lasttime")>-1?'
'+v(a.lastLogin,n)+"
":"")+'
\u7ACB\u5373\u8FDB\u5165
\u9000\u51FA\u8D26\u53F7
';s.html(u)}for(var g=$(".module[data-type=registerLogin]"),m=0,b=g.length;m'+I(a.nickname||t.name||"\u4F5A\u540D")+' | \u9000\u51FA';s.html(C)}$(".quitBtn").on("click",function(){o.loginout(function(w){if(w.success){localStorage.ap="";try{myextension.delphicallback(1401,"")}catch(x){console.log("\u975E\u65E0\u6781\u6D4F\u89C8\u5668")}window.location.reload()}})})},newLogin:function(t,n,e){var a,i=(n==null?void 0:n.user)||{};t.attr("data-after")?a=t.attr("data-after"):a='
-1?i.headPortrait:(window.cdnPath||"")+i.headPortrait)+'">
\u4F5A\u540D
\u8D26\u53F7
1 \u5206\u949F\u524D
\u7ACB\u5373\u8FDB\u5165
\u9000\u51FA\u8D26\u53F7
',t.html(a),t.find(".head img").attr("src",i.headPortrait.indexOf("http")>-1?i.headPortrait:(window.cdnPath||"")+i.headPortrait),t.find(".realName").text(i.nickname||i.name||"\u4F5A\u540D"),t.find(".loginname").text(i.name),t.find(".lastLogin").text(v(i.lastLogin,e)),t.find(".going").on("click",function(){$(this).text("\u6B63\u5728\u8FDB\u5165"),window.location.href=n.userTypeExact=="STUDENT"?"/myroom/#/":"/aroom/#/"})},unlogin:function(t){var n=this;clearTimeout(n.storageLoginTime),n.storageLoginTime=setTimeout(function(){n.carryStorageLogin()},300);for(var e=$(".module[data-type=login]"),a=0,i=e.length;a\u767B\u5F55';if(r.html(u),t){for(var g=r.find(".loginEvent"),a=0,i=g.length;a
';e.before(i);var r=t.find(".codeBox"),c=e.css("top"),s=e.css("left"),l=e.width(),u=t.height();t.find(".yaned").on("click",function(){$(this).attr("src","/api/user/getVerifyImageCode?cType=2&height=36&width=98&v="+parseInt(Math.random()*100))}),t.css({height:u+50}),r.css({left:s,top:parseInt(c)-15,width:l}),e.css({top:parseInt(c)+55})},bindNewLoginEvent:function(t){var n=this;t.html(t.attr("data-before"));var e=t.find(".eyesModule"),a=t.find("input.account"),i=t.find("input.password"),r=t.find(".submit");e.css("backgroundImage","url(/design/designstatic/home/image/login_icon.png)"),e.on("click",function(){e.hasClass("open")?(e.removeClass("open"),i.attr("type","password")):(e.addClass("open"),i.attr("type","text"))}),t.on("keydown",function(c){c.keyCode==13&&r.click()}),r.on("click",function(){var c=a.val(),s=i.val();if(r.find(".tip").remove(),!c)return r.append('\u8BF7\u8F93\u5165\u8D26\u53F7'),!1;if(!s)return r.append('\u8BF7\u8F93\u5165\u5BC6\u7801'),!1;o.login(c,s,function(l){if(l.success)n.getLoginUser(!0);else{var u=l.message;switch(parseInt(l.code)){case 200:u="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165";break;case 400:u="\u8BE5\u7F51\u6821\u9700\u8981\u4F7F\u7528\u9501\u5C4F\u6D4F\u89C8\u5668\u767B\u5F55";break;case 403:u="\u8D26\u53F7\u7C7B\u578B\u4E0D\u6B63\u786E";break;case 503:u="\u5DF2\u88AB\u9650\u5236\u767B\u5F55";break;case 707:u="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break}if(l.success){var g=l.data;if(g){var m=g.errCode;m=="4012"?u="\u8D85\u8FC7\u9650\u5236\u6B21\u6570"+g.limitCount+"\u6B21\uFF0C\u8BF7"+g.denyTime/60+"\u5206\u949F\u540E\u91CD\u8BD5":u="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}else u="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}r.append(''+u+"")}})})},bindLoginEvent:function(t){var n=this,e=t.find(".account"),a=t.find(".password"),i=t.find(".eyesModule"),r=t.find(".accountRemoveModule"),c=t.find(".checkboxDiv"),s=t.find(".logindrag");if(i.css("backgroundImage","url(/design/designstatic/home/image/login_icon.png)"),i.on("click",function(){i.hasClass("open")?(i.removeClass("open"),a.attr("type","password")):(i.addClass("open"),a.attr("type","text"))}),r.on("click",function(){e.val("")}),s.length&&$.getScript("/design/designstatic/design/js/drag.js",function(){s.html(""),setTimeout(function(){s.drag()},200)}),localStorage.isSaveAPWordKeyNoOn&&c.removeClass("on"),c.on("click",function(){c.hasClass("on")?(c.removeClass("on"),localStorage.removeItem("isSaveAPWordKey")):c.addClass("on")}),localStorage.isSaveAPWordKey&&window.CryptoJS&&window.decrypt){var l=decrypt(localStorage.isSaveAPWordKey),u=JSON.parse(l),g=u.a,m=u.b;e.val(g),a.val(m)}$(".languageBox").length&&$.getScript("/design/designstatic/design/js/select2.min.js",function(){setTimeout(function(){$(".languageBox").html(``);var b=$(".languageBox .language").select2({minimumResultsForSearch:-1,width:"100%"});b.val([localStorage.getItem("umi_locale")||"zh-CN"]).trigger("change")},200)}),t.on("keydown",function(b){b.keyCode==13&&t.find(".submit").click()}),t.find(".submit").on("click",function(){var b=e.find("input").val(),C=a.find("input").val();if(e.find(".tip").remove(),a.find(".tip").remove(),!b)return e.append('\u8BF7\u8F93\u5165\u8D26\u53F7'),!1;if(!C)return a.append('\u8BF7\u8F93\u5165\u5BC6\u7801'),!1;o.login(b,C,function(w){if(w.success)n.getLoginUser(!0);else{var x=t.find(".password"),k=w.message;switch(parseInt(w.code)){case 200:k="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165";break;case 400:k="\u8BE5\u7F51\u6821\u9700\u8981\u4F7F\u7528\u9501\u5C4F\u6D4F\u89C8\u5668\u767B\u5F55";break;case 403:k="\u8D26\u53F7\u7C7B\u578B\u4E0D\u6B63\u786E";break;case 503:k="\u5DF2\u88AB\u9650\u5236\u767B\u5F55";break;case 707:k="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break}if(w.success){var E=w.data;if(E){var P=E.errCode;P=="4012"?k="\u8D85\u8FC7\u9650\u5236\u6B21\u6570"+E.limitCount+"\u6B21\uFF0C\u8BF7"+E.denyTime/60+"\u5206\u949F\u540E\u91CD\u8BD5":k="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}else k="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}x.append(''+k+"")}})})},handleClickHref:function(){var t=this,n=$(".module[data-clickhref][data-type=group]");n.on("click",function(e){designUploadPoint($(this));for(var a=$(e.target),i=a.parents(),r=!0,c=0,s=i.length;c-1||g.indexOf("/myroom/#")>-1||g.indexOf("/pay/#")>-1){var m=window.user,b=function(w){w=="STUDENT"?g.indexOf("/pay/#")>-1?window.location.href=g.indexOf("/pay/#/")>-1?g:window.basePath?"/"+window.basePath+"#/":"/#/":window.location.href=g.indexOf("/myroom/#/")>-1?g:window.basePath?"/"+window.basePath+"#/":"/#/":window.location.href=g.indexOf("/aroom/#/")>-1?g:window.basePath?"/"+window.basePath+"#/":"/#/"},C=function(){m.loginLayer(function(w){w.success&&m.isLogin(function(x){x.success&&b(x.data.userTypeExact)})})};getCookie("token")||getCookie("stoken")?m.isLogin(function(w){w.success?b(w.data.userTypeExact):C()}):C()}else u.attr("data-clicktarget")=="_blank"?location.open=g:location.href=g}})},handleBtn:function(){for(var t=this,n=$(".module[data-handle=login]"),e=0,a=n.length;e0&&e.length>0&&designUploadPoint(e)})},bindBeforeEvent:function(t,n){return designUploadPoint(n,!0),t.stopPropagation(),!($(t.target).attr("href")&&n.attr("data-type")=="group")},bindLoginBtnEvent:function(t){var n=t.parents(".module[data-type=registerLogin]").attr("data-login");n&&(n=JSON.parse(n));var e=this;t.on("click",function(a){if(e.bindBeforeEvent(a,$(this))){window.location=location.origin+(window.basePath?"/"+window.basePath+"#/":"/#/")+"login";return}})},bindRegisterEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.registerLayer(function(a){a.success&&n.getLoginUser(!0)})})},bindRegisterSchoolEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.registerSchoolLayer()})},bindQQloginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.loginQQ()})},bindWechatLoginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.qrcodeloginWeChat()})},bindenWechatLoginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.qrcodeloginenWeChat()})},binddingdingLoginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.qrcodelogindingding()})},bindappLoginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.qrcodeloginapp()})},binddialogEvent:function(t){var n=this;t.on("click",function(e){if(n.bindBeforeEvent(e,$(this))){var a=t.attr("data-href")?JSON.parse(t.attr("data-href")):{};o.dialogBtnx(a)}})},bindWeiboLoginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.loginWeiBo()})},bindAlipayLoginEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.loginAlipay()})},bindGetPasswodEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.getPasswordLayer()})},bindGetUsernameEvent:function(t,n){var e=this;t.on("click",function(a){e.bindBeforeEvent(a,$(this))&&o.getUsernameLayer(n)})},bindGetExchangecouponEvent:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.isLogin(function(a){a.success?o.getExchangecoupon():o.loginLayer()})})},bindGoBack:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&window.history.go(-1)})},BindQRcode:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&o.getQRcodeLayer()})},BindCollectionCoupon:function(t){var n=this;t.on("click",function(e){n.bindBeforeEvent(e,$(this))&&(window.user.useInfo?n.carryCouponEvent(t):o.loginLayer(function(){n.carryCouponEvent(t,!0)}))})},carryCouponEvent:function(t,n){var e=this,a=JSON.parse(t.attr("data-href")),i=a.data.couponKeys.join(","),r=void 0;if(window.decrypt&&localStorage.encryptId){var c=window.decrypt(localStorage.encryptId).split(",");n?c.length>0&&(r=c[0]):c.length>1&&(r=c[1])}o.getDressUpCouponShareList({couponIds:i,shareId:r},function(s){s.success&&o.getCouponLayer(s.data,{couponIds:i,shareId:r})})},bindGoBuyCar:function(){var t=this;$("[data-event=goBuyCar]").on("click",function(){var n=$(this).parent().attr("data-href");t.loginUserData?t.goBuyCarEvent(n):o.loginLayer(function(e){e.success&&t.goBuyCarEvent(n)})})},goBuyCarEvent:function(t){var n=this,e=isJSON(t)?JSON.parse(t):!1;if(!e)return!1;var a=e.data,i="",r=[""],c=n.getParam("diliater")||"";window.base64&&(i=n.getParam("shareId")?base64.decode(n.getParam("shareId")):""),window.decrypt&&(r=decrypt(c).split(","));var s=[{goodsId:a.vipId,price:a.price,goodsUrl:location.origin+"/pages/memberDetail.html?vipId="+a.vipId,goodsType:"7",goodsName:a.vipName,cover:a.cover,introduce:a.remark,endTime:a.deadline}];$.ajax({type:"POST",headers:{token:getCookie("token")},url:"/api/order/shoppingCart"+window.tsnfors,contentType:"application/json",dataType:"json",data:JSON.stringify({goodsList:s,clientType:n.getclueChannel(),shareUserId:i||(r.length>1?r[1]:""),pvid:sessionStorage.pvid,uvcid:localStorage.uvcid}),async:!0,success:function(l){l.success&&(location.href="/pay/#/shopping")}})},setclueChannel:function(){var t=this,n=localStorage.appAdapt===!0||localStorage.appAdapt==="true";if(localStorage.uvcid||(localStorage.uvcid=t.getNum()+""+new Date().valueOf()),getCookie("returnreport")!="1"&&!sessionStorage.getItem("pvid")&&sessionStorage.setItem("pvid",t.getNum()+""+new Date().valueOf()),!n){var e=getCookie("Referer")?decodeURIComponent(getCookie("Referer")):document.referrer,a=window.location.origin,i=window.location.href,r=!sessionStorage.getItem("cluechannel"),c=e.indexOf(a)!=0;if(c||r){var s=t.getclueChannel(),l=t.getcluesourceType(),u=l.sourceType,g=l.sourceId,m=new Date().valueOf(),b={desc:"",refer:e.indexOf(a)!=0&&e.indexOf(window.location.host)!=8&&e.indexOf(window.location.host)!=7?encodeURIComponent(e):"",type:t.getParam("channel")||"",internalUrl:encodeURIComponent(i)},C={channel:s,sourceJson:JSON.stringify(b),sourceType:u,sourceId:g,gmtStart:m},w="",x=[""],k=t.getParam("diliater")||"",E=new Base64;E.decode&&(w=t.getParam("shareId")?parseInt(E.decode(t.getParam("shareId"))):""),window.decrypt&&(x=decrypt(k).split(",")),(w||(x.length>1?x[1]:"")||(x.length>0?x[0]:""))&&(C.shareUserId=w||(x.length>1?x[1]:"")||(x.length>0?x[0]:"")),sessionStorage.setItem("cluechannel",JSON.stringify(C)),setCookie("Referer","")}}},getNum:function(){for(var t=["0","1","2","3","4","5","6","7","8","9","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"],n="",e=0;e<32;e++){var a=parseInt(Math.random()*61);n+=t[a]}return n},getcluesourceType:function(){var t=this,n=t.getParam("sourceType")||window.information_sourceType||"",e=t.getParam("sourceId")||window.information_sourceId||0,a=window.location.href;return a.indexOf("shop/item.html")>=0&&(n="4",e=t.getParam("itemid")||0),(a.indexOf("designschool/form/answer.html")>=0||a.indexOf("pages/company/answer.html")>=0||a.indexOf("/portal/form.html")>=0)&&(n="5",e=t.getParam("formId")||0),location.pathname.indexOf("pubinfo")>=0&&location.pathname.indexOf("html")>=0&&(n="1",e=e),(a.indexOf("pages/info.html")>=0||a.indexOf("pages/wap/info.html")>=0)&&(n="3",e=t.getParam("cid")||0),(a.indexOf("pages/bundle.html")>=0||a.indexOf("pages/wap/bundle.html")>=0)&&(n="C",e=t.getParam("cid")||0),(a.indexOf("pages/memberDetail.html")>=0||a.indexOf("shop/vipItem.html")>=0)&&(n="D",e=t.getParam("vipId")||t.getParam("itemid")||0),(a.indexOf("pages/ware.html")>=0||a.indexOf("pages/wap/ware.html")>=0)&&(n="B",e=t.getParam("rid")||0),{sourceType:n,sourceId:e}},getclueChannel:function(){var t=this,n=navigator.userAgent.toLowerCase(),e;if(window.__wxjs_environment==="miniprogram")e=4;else if(n.match(/MicroMessenger/i)=="micromessenger"){var a={win:!1,mac:!1},i=navigator.platform;a.win=i.indexOf("Win")==0,a.mac=i.indexOf("Mac")==0,a.win||a.mac?e=9:e=1}else localStorage.appAdapt===!0||localStorage.appAdapt==="true"?e=t.getParam("channel")||5:t.getParam("channel")?e=t.getParam("channel"):/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)?e=2:e=3;return e},getClientInfo:function(){var t=this;$.ajax({type:"get",url:"/api/common/getClientInfo"+window.tsnfors,data:{},contentType:"application/json;charset=utf-8",dataType:"json",success:function(n){if(n.success){var e=n.data||{},a=e.ip||"";sessionStorage.setItem("sourceip",a)}},error:function(n){console.log("\u63A5\u53E3\u8BF7\u6C42\u5931\u8D25")}})},getParam:function(t,n){var e=n||document.location.href,a=e.indexOf(t+"=");if(a==-1)return"";var i=e.slice(t.length+a+1),r=i.indexOf("&");return r!=-1&&(i=i.slice(0,r)),i}};window.mainHome=d,d.init()}),Function.prototype.bind||(Function.prototype.bind=function(o){if(typeof this!="function")throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var d=Array.prototype.slice.call(arguments,1),t=this,n=function(){},e=function(){return t.apply(this instanceof n&&o?this:o,d.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,e.prototype=new n,e}),setTimeout(function(){h()},1200),document.write(''),document.write(''),document.write(''),$(".module[data-type=search").length>0&&document.write(''),$(".module[data-type=carousel").length>0&&document.write(''),$(".module[data-type=loginBox]").length>0&&document.write(''),$(".module[data-type=article]").length>0&&document.write(''),$(".module[data-menuopenstyle]").length>0&&document.write(''),($(".module[data-type=player]").length>0||$(".module[data-handle=audition]").length>0)&&document.write(''),$(".module[data-type=MP3]").length>0&&(document.write(''),document.write('')),!window.getPage&&!window.secondShareHtml&&document.write('')}function designUploadPoint(y,I){try{var S=y.data("mid")||"",v=y.data("type")||"",f=y.data("handle")||"",p=y.find("a"),h=p.attr("href")||"",o=y.clone();o.find("style").remove();var d=o.text()||"";d=d.replace(/[\r\n]/g,""),d=d.replace(/\ +/g,"");var t=window.location.hostname,n=window.location.pathname,e={id:S,type:v,text:d,handle:f,pageTo:h,hostname:t}}catch(a){console.log("designUploadPoint:",a)}}function Base64(){var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.encode=function(v){var f="",p,h,o,d,t,n,e,a=0;for(v=I(v);a>2,t=(p&3)<<4|h>>4,n=(h&15)<<2|o>>6,e=o&63,isNaN(h)?n=e=64:isNaN(o)&&(e=64),f=f+y.charAt(d)+y.charAt(t)+y.charAt(n)+y.charAt(e);return f},this.decode=function(v){var f="",p,h,o,d,t,n,e,a=0;for(v=v.replace(/[^A-Za-z0-9\+\/\=]/g,"");a>4,h=(t&15)<<4|n>>2,o=(n&3)<<6|e,f=f+String.fromCharCode(p),n!=64&&(f=f+String.fromCharCode(h)),e!=64&&(f=f+String.fromCharCode(o));return f=S(f),f};var I=function(v){v=v.replace(/\r\n/g,` `);for(var f="",p=0;p127&&h<2048?(f+=String.fromCharCode(h>>6|192),f+=String.fromCharCode(h&63|128)):(f+=String.fromCharCode(h>>12|224),f+=String.fromCharCode(h>>6&63|128),f+=String.fromCharCode(h&63|128))}return f},S=function(v){for(var f="",p=0,h=0,o=0,d=0,t=0;p191&&h<224?(d=v.charCodeAt(p+1),f+=String.fromCharCode((h&31)<<6|d&63),p+=2):(d=v.charCodeAt(p+1),t=v.charCodeAt(p+2),f+=String.fromCharCode((h&15)<<12|(d&63)<<6|t&63),p+=3);return f}}