Browse Source

bugfix 30分钟无操作,多次弹窗

yuwandanmian 2 years ago
parent
commit
ebbe8130f6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/App.vue

+ 2 - 1
src/App.vue

@@ -26,7 +26,8 @@ export default {
       setTimeout(() => {
       setTimeout(() => {
         this.lastTime = new Date().getTime();
         this.lastTime = new Date().getTime();
         if (this.$route.path.includes('/hospital')) {
         if (this.$route.path.includes('/hospital')) {
-          this.timer = setInterval(this.isTimeOut, 10000);
+          clearInterval(this.timer);
+          this.timer = setInterval(this.isTimeOut, 1000);
         } else {
         } else {
           clearInterval(this.timer);
           clearInterval(this.timer);
           this.lastTime = new Date().getTime();
           this.lastTime = new Date().getTime();