From f08dbc88d0ffdab90c2fc3187bb4adec1b5f734a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 01 八月 2024 15:38:07 +0800
Subject: [PATCH] 2024-08-01

---
 src/index.js                                                |    1 -
 src/tabviews/custom/components/table/base-table/index.jsx   |    6 ++++++
 src/api/index.js                                            |   21 ++++-----------------
 src/tabviews/custom/components/table/normal-table/index.jsx |    6 ++++++
 src/views/mobdesign/index.jsx                               |   10 ++++++++--
 src/tabviews/custom/components/card/data-card/index.jsx     |    6 ++++++
 6 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index 0dca831..3717fe7 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -103,23 +103,10 @@
   wxAccessToken (appId, domain = '') {
     let _url = domain || window.GLOB.baseurl
 
-    return new Promise(resolve => {
-      if (window.GLOB.accessToken.appId === appId && window.GLOB.accessToken.accessTime && (parseInt(new Date().getTime() / 1000) - window.GLOB.accessToken.accessTime < 30)) {
-        resolve(window.GLOB.accessToken)
-      } else {
-        window.GLOB.accessToken = {appId}
-        axios({
-          url: _url + 'wechat/getaccesstoken',
-          method: 'post',
-          data: JSON.stringify({app_id: appId})
-        }).then(res => {
-          if (res.access_token) {
-            window.GLOB.accessToken.accessTime = parseInt(new Date().getTime() / 1000)
-            window.GLOB.accessToken.access_token = res.access_token
-          }
-          resolve(res)
-        })
-      }
+    return axios({
+      url: _url + 'wechat/getaccesstoken',
+      method: 'post',
+      data: JSON.stringify({app_id: appId})
     })
   }
 
diff --git a/src/index.js b/src/index.js
index b167b70..f25a249 100644
--- a/src/index.js
+++ b/src/index.js
@@ -51,7 +51,6 @@
     GLOB.WXMerchID = config.WXMerchID || ''
     GLOB.WXNotice = config.WXNotice + '' === 'true'
     GLOB.execType = config.execType === 'x' ? 'x' : ''
-    GLOB.accessToken = {}
     GLOB.mkHS = false
     GLOB.debugger = false
     GLOB.dataFormat = false
diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 7e95542..2748a02 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -949,6 +949,12 @@
         _data.$$BID = BID || ''
         _data.$$BData = BData || ''
 
+        if (config.wrap.controlField) {
+          if (config.wrap.controlVal.includes(_data[config.wrap.controlField] + '')) {
+            _data.$disabled = true
+          }
+        }
+
         data = data.map(item => {
           if (item.$$uuid === _data.$$uuid) {
             _data.key = item.key
diff --git a/src/tabviews/custom/components/table/base-table/index.jsx b/src/tabviews/custom/components/table/base-table/index.jsx
index 2dadeda..b02d9ae 100644
--- a/src/tabviews/custom/components/table/base-table/index.jsx
+++ b/src/tabviews/custom/components/table/base-table/index.jsx
@@ -288,6 +288,12 @@
         _data.$$BID = BID || ''
         _data.$$BData = BData || ''
 
+        if (setting.controlField) {
+          if (setting.controlVal.includes(_data[setting.controlField] + '')) {
+            _data.$disabled = true
+          }
+        }
+
         if (config.absFields) {
           config.absFields.forEach(f => {
             if (!isNaN(_data[f])) {
diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index 1cde8b1..12f76e9 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -724,6 +724,12 @@
         _data.$$uuid = _data[setting.primaryKey] || ''
         _data.$$BID = BID || ''
         _data.$$BData = BData || ''
+
+        if (setting.controlField) {
+          if (setting.controlVal.includes(_data[setting.controlField] + '')) {
+            _data.$disabled = true
+          }
+        }
   
         if (config.absFields) {
           config.absFields.forEach(f => {
diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index a76850e..ebeda0b 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -1528,6 +1528,7 @@
       }
 
       delete config.miniTitle
+      delete config.miniReloadUp
 
       config.components.forEach(item => {
         if (item.type === 'login') {
@@ -1536,8 +1537,13 @@
           config.loginview = true
         } else if (item.type === 'navbar') {
           config.tabview = true
-        } else if (item.type === 'topbar' && adapters.includes('wxmini') && item.wrap.minishow !== 'true') {
-          config.miniTitle = item.wrap.title || ''
+        } else if (item.type === 'topbar' && adapters.includes('wxmini')) {
+          if (item.wrap.minishow !== 'true') {
+            config.miniTitle = item.wrap.title || ''
+          }
+          if (item.wrap.reload === 'true') {
+            config.miniReloadUp = true
+          }
         }
       })
 

--
Gitblit v1.8.0