Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定时下单代码为啥跑两次的? #29

Open
bigbigbigfish opened this issue Mar 1, 2021 · 0 comments
Open

定时下单代码为啥跑两次的? #29

bigbigbigfish opened this issue Mar 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@bigbigbigfish
Copy link

    const runOrder = async () => {
        // 流式并行处理加快速度,但可能出错
        this.addCart(this.skuids);
        await sleep(0.06);
        this.getOrderInfo();
        await sleep(0.25);
        this.submitOrder();
    };

这个逻辑是怎么执行顺序的?
log如下,都是两次的提交:
第一次会报,"您选择的收货地址不支持当前的配送方式,请重新选择配送方式
第二次呢会报,购物车数量限购问题。
[INFO]: [2021-03-01T16:00:00.044Z] 商品41429156971-加车成功
List":null,"msgMobile":null,"msgUuid":null,"message":"您选择的收货地址不支持当前的配送方式,请重新选择配送方式!"}
[INFO]: [2021-03-01T16:00:00.165Z] 订单结算页面响应: 200
[INFO]: [2021-03-01T16:00:19.487Z] 商品41429156971-加车成功
[INFO]: [2021-03-01T16:00:19.512Z] submit_order req start at Tue Mar 02 2021 00:00:19 GMT+0800 (CST)
[INFO]: [2021-03-01T16:00:19.553Z] 订单结算页面响应: 200

这个方式从来都是失败,没有成功过。但你使用平时没啥人抢的来测又是可以下单。

@qiin2333 qiin2333 added the bug Something isn't working label Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants