yeg
2026-09-16 8fe2249e07ebe15b33e0231cd9dafa7c303486f6
rencaika/pages/pending-payment/pending-payment.uvue
@@ -140,6 +140,11 @@
            uni.redirectTo({ url: '/pages/order-cancelled/order-cancelled?orderId=' + encodeURIComponent(orderId.value) + '&talentId=' + encodeURIComponent(talentId.value) })
            return
         }
         // 支付成功但回调没到达时,本地订单会停在待支付。已支付的订单不该再给出「确认支付」和「取消订单」。
         if (data != null && Number(data.orderStatus) == 1) {
            openPaymentSuccess()
            return
         }
         merchantName.value = data.merchantNameSnapshot != null ? data.merchantNameSnapshot as string : '人才权益服务'
         merchantAddress.value = data.merchantAddressSnapshot != null ? data.merchantAddressSnapshot as string : ''
         merchantMobile.value = data.merchantMobileSnapshot != null ? data.merchantMobileSnapshot as string : ''
@@ -165,6 +170,8 @@
         } else {
            stopCountdown()
         }
         // 回调没到达时「待支付」只说明本地不知道。打开页面时问一次通道,钱已经收下就进支付成功页。
         if (data.canPay === true) checkPaymentStatus(false)
      }, (error: any) => { loading.value = false; loadFailed.value = true; loadErrorText.value = error.message })
   }
   const startCountdown = () => {
@@ -259,6 +266,9 @@
            }, (error: any) => {
               isSubmitting.value = false
               uni.showToast({ title: error.message, icon: 'none' })
               // 取消失败最常见的原因就是这笔订单其实已经支付成功(回调没到达)。再问一次支付状态,
               // 是已支付就跳到支付成功页,而不是把用户留在「待支付」页反复点取消。
               checkPaymentStatus(false)
            })
         }
      })