修复bug
This commit is contained in:
@@ -188,6 +188,7 @@ const callPhoneFn = (phone: string) => {
|
||||
const payMethodOptions = ref({
|
||||
orderId: '',
|
||||
cardId: '',
|
||||
cardNumber: '',
|
||||
payMethod: 1, // 支付方式 1信用卡 2余额
|
||||
payPassword: '',
|
||||
})
|
||||
@@ -216,9 +217,20 @@ function goPay() {
|
||||
// 如果是余额支付,弹出支付密码弹窗
|
||||
if(payMethodOptions.value.payMethod === 2) {
|
||||
passwordInputRef.value?.showPasswordInput()
|
||||
} else {
|
||||
appMerchantOrderPayOrder()
|
||||
return
|
||||
}
|
||||
// 信用卡支付:必须已绑定卡(与 appMerchantOrderPayOrder 入参一致,避免 cardId/cardNumber 为空仍请求)
|
||||
if (payMethodOptions.value.payMethod === 1) {
|
||||
const cardId = String(payMethodOptions.value.cardId || '').trim()
|
||||
if (!cardId) {
|
||||
uni.showToast({
|
||||
title: t('pages-store.order.pleaseBindCreditCard'),
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
appMerchantOrderPayOrder()
|
||||
}
|
||||
function payPawSuccess(password: string) {
|
||||
payMethodOptions.value.payPassword = password
|
||||
|
||||
Reference in New Issue
Block a user