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() { -