fix(支付): 在没查询到支付结果的情况下按芋艿要求加回3次共4.5秒的支付结果轮询

Signed-off-by: 王佳星 <417783514@qq.com>
This commit is contained in:
王佳星
2025-08-07 23:31:19 +00:00
committed by Gitee
parent 82b0127fab
commit a335b2b8dc

View File

@@ -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() {