shish 4 лет назад
Родитель
Сommit
c324faa077
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      hdPad/src/pages/home/components/workInfo.vue

+ 6 - 2
hdPad/src/pages/home/components/workInfo.vue

@@ -204,7 +204,9 @@ export default {
   },
   },
 	destroyed(){
 	destroyed(){
 
 
-    clearInterval(this.INT)
+    if(this.INT){
+      clearInterval(this.INT)
+    }
 
 
 		// #ifdef APP-PLUS
 		// #ifdef APP-PLUS
 		//避免重复,每次进来先移除全局自定义事件监听器
 		//避免重复,每次进来先移除全局自定义事件监听器
@@ -340,7 +342,9 @@ export default {
           let that = this
           let that = this
           this.beginCount = Number(this.orderInfo.beginCount)
           this.beginCount = Number(this.orderInfo.beginCount)
           if(this.beginCount > 0 && this.orderInfo.fromType ==4){
           if(this.beginCount > 0 && this.orderInfo.fromType ==4){
-            clearInterval(this.INT)
+            if(this.INT){
+              clearInterval(this.INT)
+            }
             that.INT = setInterval(function(){
             that.INT = setInterval(function(){
               that.beginCount--
               that.beginCount--
               if(that.beginCount <= 0){
               if(that.beginCount <= 0){