Kaynağa Gözat

世茂数据10分钟刷新一次

wangtao 2 yıl önce
ebeveyn
işleme
d7d85c1785
1 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. 9 1
      src/views/index.vue

+ 9 - 1
src/views/index.vue

@@ -103,7 +103,6 @@ export default {
 
     };
   },
-
   created(){
     setTimeout(() =>{
       document.getElementById("middleWrap").style.zIndex= "9"
@@ -116,6 +115,15 @@ export default {
     }).then(res =>{
       this.data = JSON.parse(res.data.data)
     })
+    setInterval(()=>{
+      axios({
+          method: 'get',
+          url: 'https://smartpark.caih.com/dxapi/system/config/configKey/large.json.config',
+          timeout: 10000,
+      }).then(res =>{
+        this.data = JSON.parse(res.data.data)
+      })
+    },1000*60*10)
   },
   mounted(){
     let that = this;