| | |
| | | } |
| | | } |
| | | |
| | | config.keepPwd = config.keepPwd || config.keepPassword |
| | | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | | GLOB.lineColor = config.lineColor || '' |
| | |
| | | GLOB.probation = false |
| | | GLOB.watermark = config.watermark + '' !== 'false' |
| | | GLOB.transfer = config.transfer + '' === 'true' |
| | | GLOB.keepKey = config.keepPassword + '' !== 'false' |
| | | GLOB.nginx = config.nginx + '' === 'true' |
| | | GLOB.keepKey = config.keepPwd + '' !== 'false' |
| | | GLOB.vispwd = config.keepPwd + '' !== 'invisible' |
| | | GLOB.WXAppID = config.WXAppID || '' |
| | | GLOB.WXminiAppID = config.WXminiAppID || '' |
| | | GLOB.WXMerchID = config.WXMerchID || '' |
| | |
| | | GLOB.memberLevel = 0 |
| | | } |
| | | |
| | | if (config.devTools === false) { |
| | | if (config.systemRun === 'backend') { |
| | | GLOB.debugger = false |
| | | Object.defineProperty(window, 'backend', { |
| | | writable: false, |
| | | value: true |
| | | }) |
| | | } |
| | | if (config.debugger === 'forbid') { |
| | | sessionStorage.removeItem('breakpoint') |
| | | GLOB.debugger = false |
| | | |
| | | let getVal = () => { |
| | | let _i = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight |
| | | let _h = window.outerHeight - _i - 200 |
| | | let _w = window.outerWidth - window.innerWidth - 100 |
| | | |
| | | return Math.max(_h, _w) |
| | | } |
| | | |
| | | if (getVal() > 0) { |
| | | document.body.innerHTML = '<div style="text-align: center; font-size: 30px; padding-top: 40vh;">本系统禁止使用控制台,请关闭控制台重新刷新!</div>' |
| | | return |
| | | } else { |
| | | let timer = null |
| | | window.addEventListener('resize', () => { |
| | | timer && clearTimeout(timer) |
| | | |
| | | if (getVal() > 0) { |
| | | timer = setTimeout(() => { |
| | | document.body.innerHTML = '<div style="text-align: center; font-size: 30px; padding-top: 40vh;">本系统禁止使用控制台,请关闭控制台重新刷新!</div>' |
| | | }, 100) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (GLOB.sysType === 'cloud') { |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | | value: GLOB.debugger |
| | | }) |
| | | } else if (GLOB.sysType === 'cloud') { |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | | value: GLOB.debugger |