| | |
| | | } |
| | | } |
| | | |
| | | 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.WXNotice = config.WXNotice + '' === 'true' |
| | | GLOB.execType = config.execType === 'x' ? 'x' : '' |
| | | GLOB.accessToken = {} |
| | | GLOB.mkHS = false |
| | | GLOB.debugger = false |
| | | GLOB.dataFormat = false |
| | |
| | | if (GLOB.cloudServiceApi) { |
| | | GLOB.mainSystemApi = GLOB.cloudServiceApi |
| | | } |
| | | |
| | | if (config.systemRun === 'backend') { |
| | | config.systemRun = '' // hs 不使用后端替换 |
| | | GLOB.backend = true |
| | | } |
| | | } |
| | | |
| | | if (process.env.NODE_ENV === 'production') { // 用于校验是否存在开发权限 |
| | |
| | | GLOB.baseurl = GLOB.location + '/' + GLOB.service |
| | | GLOB.linkurl = GLOB.baseurl + 'index.html' |
| | | GLOB.dataFormat = false |
| | | |
| | | let mark = sessionStorage.getItem('system_mark') |
| | | let _mark = `sys_${GLOB.service.replace('/', '') || 'service'}` |
| | | if (mark && mark !== _mark) { |
| | | sessionStorage.clear() |
| | | } |
| | | sessionStorage.setItem('system_mark', _mark) |
| | | } |
| | | |
| | | let mark = sessionStorage.getItem('system_mark') |
| | | let _mark = `sys_${GLOB.service.replace('/', '') || 'service'}` |
| | | if (mark && mark !== _mark) { |
| | | sessionStorage.clear() |
| | | } |
| | | sessionStorage.setItem('system_mark', _mark) |
| | | |
| | | if (config.mainkey && GLOB.sysType !== 'cloud' && config.mainkey !== options.cakey) { |
| | | GLOB.localkey = GLOB.appkey |
| | |
| | | GLOB.memberLevel = 0 |
| | | } |
| | | |
| | | if (GLOB.sysType === 'cloud') { |
| | | 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 |
| | | |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | | value: GLOB.debugger |
| | | }) |
| | | } else if (GLOB.sysType === 'cloud') { |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | | value: GLOB.debugger |
| | |
| | | document.getElementById('root') |
| | | ) |
| | | } |
| | | |
| | | }) |
| | | |
| | | serviceWorker.unregister() |