对接订单列表接口
This commit is contained in:
@@ -58,6 +58,8 @@ 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 } from '@/api/order.js'
|
||||
|
||||
const store = useUser();
|
||||
const global = useGlobal()
|
||||
import {
|
||||
@@ -93,6 +95,10 @@ const props = defineProps({
|
||||
money: {
|
||||
type: [Number, String],
|
||||
default: 0,
|
||||
},
|
||||
payData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -112,14 +118,7 @@ async function submitHandle() {
|
||||
if (!scanCode.value) return;
|
||||
loading.value = true;
|
||||
if (props.selecttype == 1) {
|
||||
await membermemberScanPay({
|
||||
shopId: store.userInfo.shopId,
|
||||
memberId: props.orderId,
|
||||
amount: props.amount,
|
||||
authCode: scanCode.value,
|
||||
// payAmount: props.money < props.amount ? props.money : '',
|
||||
// discountAmount: props.money < props.amount ? formatDecimal(props.amount - props.money) : ''
|
||||
});
|
||||
await microPay(props.payData);
|
||||
} else {
|
||||
if (props.fast) {
|
||||
await quickPay({
|
||||
@@ -129,11 +128,10 @@ async function submitHandle() {
|
||||
});
|
||||
} else {
|
||||
if (props.payType == 'scanCode') {
|
||||
await scanpay({
|
||||
orderId: props.orderId,
|
||||
authCode: scanCode.value,
|
||||
payAmount: props.money < props.amount ? props.money : '',
|
||||
discountAmount: props.money < props.amount ? formatDecimal(props.amount - props.money) : ''
|
||||
// 正常下单扫码支付
|
||||
await microPay({
|
||||
...props.payData,
|
||||
authCode: scanCode.value
|
||||
});
|
||||
}
|
||||
if (props.payType == 'deposit') {
|
||||
|
||||
Reference in New Issue
Block a user