Commit 007c4fd2 by zeven

优化迷你店商品订单列表

parent a8f311f0
......@@ -161,6 +161,7 @@ class FacePage extends Component {
if (timeout === false) {
this.setState({
orderDetailMini: false,
goodsArr: [],
});
clearTimeout(this.goodsCounterTimer);
clearInterval(this.goodsCounterInter);
......@@ -175,11 +176,10 @@ class FacePage extends Component {
orderDetailMini: true,
});
this.goodsCounterTimer = setTimeout(() => {
let data = [];
clearInterval(this.goodsCounterInter);
this.setState({
orderDetailMini: false,
goodsArr: data,
goodsArr: [],
});
}, timeout);
};
......@@ -191,6 +191,7 @@ class FacePage extends Component {
const {data} = await this.props.dispatch({
type: 'goods/getOrderCounter',
});
if (data && data.length)
this.setState({
goodsArr: data,
});
......
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