优化打印效果
This commit is contained in:
@@ -105,26 +105,30 @@ function payTypeChange(index, item) {
|
||||
// 结算支付
|
||||
async function confirmOrder() {
|
||||
try {
|
||||
if (money.value < props.amount) return
|
||||
payLoading.value = true
|
||||
switch (payList.value[payActive.value].payType) {
|
||||
case 'deposit':
|
||||
await accountPay({
|
||||
orderId: props.orderId,
|
||||
memberId: 1
|
||||
})
|
||||
break;
|
||||
case 'cash':
|
||||
await cashPay({
|
||||
orderId: props.orderId
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (payList.value[payActive.value].payType == 'scanCode') {
|
||||
scanModalRef.value.show()
|
||||
} else {
|
||||
if (money.value < props.amount) return
|
||||
payLoading.value = true
|
||||
switch (payList.value[payActive.value].payType) {
|
||||
case 'deposit':
|
||||
await accountPay({
|
||||
orderId: props.orderId,
|
||||
memberId: 1
|
||||
})
|
||||
break;
|
||||
case 'cash':
|
||||
await cashPay({
|
||||
orderId: props.orderId
|
||||
})
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ElMessage.success('支付成功')
|
||||
emit('paySuccess')
|
||||
payLoading.value = false
|
||||
}
|
||||
ElMessage.success('支付成功')
|
||||
emit('paySuccess')
|
||||
payLoading.value = false
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
payLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user