Authored by lea guo

yohood取消自动刷新

... ... @@ -297,9 +297,9 @@ Page(
},
_init(options = {}) {
const { isPulldown } = options
const { isPulldown, id } = options
let params = {
actPrizeId: isPulldown ? '' : this.data.actPrizeId,
actPrizeId: isPulldown ? '' : this.data.actPrizeId || id,
};
return this.service
... ... @@ -310,7 +310,7 @@ Page(
let product = r1.data;
this._getMineCode(product.id);
this._formatCountdownTime(product.remaining);
this._formatCountdownTime(product);
this.setData({
product: product,
... ... @@ -331,7 +331,8 @@ Page(
});
},
_formatCountdownTime(remaining) {
_formatCountdownTime(product) {
let { remaining, id} = product;
// 初始化倒计时时间
const formatTimeList = fomartCountdownTime(remaining);
this.setData({
... ... @@ -349,7 +350,7 @@ Page(
if (isCountdownEnd) {
// 延时500毫秒调接口
const timeId = setTimeout(()=> {
this.changeActionStatus();
this.changeActionStatus({id});
clearTimeout(timeId)
},500)
clearInterval(timeoutId);
... ... @@ -415,11 +416,11 @@ Page(
return this.data.myPrizeCount > 0;
},
changeActionStatus() {
changeActionStatus(options = {}) {
wx.showLoading({
mask: true,
});
this._init();
this._init(options);
},
share(event) {
... ...