Commit e73876b1 by zeven

修复迷你店显示订单问题

parent 5845778f
......@@ -40,7 +40,7 @@ axios.interceptors.request.use(config => {
});
axios.interceptors.response.use(res => {
// 请求拦截器,自动添加token
if (res.data.code < 0) {
if (res.data.code < 0 && res.data.msg) {
Toast.fail(res.data.msg);
}
return res;
......
......@@ -160,12 +160,12 @@ class FacePage extends Component {
* @param {Boolean} timeoutt 当参数为false时会清空定时器
*/
orderDetailMiniPop = timeoutt => {
let timerr = null;
if (timeoutt === false) {
this.setState({
orderDetailMini: false,
});
clearTimeout(timerr);
clearTimeout(this.goodsCounterTimer);
clearInterval(this.goodsCounterInter);
return;
} else if (timeoutt === true) {
this.setState({
......@@ -176,7 +176,7 @@ class FacePage extends Component {
this.setState({
orderDetailMini: true,
});
timerr = setTimeout(() => {
this.goodsCounterTimer = setTimeout(() => {
this.setState({
orderDetailMini: false,
});
......@@ -385,8 +385,10 @@ class FacePage extends Component {
} else if (this.sense) {
this.setState({loadingModal: false});
if ((ret.action = 'enter')) {
this.getOrderDetailMiniCounter();
this.orderDetailMiniPop(1800000);
this.goodsCounterInter = setInterval(() => {
this.getOrderDetailMiniCounter();
}, 3000);
this.orderDetailMiniPop(600000); // 十分钟后关闭弹窗
}
}
}
......
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