|
|
|
|
@ -151,6 +151,30 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.request();
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.getRealTimeCheck();
|
|
|
|
|
})
|
|
|
|
|
this.$on('hook:activated', () => {
|
|
|
|
|
this.timer = window.setInterval(this.getRealTimeCheck, 3000);
|
|
|
|
|
})
|
|
|
|
|
this.timer = window.setInterval(this.getRealTimeCheck, 3000);
|
|
|
|
|
|
|
|
|
|
this.$on('hook:deactivated', () => {
|
|
|
|
|
clearInterval(this.timer)
|
|
|
|
|
this.timer = null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
console.log("beforeDestroy")
|
|
|
|
|
window.clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
request() {
|
|
|
|
|
|