|
|
@@ -74,11 +74,11 @@ Page({ |
|
|
|
min02: "00", |
|
|
|
sec02: "00", |
|
|
|
countdown: "", |
|
|
|
showbutton1:false |
|
|
|
showbutton1: false |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 跳转到门店列表的详情页面 |
|
|
|
*/ |
|
|
|
* 跳转到门店列表的详情页面 |
|
|
|
*/ |
|
|
|
gotoDetail(e) { |
|
|
|
wx.navigateTo({ |
|
|
|
url: `/pages/index/detail/index?id=${e.currentTarget.dataset.id}` |
|
|
@@ -332,7 +332,7 @@ Page({ |
|
|
|
}) |
|
|
|
//如果倒计时结束,需要重新查询一下券的状态 |
|
|
|
// 给getDetail一个标识 |
|
|
|
that.getDetail(that.data.couponChannelId,'endclock'); |
|
|
|
that.getDetail(that.data.couponChannelId, 'endclock'); |
|
|
|
} |
|
|
|
total_micro_second -= 1000; |
|
|
|
}, |
|
|
@@ -373,9 +373,9 @@ Page({ |
|
|
|
title: "加载中..." |
|
|
|
}); |
|
|
|
that.setData({ |
|
|
|
onshow:false |
|
|
|
onshow: false |
|
|
|
}) |
|
|
|
that.getDetail(options.couponChannelId,'notendclock'); |
|
|
|
that.getDetail(options.couponChannelId, 'notendclock'); |
|
|
|
/** |
|
|
|
* 转赠判断 |
|
|
|
*/ |
|
|
@@ -396,7 +396,7 @@ Page({ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
getDetail: function (couponChannelId, flag) { |
|
|
|
getDetail: function(couponChannelId, flag) { |
|
|
|
let that = this; |
|
|
|
var parmer = { |
|
|
|
url: config.api.couponDetail, |
|
|
@@ -433,9 +433,9 @@ Page({ |
|
|
|
// flag == endclock 说明倒计时已经结束 |
|
|
|
if (res.data.activityStatus == 0 && flag != 'endclock') { |
|
|
|
that.countdown(res.data.beginTime); |
|
|
|
} else if (res.data.activityStatus != 0 && flag != 'endclock'){ |
|
|
|
} else if (res.data.activityStatus != 0 && flag != 'endclock') { |
|
|
|
that.countdown(res.data.endTime); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
clearInterval(that.data.setInterval) |
|
|
|
} |
|
|
|
if (res.data.activityStatus == 0) { |
|
|
@@ -762,7 +762,7 @@ Page({ |
|
|
|
key: 'couponNum2', |
|
|
|
data: "couponNum2" |
|
|
|
}) |
|
|
|
} else if (that.data.data.type != 5) { |
|
|
|
} else if (that.data.data.type != 5 && that.data.cardType != 100) { |
|
|
|
wx.setStorage({ |
|
|
|
key: 'couponNum', |
|
|
|
data: "couponNum" |
|
|
@@ -793,7 +793,6 @@ Page({ |
|
|
|
}); |
|
|
|
}) |
|
|
|
} else { |
|
|
|
console.log(that.data.type) |
|
|
|
// 免费券 |
|
|
|
that.payOrderUpdate(orderId, "0", 1, '', 'free'); |
|
|
|
if (that.data.cardType == 100) { |
|
|
@@ -801,7 +800,7 @@ Page({ |
|
|
|
key: 'couponNum2', |
|
|
|
data: "couponNum2" |
|
|
|
}) |
|
|
|
} else if (that.data.data.type != "5") { |
|
|
|
} else if (that.data.data.type != "5" && that.data.cardType != 100) { |
|
|
|
wx.setStorage({ |
|
|
|
key: 'couponNum', |
|
|
|
data: "couponNum" |
|
|
@@ -821,17 +820,17 @@ Page({ |
|
|
|
onShow() { |
|
|
|
this.setData({ |
|
|
|
showbutton: false, |
|
|
|
showbutton1:false |
|
|
|
showbutton1: false |
|
|
|
}) |
|
|
|
if(this.data.end_time){ |
|
|
|
if (this.data.end_time) { |
|
|
|
this.countdown(this.data.end_time) |
|
|
|
} |
|
|
|
}, |
|
|
|
onUnload:function(){ |
|
|
|
onUnload: function() { |
|
|
|
let that = this; |
|
|
|
clearInterval(that.data.setInterval) |
|
|
|
}, |
|
|
|
onHide: function () { |
|
|
|
onHide: function() { |
|
|
|
let that = this; |
|
|
|
clearInterval(that.data.setInterval) |
|
|
|
}, |
|
|
|