From 6092c17b4571e1082d1272fa3104c780af66453d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 17 十二月 2023 11:10:19 +0800
Subject: [PATCH] 2023-12-17

---
 src/tabviews/custom/components/card/double-data-card/index.jsx |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx
index eb2415e..eabc964 100644
--- a/src/tabviews/custom/components/card/double-data-card/index.jsx
+++ b/src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -36,7 +36,7 @@
     loading: false,            // 鏁版嵁鍔犺浇鐘舵��
     card: null,                // 鍗$墖璁剧疆
     data: [],                // 鏁版嵁
-    total: null,
+    total: 0,
     precards: [],
     nextcards: [],
     selected: 'false',
@@ -229,6 +229,8 @@
     if (config.setting.onload === 'true') {
       this.initExec()
     }
+
+    this.autoExec()
   }
 
   shouldComponentUpdate (nextProps, nextState) {
@@ -322,6 +324,25 @@
     }
   }
 
+  autoExec = (times) => {
+    const { config } = this.state
+
+    if (!config.wrap.autoExec) return
+
+    let btn = document.getElementById('button' + config.wrap.autoExec)
+
+    this.autoTimer && clearTimeout(this.autoTimer)
+
+    if (btn) {
+      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
+    } else if (!times || times < 20) {
+      times = times ? times + 1 : 1
+      this.autoTimer = setTimeout(() => {
+        this.autoExec(times)
+      }, 1000)
+    }
+  }
+
   searchRefresh = (searchId) => {
     const { config } = this.state
 

--
Gitblit v1.8.0