Quellcode durchsuchen

[修改页面详情的倒计时][修改]

tags/富茂链客4.1.0
meo vor 6 Jahren
Ursprung
Commit
daed96539a
1 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen
  1. +14
    -2
      pages/coupon/detail/index.js

+ 14
- 2
pages/coupon/detail/index.js Datei anzeigen

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

if (res.data.activityStatus == 0) {
var beginTime = util.formatTime(res.data.beginTime, "yyyy-MM-dd hh:mm:ss");
if (util.timechuo(beginTime).indexOf('-') == 0) {
@@ -803,11 +808,18 @@ Page({
showbutton: false,
showbutton1:false
})
if(this.data.end_time){
this.countdown(this.data.end_time)
}
},
onUnload:function(){
let that = this;
clearInterval(that.data.setInterval)
},
onHide: function () {
let that = this;
clearInterval(that.data.setInterval)
},
onShareAppMessage: function(options) {
var that = this;
var shareObj = {


Laden…
Abbrechen
Speichern