Commit 87c48f38 by zeven

修复迷你店订单商品轮询刷新

parent e73876b1
......@@ -156,18 +156,17 @@ class FacePage extends Component {
};
/**
* 用于控制订单详情弹窗,当参数为Number时为弹窗显示时间,当参数为boolean时关闭弹窗
* @param {Number} timeoutt 超时时间
* @param {Boolean} timeoutt 当参数为false时会清空定时器
* @param {Number} timeout 超时时间
*/
orderDetailMiniPop = timeoutt => {
if (timeoutt === false) {
orderDetailMiniPop = timeout => {
if (timeout === false) {
this.setState({
orderDetailMini: false,
});
clearTimeout(this.goodsCounterTimer);
clearInterval(this.goodsCounterInter);
return;
} else if (timeoutt === true) {
} else if (timeout === true) {
this.setState({
orderDetailMini: true,
});
......@@ -177,10 +176,11 @@ class FacePage extends Component {
orderDetailMini: true,
});
this.goodsCounterTimer = setTimeout(() => {
clearInterval(this.goodsCounterInter);
this.setState({
orderDetailMini: false,
});
}, timeoutt);
}, timeout);
};
/**
* 拉取数据,同步至state
......@@ -240,7 +240,7 @@ class FacePage extends Component {
Speech.speak('正在进行安全检查');
// this.getOrderDetailMiniCounter();
// this.orderDetailMiniPop(30000);
this.loading(true, 30000);
// this.loading(true, 30000);
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment