"use strict"; var logintype = "browser"; var ostype = (function () { var u = navigator.userAgent, app = navigator.appVersion; return { //移动终端浏览器版本信息 trident: u.indexOf('Trident') > -1, //IE内核 presto: u.indexOf('Presto') > -1, //opera内核 webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核 mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端 ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器 iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器 iPad: u.indexOf('iPad') > -1, //是否iPad webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部 weixin: u.indexOf('MicroMessenger') > -1, //是否微信 qq: u.match(/\sQQ/i) == " qq" //是否QQ }; })(); var ishttps = 'https:' == document.location.protocol ? true : false; if (!mainrest) { //不能去掉,会影响其他域名登录 var mainrest = "www.sdwsaas.com/aos"; if (ishttps) { mainrest = 'https://' + mainrest; } else { mainrest = 'http://' + mainrest; }; }; const loginInfo = new Proxy( { companyhost: mainrest, companyfiles: ishttps ? "https://www.sdwsaas.com/files/" : "http://www.sdwsaas.com/files/" }, { set: function (obj, prop, value) { if (prop === "days") { if (value && value <= 18 && value > 0) alert("尊敬的客户:\n您的账号将于" + (new Date(new Date() - 0 + (value - 1) * 86400000)).format(dateFormat.masks.isoDate) + "正式到期,截止目前仅剩" + (value - 1) + "天了。");// else if (value <= 0){ if (value>=3) alert("尊敬的客户:\n账号因到期未续费已停止使用,请续费开通账号。"); else alert("尊敬的客户:\n账号已到期,请续费开通账号。\n账号数据会保留3天时间!"); }; obj[prop] = value >= 0; return value > 0 || obj.senior; } else if (prop === "error") { return false; } else if (prop === "companylogo") { let link = document.querySelector('link[rel="icon"]'); if (!link) { link = document.createElement('link'); link.type = 'image/x-icon'; link.rel = 'icon'; link.href = value; document.getElementsByTagName('head')[0].appendChild(link); } else link.href = value; }; obj[prop] = value; return true; }, get: function (obj, prop) { if (prop === "companyfilepath") return obj.companyfiles + obj.companyid + '/'; else if (prop === 'async') { function isAsyncAwaitSupport() { let func; try { eval("func = async function(){};"); } catch (e) { return false; } // 由于async函数的构造器不是全局对象,所以我们需要由下面代码来获取async函数的构造器 // 具体可以查看以下MDN上有关于AsyncFunction的说明, // 地址:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction return Object.getPrototypeOf(func).constructor != null; } return isAsyncAwaitSupport(); } else return obj[prop]; } }); // https://www.sdwsaas.com/files/reply/20395/20200423/34b8703a-8565-11ea-bab7-00163e0c1d99.jpg (function () { //ostype.iPad是browser logintype = (ostype.iPhone || ostype.weixin) ? 'phone' : 'browser';//ostype.mobile || ostype.ios || ostype.android || if (ostype.iPad && !ostype.weixin) logintype = 'browser'; if (ostype.weixin && ostype.webApp && !ostype.iPhone) logintype = 'browser'; if (window.innerWidth / window.innerHeight < 0.7) logintype = 'phone' // document.write(''); document.write(''); document.write(''); // document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); // if (logintype === "browser") // //浏览器上导出使用 // document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); // document.write(''); document.write(''); // //显示调试窗口 // document.write(''); // document.write(''); })();