From c7c8c0ce21e652d9b4f3746af422a67d21629d10 Mon Sep 17 00:00:00 2001 From: dzq Date: Tue, 27 May 2025 11:00:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=94=AF=E4=BB=98):=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=80=89=E6=8B=A9=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当用户是企业登录时,默认选择余额支付,否则选择微信支付。同时修复企业登录状态下余额支付选项的显示问题。 --- src/pages/product/components/checkout.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/product/components/checkout.vue b/src/pages/product/components/checkout.vue index 96e4fe5..3fb12f2 100644 --- a/src/pages/product/components/checkout.vue +++ b/src/pages/product/components/checkout.vue @@ -22,7 +22,15 @@ const { tel, userid: ab98Userid, name } = storeToRefs(ab98UserStore) const selectedPayment = ref<'wechat' | 'balance'>('wechat') const contact = ref("") const remark = ref("") -const submitting = ref(false) +const submitting = ref(false); + +watch(corpidLogin, (newValue) => { + if (newValue) { + selectedPayment.value = 'balance'; + } else { + selectedPayment.value = 'wechat'; + } +}, { immediate: true }); function callWxJsApi(paymentInfo: WxJsApiPreCreateResponse) { return new Promise((resolve, reject) => { @@ -194,7 +202,7 @@ async function handleSubmit() { -