对接支付优惠

This commit is contained in:
gyq
2025-03-11 09:10:49 +08:00
parent 5cf2355d28
commit 3df0cce9ec
31 changed files with 1527 additions and 846 deletions

View File

@@ -58,7 +58,7 @@ import { scanpay, queryOrder, quickPay, queryQuickPayStatus, accountPay, querySc
import { useUser } from "@/store/user.js";
import { useGlobal } from '@/store/global.js'
import { formatDecimal } from '@/utils'
import { microPay, queryOrderStatus, microPayVip } from '@/api/order.js'
import { microPay, queryOrderStatus, microPayVip, vipPay } from '@/api/order.js'
const store = useUser();
const global = useGlobal()
@@ -89,6 +89,7 @@ const props = defineProps({
type: Boolean,
default: false,
},
// 支付类型
payType: {
type: [Number, String],
default: "",
@@ -119,11 +120,20 @@ async function submitHandle() {
if (!scanCode.value) return;
loading.value = true;
if (props.selecttype == 0) {
// 正常下单扫码支付
await microPay({
...props.payData,
authCode: scanCode.value
});
// 下单扫码支付
if (props.payType == 'payType') {
await microPay({
...props.payData,
authCode: scanCode.value
});
} else if (props.payType == 'deposit') {
await vipPay({
...props.payData,
payType: 'scanCode',
authCode: scanCode.value
});
}
} else if (props.selecttype == 1) {
// 会员扫码充值
await microPayVip({
@@ -133,6 +143,7 @@ async function submitHandle() {
authCode: scanCode.value
})
} else {
// 快捷收银
if (props.fast) {
await quickPay({
amount: props.amount,