From d0e8c7cb64d7d219f7cfec8bc87cf699b9cfe7b2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 08 十一月 2022 12:35:25 +0800
Subject: [PATCH] 2022-11-08

---
 src/api/index.js |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index d86149f..135d64a 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -367,7 +367,7 @@
   /**
    * @description 鑾峰彇绯荤粺鐗堟湰淇℃伅锛屽惎鐢ㄦ垨鏇存柊websql
    */
-  getAppVersion (_resolve, _reject) {
+  getAppVersion (reload) {
     if (!window.GLOB.WebSql && !window.GLOB.IndexDB) {
       return Promise.reject()
     }
@@ -398,7 +398,7 @@
             CacheUtils.updateWebSqlversion('1.00', curTime)
             resolve()
             return
-          } else if (!msg.createDate) {
+          } else if (!msg.createDate || reload) {
             param.modifydate = curTime
             param.menuids = window.btoa(msg.menuids)
           } else if (msg.menuids) {
@@ -460,7 +460,7 @@
             CacheUtils.updateIndexDBversion({version: '1.00', createDate: curTime})
             resolve()
             return
-          } else if (!msg.createDate) {
+          } else if (!msg.createDate || reload) {
             param.modifydate = curTime
             param.menuids = window.btoa(msg.menuids)
           } else if (msg.menuids) {
@@ -527,11 +527,6 @@
   deleteMenuStorage (menuId) {
     if (window.GLOB.IndexDB) {
       let key = menuId + (sessionStorage.getItem('UserID') || '')
-    
-      if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) {
-        key = menuId + (sessionStorage.getItem('CloudUserID') || '')
-      }
-
       return CacheUtils.delMenuIndexDBConfig(key)
     } else {
       return CacheUtils.delMenuWebSqlConfig(menuId)
@@ -831,6 +826,16 @@
     param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || ''
     param.appkey = window.GLOB.appkey || ''
 
+    if (['sPC_Get_TableData', 'sPC_Get_TableData_debug', 'sPC_TableData_InUpDe', 'sPC_TableData_InUpDe_debug', 'sPC_Get_structured_data'].includes(param.func)) {
+      if (sessionStorage.getItem('isEditState') === 'true') {
+        param.username = sessionStorage.getItem('CloudUserName') || ''
+        param.fullname = sessionStorage.getItem('CloudFullName') || ''
+      } else {
+        param.username = sessionStorage.getItem('User_Name') || ''
+        param.fullname = sessionStorage.getItem('Full_Name') || ''
+      }
+    }
+
     let login = false
     let rduri = null
 

--
Gitblit v1.8.0