|
...
|
...
|
@@ -60,10 +60,10 @@ Page({ |
|
|
|
},
|
|
|
|
// 提交订单(免费券)
|
|
|
|
submitOrder: util.throttle(function () {
|
|
|
|
let eTime = this.data.detail.useEtime ? new Date(this.data.detail.useEtime).getTime()/1000 : '0';
|
|
|
|
if (this.data.detail.aexpiration && this.data.detail.aexpiration.valid_forever != '1' && (this.data.dataStr > eTime )) {
|
|
|
|
let info = this.data.detail.expiration_date
|
|
|
|
if (info && info.valid_forever != '1' && (this.data.dataStr < info.stime || this.data.dataStr > info.etime)) {
|
|
|
|
return wx.showToast({
|
|
|
|
title: '优惠券已过期,不可购买!',
|
|
|
|
title: '优惠券不在领取时间内!',
|
|
|
|
duration: 2000,
|
|
|
|
mask: true,
|
|
|
|
icon: 'none'
|
|
...
|
...
|
@@ -220,6 +220,8 @@ Page({ |
|
|
|
detail.arule = detail.arule ? util.determine(detail.arule) : '';
|
|
|
|
detail.use = detail.use ? util.determine(detail.use) : '';
|
|
|
|
detail.exp_date = exp_date;
|
|
|
|
// expiration_date 券可领取时间
|
|
|
|
// aexpiration 券使用时间
|
|
|
|
detail.expiration_date = detail.expiration_date ? util.determine(detail.expiration_date) : '';
|
|
|
|
detail.aexpiration = detail.aexpiration ? util.determine(detail.aexpiration) : '';
|
|
|
|
detail.cdate = detail.cdate * 1;
|
...
|
...
|
|