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 |   46 +++++++++++++++++-----------------------------
 1 files changed, 17 insertions(+), 29 deletions(-)

diff --git a/src/index.js b/src/index.js
index ff118aa..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,36 +345,22 @@
       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

--
Gitblit v1.8.0