From cc20b3cfe18b36c7b0f75937f88679eb031ecc6f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 14 八月 2023 13:41:20 +0800
Subject: [PATCH] 2023-08-14

---
 src/tabviews/custom/components/card/prop-card/index.jsx |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index dbb8131..2dcd2c2 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -146,7 +146,7 @@
 
     if (config.timer && config.wrap.datatype === 'dynamic') {
       this.timer = new TimerTask()
-      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData(true)})
+      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData('timer')})
     }
 
     this.initExec()
@@ -182,7 +182,7 @@
             Api.getLCacheConfig(config.uuid, config.$time).then(res => {
               if (!res.valid && config.setting.onload === 'true') {
                 setTimeout(() => {
-                  this.loadData()
+                  this.loadData('init')
                 }, config.setting.delay || 0)
               }
 
@@ -221,7 +221,7 @@
   
           if (config.setting.onload === 'true') {
             setTimeout(() => {
-              this.loadData()
+              this.loadData('init')
             }, config.setting.delay || 0)
           } else if (this.loaded) {
             if (config.wrap.goback === 'true' && data.$$empty) {
@@ -429,7 +429,7 @@
     if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠�
       MKEmitter.emit('reloadData', config.setting.supModule, BID)
     } else {
-      this.loadData(false, btn)
+      this.loadData('', btn)
     }
   }
 
@@ -487,7 +487,7 @@
     this.loadData()
   }
 
-  async loadData (hastimer, btn) {
+  async loadData (type, btn) {
     const { config, arr_field, BID, BData, selected } = this.state
 
     if (config.wrap.datatype === 'public') {
@@ -521,7 +521,7 @@
       return
     }
 
-    if (!hastimer) {
+    if (type !== 'timer') {
       this.setState({
         loading: true
       })
@@ -535,7 +535,7 @@
       let _data = {}
 
       this.loaded = true
-      if (config.$cache && config.setting.onload !== 'false') {
+      if (config.$cache && type === 'init') {
         Api.writeCacheConfig(config.uuid, result.data || [])
       }
 

--
Gitblit v1.8.0