From 2e7feae2677d93a7e1ac2bedb4c9e5de35b6c054 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 四月 2025 09:34:58 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/index.js |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/index.js b/src/index.js
index a03d6c9..6d53a51 100644
--- a/src/index.js
+++ b/src/index.js
@@ -118,20 +118,20 @@
       GLOB.systemType = 'production'
     } else if (GLOB.sysType === 'local') {
       GLOB.probation = true
-      GLOB.debugger = true
+      // GLOB.debugger = true
       GLOB.systemType = ''
       GLOB.upStatus = config.updateStatus + '' !== 'false'
+
+      GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars'
 
       if (config.style_appkey) {
         GLOB.style_appkey = config.style_appkey
       }
-
-      // GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars'
-
-      GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars'
-      if (!/^https/.test(window.location.protocol)) { // https杞崲
-        GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars'
-      }
+      
+      // GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars'
+      // if (!/^https/.test(window.location.protocol)) { // https杞崲
+      //   GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars'
+      // }
 
       if (GLOB.watermark) {
         GLOB.dataFormat = true
@@ -278,7 +278,7 @@
 
     document.body.className = className
 
-    if (/^https/.test(window.location.protocol)) { // https杞崲
+    if (/^https/.test(window.location.protocol) || (process.env.NODE_ENV !== 'production' && /^https/.test(config.host))) { // https杞崲
       let meta = document.createElement('meta')
       meta.content = 'upgrade-insecure-requests'
       meta.httpEquiv = 'Content-Security-Policy'
@@ -391,12 +391,16 @@
         value: GLOB.debugger
       })
     } else if (GLOB.sysType === 'cloud') {
-      Object.defineProperty(GLOB, 'debugger', {
-        writable: false,
-        value: GLOB.debugger
-      })
-
-      GLOB.breakpoint = false
+      if (sessionStorage.getItem('cloudRun') === 'debug') {
+        GLOB.debugger = true
+      } else {
+        Object.defineProperty(GLOB, 'debugger', {
+          writable: false,
+          value: GLOB.debugger
+        })
+  
+        GLOB.breakpoint = false
+      }
     } else {
       if (sessionStorage.getItem('breakpoint')) {
         GLOB.debugger = true

--
Gitblit v1.8.0