From a335b2b8dc0960ec79372ad1c7e4f3614f6768e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BD=B3=E6=98=9F?= <417783514@qq.com> Date: Thu, 7 Aug 2025 23:31:19 +0000 Subject: [PATCH] =?UTF-8?q?fix(=E6=94=AF=E4=BB=98):=20=E5=9C=A8=E6=B2=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=88=B0=E6=94=AF=E4=BB=98=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=8C=89=E8=8A=8B=E8=89=BF?= =?UTF-8?q?=E8=A6=81=E6=B1=82=E5=8A=A0=E5=9B=9E3=E6=AC=A1=E5=85=B14.5?= =?UTF-8?q?=E7=A7=92=E7=9A=84=E6=94=AF=E4=BB=98=E7=BB=93=E6=9E=9C=E8=BD=AE?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王佳星 <417783514@qq.com> --- pages/pay/result.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pages/pay/result.vue b/pages/pay/result.vue index 7a24c835..e63e5bf8 100644 --- a/pages/pay/result.vue +++ b/pages/pay/result.vue @@ -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() {