浏览代码

定时器

csx 4 年前
父节点
当前提交
c67e6cb386
共有 5 个文件被更改,包括 9 次插入8 次删除
  1. 1 1
      build/cdn.json
  2. 1 1
      src/pages/main/DialysisArea.vue
  3. 2 2
      src/pages/main/WaitingArea.vue
  4. 3 3
      src/pages/main/index.vue
  5. 2 1
      src/utils/request.js

+ 1 - 1
build/cdn.json 查看文件

@@ -1,3 +1,3 @@
1 1
 {
2
-  "version": "1.1.351"
2
+  "version": "1.1.354"
3 3
 }

+ 1 - 1
src/pages/main/DialysisArea.vue 查看文件

@@ -346,7 +346,7 @@ export default {
346 346
   mounted() {
347 347
     this.timer = window.setInterval(() => {
348 348
       setTimeout(this.requestDialysisScheduals(), 0);
349
-    }, 12000);
349
+    }, 120000);
350 350
   },
351 351
   beforeDestroy() {
352 352
     clearInterval(this.timer);

+ 2 - 2
src/pages/main/WaitingArea.vue 查看文件

@@ -440,7 +440,7 @@ export default {
440 440
     if (type != null) {
441 441
       this.select_index = parseInt(type)
442 442
     }
443
-    
443
+
444 444
     var storedata = this.$store.getters.waitscheduals
445 445
     var scheduals = storedata.waitscheduals
446 446
     if (Object.keys(storedata).length > 0) {
@@ -469,7 +469,7 @@ export default {
469 469
   mounted () {
470 470
     this.timer = window.setInterval(() => {
471 471
       setTimeout(this.requestScheduals(), 0)
472
-    }, 12000)
472
+    }, 120000)
473 473
   },
474 474
   beforeDestroy () {
475 475
     clearInterval(this.timer)

+ 3 - 3
src/pages/main/index.vue 查看文件

@@ -177,9 +177,9 @@ export default {
177 177
     }
178 178
   },
179 179
   mounted() {
180
-    this.timer = window.setInterval(() => {
181
-      setTimeout(this.getData(), 0);
182
-    }, 30000);
180
+    // this.timer = window.setInterval(() => {
181
+    //   setTimeout(this.getData(), 0);
182
+    // }, 30000);
183 183
   },
184 184
   beforeDestroy() {
185 185
     clearInterval(this.timer);

+ 2 - 1
src/utils/request.js 查看文件

@@ -5,7 +5,8 @@ import { Toast } from 'mint-ui'
5 5
 const service = axios.create({
6 6
   baseURL: process.env.BASE_API, // api的base_url
7 7
   timeout: 30000, // request timeout
8
-  withCredentials: true
8
+  withCredentials: true,
9
+
9 10
 
10 11
 })
11 12