bobo hace 3 años
padre
commit
b62bd74b35
Se han modificado 1 ficheros con 3 adiciones y 6 borrados
  1. 3 6
      pages/luckDraw/index.js

+ 3 - 6
pages/luckDraw/index.js

@@ -21,8 +21,6 @@ Page({
      */
     onLoad: function (options) {
         Object.assign(this, Common)
-        this.getActivityList();
-        this.startCountdownTimer()
     },
 
     /**
@@ -35,7 +33,8 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-
+        this.getActivityList();
+        this.startCountdownTimer()
     },
 
     /**
@@ -148,9 +147,7 @@ Page({
         }
         const now = new Date();
         this.data.activityList.forEach(v => {
-            if (v.status == 1 || v.status == 4 || v.status == 5) {
-                this.setActivityCountdownTime(now, v)
-            }
+            this.setActivityCountdownTime(now, v)
         })
         this.setData({
             activityList: this.data.activityList