From c10fc10d5fd307a7b334bcde6af5c1175aaa0410 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 28 八月 2024 17:47:28 +0800 Subject: [PATCH] 2024-08-28 --- src/index.js | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index f25a249..36ff7ed 100644 --- a/src/index.js +++ b/src/index.js @@ -37,6 +37,8 @@ } } + config.keepPwd = config.keepPwd || config.keepPassword + let GLOB = {} GLOB.appId = config.appId || '' GLOB.lineColor = config.lineColor || '' @@ -44,8 +46,8 @@ 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 || '' @@ -343,7 +345,22 @@ 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 @@ -385,7 +402,6 @@ document.getElementById('root') ) } - }) serviceWorker.unregister() -- Gitblit v1.8.0