Browse Source

定时器

csx 4 years ago
parent
commit
c67e6cb386

+ 1 - 1
build/cdn.json View File

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

+ 1 - 1
src/pages/main/DialysisArea.vue View File

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

+ 2 - 2
src/pages/main/WaitingArea.vue View File

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

+ 3 - 3
src/pages/main/index.vue View File

177
     }
177
     }
178
   },
178
   },
179
   mounted() {
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
   beforeDestroy() {
184
   beforeDestroy() {
185
     clearInterval(this.timer);
185
     clearInterval(this.timer);

+ 2 - 1
src/utils/request.js View File

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