|
@@ -140,31 +140,32 @@ export default defineComponent({
|
|
const submitNativePay = async () => {
|
|
const submitNativePay = async () => {
|
|
// 支付...
|
|
// 支付...
|
|
try {
|
|
try {
|
|
|
|
+ const payChannel = state.payType === 'zfb' ? 'ali_app' : 'wx_app'
|
|
console.log(props.paymentConfig, 'paymentConfig')
|
|
console.log(props.paymentConfig, 'paymentConfig')
|
|
|
|
+ let paymentType = props.paymentVendor
|
|
|
|
+ props.paymentChannels.forEach((item: any) => {
|
|
|
|
+ if (state.payType === 'zfb' && item.indexOf('alipay') !== -1) {
|
|
|
|
+ paymentType = item
|
|
|
|
+ }
|
|
|
|
+ if (state.payType === 'wx' && item.indexOf('wxpay') !== -1) {
|
|
|
|
+ paymentType = item
|
|
|
|
+ }
|
|
|
|
+ })
|
|
const params = {
|
|
const params = {
|
|
- orderNo: props.paymentConfig.orderNo,
|
|
|
|
- payChannel: state.payType,
|
|
|
|
- paymentClient: null as any
|
|
|
|
|
|
+ // orderNo: props.paymentConfig.orderNo,
|
|
|
|
+ merOrderNo: props.paymentConfig.orderNo,
|
|
|
|
+ payChannel,
|
|
|
|
+ paymentType
|
|
}
|
|
}
|
|
- // if (this.paymentType === 'goodsPay') {
|
|
|
|
- // params.paymentClient = state.platformType
|
|
|
|
- // }
|
|
|
|
- // const payMap: any = {
|
|
|
|
- // merOrderNo: state.orderNo,
|
|
|
|
- // paymentChannel: state.pay_channel, // 支付渠道
|
|
|
|
- // userId: state.userId,
|
|
|
|
- // code: state.code
|
|
|
|
- // }
|
|
|
|
const res = await request.post(
|
|
const res = await request.post(
|
|
- urlFix + '/open/userOrder/executePayment/v2',
|
|
|
|
|
|
+ urlFix + '/userOrder/executePayment/v2',
|
|
{
|
|
{
|
|
data: {
|
|
data: {
|
|
...params
|
|
...params
|
|
}
|
|
}
|
|
}
|
|
}
|
|
)
|
|
)
|
|
- console.log(res, 'response')
|
|
|
|
- const payChannel = state.payType === 'zfb' ? 'ali_app' : 'wx_app'
|
|
|
|
|
|
+
|
|
postMessage({
|
|
postMessage({
|
|
api: 'paymentOrder',
|
|
api: 'paymentOrder',
|
|
content: {
|
|
content: {
|