filesbox/web/dist/design/mobile/js/module.big.js

2 lines
35 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(function(l,g){var h=navigator.userAgent;if(!i||s)return!1;var f=l("html"),r=f.width()/10,a=parseFloat(f.css("fontSize")),n=r/a,e=r*n;t(),l(document).ready(function(){t(),setTimeout(function(){t()},300)});function t(){if(e==1)return!1;f.css("fontSize",r+"px"),l("meta[name=viewport]").attr("content","initial-scale="+n+", maximum-scale="+n+", minimum-scale="+n+", user-scalable=no")}function i(){return/(Android).*/i.test(h)}function s(){return/MiuiBrowser/ig.test(h)}})(jQuery,window),function(l,g){var h={init:function(){var f=this;f.getValue("token")&&(f.setCookie("token",f.getValue("token")),f.setCookie("openid",f.getValue("openid"))),g.location.href.indexOf("/mp/index.shtml")>-1||g.location.href.indexOf("/pages/routine/")>-1?(f.miniprogram=!0,localStorage.miniprogram=!0):(f.miniprogram=!1,localStorage.miniprogram=!1)},getValue:function(f){var r=r||window.location.href,a=r.split("?");if(a.length==1)return null;if(a.length==2){for(var s=a[1].split("&"),o={},n=0;n<s.length;n++){var e=s[n].split("=");o[e[0]]=e[1]}return o[f]?o[f]:!1}if(a.length==3){for(var s=a[1].split("&"),t=!1,o={},n=0,i=s.length;n<i;n++){var e=s[n].split("=");o[e[0]]=e[1],n+1==i&&e[0]==f&&(t=!0)}return o[f]?t?o[f]+"?"+a[2]:o[f]:!1}for(var s=a[1].split("&"),o={},n=0;n<s.length;n++){var e=s[n].split("=");o[e[0]]=e[1]}return o[f]?o[f]:!1},setCookie:function(f,r){var a=f+"="+r+";path=/";document.cookie=a}};h.init(),window.tokenjs=h}(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="//res.wx.qq.com/open/js/jweixin-1.6.0.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,g=window.tokenjs,h=window.player,f={init:function(){if(g.getValue("errorCode")){var a=parseInt(g.getValue("errorCode")),n="";switch(a){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}n&&(layer?layer.open({content:n,skin:"msg",time:2}):alert(n)),window.history.replaceState(null,null,"/")}var e=this;e.getLoginUser(),setTimeout(function(){e.handleBtn()},0),g.getValue("redirectUrl")&&!getCookie("token")&&l.loginLayer(function(s){s.success&&(window.location.href=g.getValue("redirectUrl"))}),g.getValue("redirect")&&!getCookie("token")&&l.loginLayer(function(s){s.success&&(window.location.href=g.getValue("redirect")+"?cwid="+g.getValue("cwid")+"&courseId="+g.getValue("courseId"))});var t=localStorage.getItem("queryusernameloginShow");if(t&&Date.parse(new Date)-JSON.parse(unescape(t)).time<1e4){var i=JSON.parse(unescape(t));i.data=="1"?l.loginLayer():i.data=="2"&&l.getPasswordLayer(),localStorage.removeItem("queryusernameloginShow")}e.bindGoBuyCar()},getLoginUser:function(a){var n=this;getCookie("token")?l.isLogin(function(e){e.success?(n.loginUserData=e.data,n.login(e.data,e.timeStamp),a&&!l.loginAfterJump&&(e.data.userTypeExact=="STUDENT",window.location.href=window.basePath?"/"+window.basePath+"#/":"/#/")):n.carryStorageLogin()}):n.carryStorageLogin()},carryStorageLogin:function(){var a=this;if(localStorage.isSaveAPWordKey&&window.decrypt){va