Parcourir la source

30秒调一次接口

lilei il y a 2 ans
Parent
commit
33c92ea21f
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/views/bigScreen/realTimeSalesReport/center-map.vue

+ 2 - 2
src/views/bigScreen/realTimeSalesReport/center-map.vue

@@ -59,10 +59,10 @@ export default {
       const looper = (a) => {
         this.getData('china')
       }
-      this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime)
+      this.timer = setInterval(looper, 30000)
     },
     getData (code) {
-      this.loading = true
+      this.loading = !this.timer ? true : false
       queryMapSaleData(getDate.getBeDateByYear(this.curYear)).then((res) => {
         console.log('地图', res)
         if (res.status == 200) {