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

2 lines
35 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(function(l,g){var h=navigator.userAgent;if(!i||o)return!1;var f=l("html"),n=f.width()/10,a=parseFloat(f.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;f.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(h)}function o(){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 n=n||window.location.href,a=n.split("?");if(a.length==1)return null;if(a.length==2){for(var o=a[1].split("&"),s={},r=0;r<o.length;r++){var e=o[r].split("=");s[e[0]]=e[1]}return s[f]?s[f]:!1}if(a.length==3){for(var o=a[1].split("&"),t=!1,s={},r=0,i=o.length;r<i;r++){var e=o[r].split("=");s[e[0]]=e[1],r+1==i&&e[0]==f&&(t=!0)}return s[f]?t?s[f]+"?"+a[2]:s[f]:!1}for(var o=a[1].split("&"),s={},r=0;r<o.length;r++){var e=o[r].split("=");s[e[0]]=e[1]}return s[f]?s[f]:!1},setCookie:function(f,n){var a=f+"="+n+";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('<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,g=window.tokenjs,h=window.player,f={init:function(){if(g.getValue("errorCode")){var a=parseInt(g.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}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),g.getValue("redirectUrl")&&!getCookie("token")&&l.loginLayer(function(o){o.success&&(window.location.href=g.getValue("redirectUrl"))}),g.getValue("redirect")&&!getCookie("token")&&l.loginLayer(function(o){o.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:func