From bf2f6079c6b94e1e429c48501a13fa38be71ecd0 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 02 十二月 2022 10:08:26 +0800
Subject: [PATCH] 1.看板接口接入

---
 src/views/kb/zhkb.vue |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index eee8119..71306e9 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -313,21 +313,26 @@
         res1.data.forEach(item => {
           this.ShopArr.push(item.org_code)
         })
-        this.getShopSearchLine()
-        this.getRightRightData()
-        this.getLeftBottomData()
-        this.getEcharts()
+
+        if (this.ShopArr.length > 0) {
+          this.getShopSearchLine()
+          this.getRightRightData()
+          this.getLeftBottomData()
+          this.getEcharts()
+        }
       }
-      setInterval(() => {
-        this.ShopSearchTask = ShopSearch().then(res1 => {
-          if (res1.code === '200') {
-            this.ShopArr = []
-            res1.data.forEach(item => {
-              this.ShopArr.push(item.org_code)
-            })
-          }
-        })
-      }, 1000 * 60)
+      if (this.ShopArr.length > 0) {
+        setInterval(() => {
+          this.ShopSearchTask = ShopSearch().then(res1 => {
+            if (res1.code === '200') {
+              this.ShopArr = []
+              res1.data.forEach(item => {
+                this.ShopArr.push(item.org_code)
+              })
+            }
+          })
+        }, 1000 * 60)
+      }
     },
     // 浜х嚎鍔犲伐涓换鍔�
     getShopSearchLine() {

--
Gitblit v1.9.3