n20-common-lib 2.4.56 → 2.4.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -52,7 +52,8 @@ export default {
|
|
|
52
52
|
enumData,
|
|
53
53
|
tips: [],
|
|
54
54
|
list: '',
|
|
55
|
-
interval: ''
|
|
55
|
+
interval: '',
|
|
56
|
+
timer: null
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
computed: {
|
|
@@ -66,12 +67,15 @@ export default {
|
|
|
66
67
|
this.setTimedTask(res.customOpt.timedTask)
|
|
67
68
|
})
|
|
68
69
|
},
|
|
70
|
+
beforeDestroy() {
|
|
71
|
+
clearInterval(this.timer)
|
|
72
|
+
},
|
|
69
73
|
methods: {
|
|
70
74
|
/**
|
|
71
75
|
* 设置定时任务
|
|
72
76
|
*/
|
|
73
77
|
setTimedTask(timer = 60000) {
|
|
74
|
-
setInterval(this.getOperatingStatus, timer)
|
|
78
|
+
this.timer = setInterval(this.getOperatingStatus, timer)
|
|
75
79
|
},
|
|
76
80
|
/**
|
|
77
81
|
* 获取营业状态
|