From 00f1bcd0fa5e41c42d2cc265c29ed04ec16185db Mon Sep 17 00:00:00 2001 From: gqt <3217233537@qq.com> Date: Wed, 29 Jul 2026 13:17:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=A2=E5=9C=BA=E9=A1=B55=E7=A7=92?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0=20+=20=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=A1=B5=E4=BB=85=E5=9C=BA=E5=9C=B0=E9=A2=84=E7=BA=A6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BD=99=E9=A2=9D=E6=94=AF=E4=BB=98(=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3business=5Ftype)=20+=20=E6=B8=85=E7=90=86=E5=86=97?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/comprehensive/pay/index.vue | 32 ++++++------------- .../src/pages/comprehensive/private/index.vue | 3 +- miniprogram/src/pages/ice/private/index.vue | 3 +- miniprogram/src/pages/private/index.vue | 26 +++++++++++++-- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/miniprogram/src/pages/comprehensive/pay/index.vue b/miniprogram/src/pages/comprehensive/pay/index.vue index c40362d..705651e 100644 --- a/miniprogram/src/pages/comprehensive/pay/index.vue +++ b/miniprogram/src/pages/comprehensive/pay/index.vue @@ -24,7 +24,7 @@ 支付方式 order.value?.business_type === 'stored_value') +const isWechatOnlyOrder = computed(() => order.value?.business_type !== 'private_booking') const canUseBalance = computed(() => { - if (isStoredValueOrder.value) return false return toAmountNumber(balance.value.balance) >= toAmountNumber(order.value?.amount) }) const canPay = computed(() => order.value?.status === 'pending_pay' && (payMethod.value !== 'balance' || canUseBalance.value)) @@ -107,16 +106,12 @@ onUnmounted(() => { }) const loadPage = async () => { - const [orderData, balanceData] = await Promise.all([ - orderApi.getOrderDetail(orderId.value), - memberApi.getBalance() - ]) - order.value = orderData - balance.value = balanceData - if (isStoredValueOrder.value) { - payMethod.value = 'wechat' - } else if (!canUseBalance.value) { + order.value = await orderApi.getOrderDetail(orderId.value) + if (isWechatOnlyOrder.value) { payMethod.value = 'wechat' + } else { + balance.value = await memberApi.getBalance() + payMethod.value = canUseBalance.value ? 'balance' : 'wechat' } updateCountdownTimer() } @@ -140,22 +135,15 @@ const stopCountdown = () => { const padTime = (value) => String(value).padStart(2, '0') const selectMethod = (method) => { - if (method === 'balance') { - if (isStoredValueOrder.value) { - uni.showToast({ title: '储值卡订单仅支持微信支付', icon: 'none' }) - return - } - if (!canUseBalance.value) { - uni.showToast({ title: '余额不足', icon: 'none' }) - return - } + if (method === 'balance' && !canUseBalance.value) { + uni.showToast({ title: '余额不足', icon: 'none' }) + return } payMethod.value = method } const pay = async () => { if (!canPay.value || isSubmitting.value) return - if (isStoredValueOrder.value && payMethod.value === 'balance') return isSubmitting.value = true try { if (payMethod.value === 'balance') { diff --git a/miniprogram/src/pages/comprehensive/private/index.vue b/miniprogram/src/pages/comprehensive/private/index.vue index 8863720..2519b2b 100644 --- a/miniprogram/src/pages/comprehensive/private/index.vue +++ b/miniprogram/src/pages/comprehensive/private/index.vue @@ -372,7 +372,8 @@ async function refresh() { } defineExpose({ - refresh + refresh, + loadGrid }) diff --git a/miniprogram/src/pages/ice/private/index.vue b/miniprogram/src/pages/ice/private/index.vue index 52444dd..f314151 100644 --- a/miniprogram/src/pages/ice/private/index.vue +++ b/miniprogram/src/pages/ice/private/index.vue @@ -10,7 +10,8 @@ diff --git a/miniprogram/src/pages/private/index.vue b/miniprogram/src/pages/private/index.vue index 1eef816..e9d9db8 100644 --- a/miniprogram/src/pages/private/index.vue +++ b/miniprogram/src/pages/private/index.vue @@ -7,7 +7,7 @@