From 2e271a6b02a2f82bc0e3a36e05c00731bad99358 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 02 十月 2022 01:46:25 +0800 Subject: [PATCH] 2022-10-02 --- src/index.js | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/index.js b/src/index.js index ee48fbf..f2e2251 100644 --- a/src/index.js +++ b/src/index.js @@ -73,6 +73,7 @@ GLOB.watermark = config.watermark + '' !== 'false' GLOB.transfer = config.transfer + '' === 'true' GLOB.keepKey = config.keepPassword + '' !== 'false' + GLOB.nginx = config.nginx + '' === 'true' GLOB.WXAppID = config.WXAppID || '' GLOB.WXminiAppID = config.WXminiAppID || '' GLOB.accessToken = {} @@ -244,6 +245,13 @@ } GLOB.memberLevel = _level + if (sessionStorage.getItem('breakpoint')) { + window.debugger = true + GLOB.breakpoint = sessionStorage.getItem('breakpoint') + } else { + GLOB.breakpoint = false + } + Object.defineProperty(GLOB, 'appId', { writable: false, value: GLOB.appId @@ -272,6 +280,16 @@ writable: false, value: GLOB }) + Object.defineProperty(window, 'debug', { + set(value) { + if (value + '' === 'false') { + sessionStorage.removeItem('breakpoint') + } else { + sessionStorage.setItem('breakpoint', value) + } + console.info('璇峰埛鏂伴〉闈€��') + } + }) window.GLOB.CacheMap = new Map() // 缂撳瓨閰嶇疆淇℃伅 window.GLOB.UserCacheMap = new Map() // 缂撳瓨鐢ㄦ埛鑷畾涔夎缃� -- Gitblit v1.8.0