From db04710a709c31c6635db621ac19a467d2e2c928 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 30 十二月 2023 22:18:35 +0800
Subject: [PATCH] 2023-12-30

---
 src/index.js                                          |   13 ++++++++-----
 src/utils/utils-datamanage.js                         |    4 ++++
 src/components/header/index.jsx                       |    8 +++++++-
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   13 ++++++++-----
 public/README.txt                                     |    1 +
 5 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/public/README.txt b/public/README.txt
index bbd418f..b28ccd1 100644
--- a/public/README.txt
+++ b/public/README.txt
@@ -18,4 +18,5 @@
 transfer          -- 鏄惁浣跨敤杞帴鍙o紝浣跨敤杞帴鍙f椂璇疯缃负 true, 浣跨敤杞帴鍙f椂锛屽閮ㄦ帴鍙h皟鐢ㄥ墠涓嶄細鍋氱櫥褰曢獙璇�
 keepPassword      -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负 false 鏃剁鐢�
 updateStatus      -- 鏄惁鏇存柊寮�鍙戠姸鎬侊紝榛樿寮�鍚紝褰撳�间负 false 鏃剁鐢�
+forcedUpdate      -- 浼犺緭鍙峰崌绾ф椂锛屾槸鍚﹁嚜鍔ㄩ��鍑猴紝鏍煎紡涓猴紙YYYY-MM-DD锛夛紝鐢ㄤ簬鍗囩骇鍚庡埛鏂扮敤鎴锋湰鍦伴厤缃�
 platforms         -- 绉诲姩绔彲浣跨敤鐨勫钩鍙扮被鍨嬶紝榛樿涓� ["H5", "wechat", "android", "ios", "wxMiniProgram"] 鍒嗗埆浠h〃H5椤甸潰銆佸井淇″叕浼楀彿銆佸畨鍗揂PP銆佽嫻鏋淎PP銆佸井淇″皬绋嬪簭
\ No newline at end of file
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index fc4d28c..7bc1c43 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -230,7 +230,13 @@
   getwork = () => {
     if (sessionStorage.getItem('work_grade')) return
 
-    Api.genericInterface({func: 's_get_local_my_worker_v1'}).then(result => {
+    let param = {func: 's_get_local_my_worker_v1'}
+
+    if (window.GLOB.forcedUpdate) {
+      param.s_version_up = 'true'
+    }
+    
+    Api.genericInterface(param).then(result => {
       sessionStorage.setItem('work_grade', result.work_grade || 0)
       sessionStorage.setItem('work_group', result.work_group || '')
 
diff --git a/src/index.js b/src/index.js
index b69ffe1..17fcdf1 100644
--- a/src/index.js
+++ b/src/index.js
@@ -76,11 +76,6 @@
 
     // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺
     if (GLOB.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) {
-      GLOB.systemType = 'production'
-      if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) {
-        GLOB.probation = true
-      }
-
       if (!config.mainSystemApi) {
         document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">绯荤粺鏈缃崟鐐瑰湴鍧�锛岃鑱旂郴绠$悊鍛橈紒</div>'
         return
@@ -91,6 +86,14 @@
         document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">姝e紡绯荤粺涓嶅彲浣跨敤 http://cloud.mk9h.cn 鍋氫负鍗曠偣鍦板潃锛岃鑱旂郴绠$悊鍛橈紒</div>'
         return
       }
+
+      GLOB.systemType = 'production'
+      if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) {
+        GLOB.probation = true
+      }
+      if (config.forcedUpdate && /^20\d{2}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) {
+        GLOB.forcedUpdate = true
+      }
     } else if (GLOB.sysType === 'local') {
       GLOB.probation = true
       GLOB.debugger = true
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index e2bcad1..2a624a8 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2053,11 +2053,14 @@
         func: btn.callbackFunc
       }
 
-      // special 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
-      if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) {
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-        param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp)
-        param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
+      if (window.GLOB.mkHS) {
+        if (btn.callbackFunc === 's_sVersion_Local_add' && window.GLOB.forcedUpdate) { // special 浼犺緭鍙锋坊鍔犲洖璋冨鐞�
+          param.local_userid = sessionStorage.getItem('LocalUserID') || ''
+        } else if (btn.callbackFunc === 's_sDataDictb_TBBack' && param.LTextOut) { // special 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉
+          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+          param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp)
+          param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
+        }
       }
     } else {
       if (result.status) {
diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js
index a06bc3f..eef1007 100644
--- a/src/utils/utils-datamanage.js
+++ b/src/utils/utils-datamanage.js
@@ -301,6 +301,10 @@
       param.s_debug_type = 'Y'
     }
 
+    if (window.GLOB.forcedUpdate) {
+      param.s_version_up = 'true'
+    }
+
     if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉
       param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
 

--
Gitblit v1.8.0