|
@@ -39,14 +39,13 @@ Component({
|
|
|
this.setData({
|
|
|
activityList
|
|
|
})
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ activityList.forEach((item, index) => {
|
|
|
+ if (item.bannerType == 4 && item.voucherType) {
|
|
|
+
|
|
|
+ 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');
|
|
|
+
|
|
|
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,
|