Browse Source

热点列表页数据加载逻辑优化

(cherry picked from commit 0ada9052608dce7062fc64912948a7a54fc5bd6a)
任一存 2 years ago
parent
commit
5209040a1c
1 changed files with 13 additions and 1 deletions
  1. 13 1
      src/views/gui/CustomHotspotList.vue

+ 13 - 1
src/views/gui/CustomHotspotList.vue

@@ -30,7 +30,19 @@
 export default {
   data() {
     return {
-      hotspotList: window.myHotList
+      hotspotList: window.myHotList,
+      intervalId: null,
+    }
+  },
+  mounted() {
+    if (!window.myHotList) {
+      this.intervalId = setInterval(() => {
+        if (window.myHotList) {
+          this.hotspotList = window.myHotList
+          clearInterval(this.intervalId)
+        } else {
+        }
+      }, 300)
     }
   },
   methods: {