| @@ -299,7 +299,6 @@ Page({ | |||||
| var total_micro_second = EndTime - NowTime || []; | var total_micro_second = EndTime - NowTime || []; | ||||
| // 渲染倒计时时钟 | // 渲染倒计时时钟 | ||||
| let obj = that.dateformat(total_micro_second); | let obj = that.dateformat(total_micro_second); | ||||
| console.log(total_micro_second) | |||||
| if (total_micro_second > 0) { | if (total_micro_second > 0) { | ||||
| that.setData({ | that.setData({ | ||||
| clock: obj, | clock: obj, | ||||
| @@ -358,6 +357,9 @@ Page({ | |||||
| wx.showLoading({ | wx.showLoading({ | ||||
| title: "加载中..." | title: "加载中..." | ||||
| }); | }); | ||||
| that.setData({ | |||||
| onshow:false | |||||
| }) | |||||
| that.getDetail(options.couponChannelId,'notendclock'); | that.getDetail(options.couponChannelId,'notendclock'); | ||||
| /** | /** | ||||
| * 转赠判断 | * 转赠判断 | ||||
| @@ -411,6 +413,10 @@ Page({ | |||||
| } | } | ||||
| console.log(flag); | console.log(flag); | ||||
| if (res.data.endTime && res.data.beginTime) { | if (res.data.endTime && res.data.beginTime) { | ||||
| that.setData({ | |||||
| begin_time: res.data.beginTime, | |||||
| end_time: res.data.endTime, | |||||
| }) | |||||
| //activityStatus==0 活动未开始 | //activityStatus==0 活动未开始 | ||||
| //activityStatus==1 活动已开始 | //activityStatus==1 活动已开始 | ||||
| // flag == endclock 说明倒计时已经结束 | // flag == endclock 说明倒计时已经结束 | ||||
| @@ -421,7 +427,6 @@ Page({ | |||||
| }else{ | }else{ | ||||
| clearInterval(that.data.setInterval) | clearInterval(that.data.setInterval) | ||||
| } | } | ||||
| if (res.data.activityStatus == 0) { | if (res.data.activityStatus == 0) { | ||||
| var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss"); | ||||
| if (util.timechuo(beginTime).indexOf('-') == 0) { | if (util.timechuo(beginTime).indexOf('-') == 0) { | ||||
| @@ -803,11 +808,18 @@ Page({ | |||||
| showbutton: false, | showbutton: false, | ||||
| showbutton1:false | showbutton1:false | ||||
| }) | }) | ||||
| if(this.data.end_time){ | |||||
| this.countdown(this.data.end_time) | |||||
| } | |||||
| }, | }, | ||||
| onUnload:function(){ | onUnload:function(){ | ||||
| let that = this; | let that = this; | ||||
| clearInterval(that.data.setInterval) | clearInterval(that.data.setInterval) | ||||
| }, | }, | ||||
| onHide: function () { | |||||
| let that = this; | |||||
| clearInterval(that.data.setInterval) | |||||
| }, | |||||
| onShareAppMessage: function(options) { | onShareAppMessage: function(options) { | ||||
| var that = this; | var that = this; | ||||
| var shareObj = { | var shareObj = { | ||||