mirror of
https://gitee.com/yudaocode/yudao-mall-uniapp.git
synced 2025-12-30 01:32:26 +00:00
fix(支付): 在没查询到支付结果的情况下按芋艿要求加回3次共4.5秒的支付结果轮询
Signed-off-by: 王佳星 <417783514@qq.com>
This commit is contained in:
@@ -137,6 +137,16 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 2.1 情况三一:未支付,且轮询次数小于三次,则继续轮询
|
||||
if (state.counter < 3 && state.result === 'unpaid') {
|
||||
setTimeout(() => {
|
||||
getOrderInfo(id);
|
||||
}, 1500);
|
||||
}
|
||||
// 2.2 情况二:超过三次检测才判断为支付失败
|
||||
if (state.counter >= 3) {
|
||||
state.result = 'failed';
|
||||
}
|
||||
}
|
||||
|
||||
function onOrder() {
|
||||
|
||||
Reference in New Issue
Block a user