Authored by lea guo

yohood原价购

... ... @@ -86,7 +86,10 @@ Component({
this.commonService = new CommonService();
const timeId = setInterval(() => {
if (this.data.isStart) {
this.triggerEvent('changeStatus');
const changeStatusTimeId = setTimeout(()=> {
this.triggerEvent('changeStatus');
clearTimeout(changeStatusTimeId)
}, 1000);
clearInterval(timeId);
}
const fomartTimes = fomartCountdownTime({
... ... @@ -94,7 +97,7 @@ Component({
});
this.setData({
remainingTime: fomartTimes.join(':') || '00:00:00',
isStart: fomartTimes.length === 0,
isStart: fomartTimes.length === 0 && this.properties.status === 1,
});
}, 1000);
},
... ...
... ... @@ -37,13 +37,16 @@ Component({
ready: function() {
const timeId = setInterval(() => {
if (this.data.isEnd) {
this.triggerEvent('changeStatus');
const changeStatusTimeId = setTimeout(()=> {
this.triggerEvent('changeStatus');
clearTimeout(changeStatusTimeId)
}, 1000);
clearInterval(timeId);
}
const formatTimeList = this.formatCountDown();
this.setData({
formatTimeList: formatTimeList,
isEnd: formatTimeList.length === 0,
isEnd: formatTimeList.length === 0 && this.properties.product.status === 2,
});
}, 1000);
},
... ...
... ... @@ -19,7 +19,7 @@
<text class="next-time">{{nextActivityTime}}</text>
</view>
<view class="avatarcontainer">
<view class="avatars" wx:if="{{product.status === 2 && avatars.length > 0 && !show}}">
<view class="avatars" wx:if="{{avatars.length > 0 && !show}}">
<avatars list="{{avatars}}"></avatars>
</view>
<image class="product_image" src="{{product.cover_img}}"></image>
... ...