From 817b2ec5cebbc66fe5554a29be474f6c6c6a3b00 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, 10 Jul 2025 13:43:33 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fix(=E6=94=AF=E4=BB=98):=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E9=87=8C=E6=9C=89=E5=AD=98=E7=94=A8=E6=88=B7?= =?UTF-8?q?openid=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E4=B8=8D=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E2=80=9C=E8=AF=B7=E5=85=88=E7=BB=91=E5=AE=9A=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=86=8D=E4=BD=BF=E7=94=A8=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E2=80=9D=E7=9A=84=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王佳星 <417783514@qq.com> --- sheep/platform/pay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sheep/platform/pay.js b/sheep/platform/pay.js index ced3aa07..9655f8ae 100644 --- a/sheep/platform/pay.js +++ b/sheep/platform/pay.js @@ -93,7 +93,7 @@ export default class SheepPay { }; // 特殊逻辑:微信公众号、小程序支付时,必须传入 openid if (['wx_pub', 'wx_lite'].includes(channel)) { - const openid = await sheep.$platform.useProvider('wechat').getOpenid(); + const openid = await sheep.$platform.useProvider('wechat').getOpenid(true); // 如果获取不到 openid,微信无法发起支付,此时需要引导 if (!openid) { this.bindWeixin(); From 82b0127fab996167530f5ca8697a57859d499a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BD=B3=E6=98=9F?= <417783514@qq.com> Date: Fri, 11 Jul 2025 13:18:11 +0000 Subject: [PATCH 2/3] =?UTF-8?q?fix(=E6=94=AF=E4=BB=98):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=90=8E=E6=94=AF=E4=BB=98=E7=8A=B6=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84bug?= 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 | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/pages/pay/result.vue b/pages/pay/result.vue index c52b1195..7a24c835 100644 --- a/pages/pay/result.vue +++ b/pages/pay/result.vue @@ -17,7 +17,7 @@ 支付成功 支付失败 该订单已关闭 - 检测支付结果... + 正在查询支付结果... ¥{{ fen2yuan(state.orderInfo.price) }} @@ -101,7 +101,7 @@ async function getOrderInfo(id) { state.counter++; // 1. 加载订单信息 - const { data, code } = await PayOrderApi.getOrder(id); + const { data, code } = await PayOrderApi.getOrder(id, true); if (code === 0) { state.orderInfo = data; if (!state.orderInfo || state.orderInfo.status === 30) { @@ -137,16 +137,6 @@ 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() { 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 3/3] =?UTF-8?q?fix(=E6=94=AF=E4=BB=98):=20=E5=9C=A8?= =?UTF-8?q?=E6=B2=A1=E6=9F=A5=E8=AF=A2=E5=88=B0=E6=94=AF=E4=BB=98=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=8C=89=E8=8A=8B?= =?UTF-8?q?=E8=89=BF=E8=A6=81=E6=B1=82=E5=8A=A0=E5=9B=9E3=E6=AC=A1?= =?UTF-8?q?=E5=85=B14.5=E7=A7=92=E7=9A=84=E6=94=AF=E4=BB=98=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E8=BD=AE=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() {