filesbox/web/dist/design/designstatic/home/waphome/js/module.js

3 lines
41 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(function(l,h){var p=navigator.userAgent;if(!i||s)return!1;var c=l("html"),n=c.width()/10,a=parseFloat(c.css("fontSize")),r=n/a,e=n*r;t(),l(document).ready(function(){t(),setTimeout(function(){t()},300)});function t(){if(e==1)return!1;c.css("fontSize",n+"px"),l("meta[name=viewport]").attr("content","initial-scale="+r+", maximum-scale="+r+", minimum-scale="+r+", user-scalable=no")}function i(){return/(Android).*/i.test(p)}function s(){return/MiuiBrowser/gi.test(p)}})(jQuery,window),function(l,h){var p={init:function(){var c=this;c.getValue("token")&&(c.setCookie("token",c.getValue("token")),c.setCookie("openid",c.getValue("openid"))),h.location.href.indexOf("/mp/index.shtml")>-1||h.location.href.indexOf("/pages/routine/")>-1?(c.miniprogram=!0,localStorage.miniprogram=!0):(c.miniprogram=!1,localStorage.miniprogram=!1)},getValue:function(c){var n=n||window.location.href,a=n.split("?");if(a.length==1)return null;if(a.length==2){for(var s=a[1].split("&"),o={},r=0;r<s.length;r++){var e=s[r].split("=");o[e[0]]=e[1]}return o[c]?o[c]:!1}if(a.length==3){for(var s=a[1].split("&"),t=!1,o={},r=0,i=s.length;r<i;r++){var e=s[r].split("=");o[e[0]]=e[1],r+1==i&&e[0]==c&&(t=!0)}return o[c]?t?o[c]+"?"+a[2]:o[c]:!1}for(var s=a[1].split("&"),o={},r=0;r<s.length;r++){var e=s[r].split("=");o[e[0]]=e[1]}return o[c]?o[c]:!1},setCookie:function(c,n){var a=30,r=new Date;r.setTime(r.getTime()+a*24*60*60*1e3);var e=c+"="+n+";path=/;expires="+r.toGMTString();document.cookie=e}};p.init(),window.tokenjs=p}(jQuery,window),document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/home/js/ase.min.js"></script>'),document.write('<link rel="stylesheet" href="/design/designstatic/common/css/userMobile.css">'),document.write('<link rel="stylesheet" href="/design/designstatic/home/iconfont/iconfont.css">'),document.write('<script type="text/javascript" charset="utf-8" src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>'),document.write('<link rel="stylesheet" href="/design/designstatic/design/css/select2.min.css">'),document.write('<script type="text/javascript" charset="utf-8" src="/js/ddlogin.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/js/wwlogin.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/js/wxlogin.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/home/waphome/js/layerMobile/layer.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/common/js/jquery.qrcode.min.js"></script>');var scriptUrl="/design/designstatic/common/js/userMobile.js";loadScriptmin(scriptUrl,function(){var l=window.user,h=window.tokenjs,p=window.player,c={loginCount:0,init:function(){if(h.getValue("errorCode")){var a=parseInt(h.getValue("errorCode")),r="";switch(a){case 602:r="\u975E\u7F51\u6821\u7528\u6237\u7981\u6B62\u767B\u5F55";break;case 606:r="\u5F53\u524D\u8D26\u53F7\u4E0D\u5B58\u5728";break;case 509:r="\u5DF2\u5F00\u542F\u8BBE\u5907\u9650\u5236\uFF0C\u60A8\u53EA\u80FD\u5728\u56FA\u5B9A\u8BBE\u5907\u4E0A\u8FDB\u884C\u767B\u5F55";break;case 601:r="\u5DF2\u7ED1\u5B9A\u5176\u4ED6\u8D26\u53F7";break;case 602:r="\u7528\u6237\u8D26\u53F7\u88AB\u9501\u5B9A";break;case 606:r="\u7528\u6237\u8D26\u53F7\u88AB\u5220\u9664";break;case 707:r="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break;case 709:r="\u975E\u7F51\u6821\u7528\u6237\u4E0D\u80FD\u8FDB\u5165";break}r&&(layer?layer.open({content:r,skin:"msg",time:2}):alert(r)),window.history.replaceState(null,null,"/")}var e=this;e.getLoginUser(),setTimeout(function(){e.handleBtn()},0),h.getValue("redirectUrl")&&!getCookie("token")&&l.loginLayer(function(s){s.success&&(window.location.href=h.getValue("redirectUrl"))}),h.getValue("redirect")&&!getCookie("token")&&l.loginLayer(function(s){s.success&&(window.location.href=h.getValue("redirect")+"?cwid="+h.getValue("cwid")+"&courseId="+h.getValue("courseId"))});var t=localStorage.getItem("queryusernameloginShow");if(t&&Date.parse(new Date)-JSON.parse(unescape(t)).time<1e4)
`);for(var n="",a=0;a<c.length;a++){var r=c.charCodeAt(a);r<128?n+=String.fromCharCode(r):r>127&&r<2048?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(r&63|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(r&63|128))}return n},p=function(c){for(var n="",a=0,r=0,e=0,t=0,i=0;a<c.length;)r=c.charCodeAt(a),r<128?(n+=String.fromCharCode(r),a++):r>191&&r<224?(t=c.charCodeAt(a+1),n+=String.fromCharCode((r&31)<<6|t&63),a+=2):(t=c.charCodeAt(a+1),i=c.charCodeAt(a+2),n+=String.fromCharCode((r&15)<<12|(t&63)<<6|i&63),a+=3);return n}}