|
@@ -39,14 +39,13 @@ Component({
|
|
|
this.setData({
|
|
|
activityList
|
|
|
})
|
|
|
- // console.log(activityList);
|
|
|
// 下面这个处理限时活动的,第一版先不上
|
|
|
- // activityList.forEach((item, index) => {
|
|
|
- // if (item.bannerType == 4 && item.voucherType) {
|
|
|
- // // this.activityTimeOut(1677109150000, index)
|
|
|
- // this.activityTimeOut(item.endTime, index)
|
|
|
- // }
|
|
|
- // })
|
|
|
+ activityList.forEach((item, index) => {
|
|
|
+ if (item.bannerType == 4 && item.voucherType) {
|
|
|
+ // this.activityTimeOut(1677109150000, index)
|
|
|
+ this.activityTimeOut(item.endTime, index)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
jumpUserInfo({
|
|
|
currentTarget
|
|
@@ -61,7 +60,7 @@ Component({
|
|
|
activityTimeOut(oTime, index) {
|
|
|
let inputTime = new Date(oTime)
|
|
|
let dsq = setInterval(() => {
|
|
|
- console.log('1');
|
|
|
+ // console.log(this.data.activityList[index]);
|
|
|
var nowTime = new Date();
|
|
|
//把剩余时间毫秒数转化为秒
|
|
|
var times = (inputTime - nowTime) / 1000;
|
|
@@ -70,6 +69,7 @@ Component({
|
|
|
[`activityList[${index}].hour`]: '00',
|
|
|
[`activityList[${index}].minute`]: '00',
|
|
|
[`activityList[${index}].second`]: '00',
|
|
|
+ [`activityList[${index}].finish`]: true,
|
|
|
})
|
|
|
return clearInterval(dsq)
|
|
|
}
|
|
@@ -89,6 +89,7 @@ Component({
|
|
|
[`activityList[${index}].hour`]: hour,
|
|
|
[`activityList[${index}].minute`]: minute,
|
|
|
[`activityList[${index}].second`]: second,
|
|
|
+ [`activityList[${index}].finish`]: false,
|
|
|
})
|
|
|
times = --times;
|
|
|
}, 1000);
|
|
@@ -130,6 +131,10 @@ Component({
|
|
|
currentTarget
|
|
|
}) {
|
|
|
let info = currentTarget.dataset.info
|
|
|
+ console.log(currentTarget.dataset.info);
|
|
|
+ if (info.finish) {
|
|
|
+ return
|
|
|
+ }
|
|
|
this.selectComponent('#voucher').open({
|
|
|
type: info.type,
|
|
|
id: info.id,
|