Przeglądaj źródła

fix: 学员须知弹窗

xuqiaoying 2 lat temu
rodzic
commit
db3b8cbcd0
1 zmienionych plików z 12 dodań i 16 usunięć
  1. 12 16
      pages3/polyv/detail.vue

+ 12 - 16
pages3/polyv/detail.vue

@@ -1332,7 +1332,17 @@ export default {
 			}).then(res => {
 				if(res.data.rows.length == 0) {
 					this.noticeShow = true;
-				}
+          if (this.CountTo == 30) {
+            var timer = setInterval(() => {
+              this.CountTo--
+              if( this.CountTo < 0 ) {
+                clearInterval(timer)
+              }
+            }, 1000)
+          }
+				} else {
+          this.CountTo = -1
+        }
 			})
 		},
 		/**
@@ -1592,21 +1602,7 @@ export default {
 				// this.livingItem = res.data.data[0]
         if (res.data.data) {
           this.menuAllList = res.data.data
-				this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
-          let isShowNotice = res.data.data.every(e => e.studyStatus == -1)
-          if (this.CountTo == 30 && isShowNotice) { // studyStatus 全部等于-1的时候就是没有看过
-            this.noticeShow = true
-            var timer = setInterval(() => {
-              this.CountTo--
-              if( this.CountTo < 0 ) {
-                clearInterval(timer)
-              }
-            }, 1000)
-          } else {
-            this.CountTo = -1
-          }
-        } else {
-          this.CountTo = -1
+				this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);          
         }
 			})
 		},