소스 검색

30秒调一次接口

lilei 2 년 전
부모
커밋
33c92ea21f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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) {