mirror of
https://gitee.com/bootx/dax-pay-h5.git
synced 2025-10-14 06:04:51 +00:00
fix 微信相关支付不支持跳转调用方式
This commit is contained in:
@@ -205,10 +205,14 @@ function pay() {
|
||||
} as AggregatePayParam
|
||||
aggregatePay(from)
|
||||
.then(({ data }) => {
|
||||
loading.value = false
|
||||
// 拉起jsapi支付
|
||||
// 根据类型拉起对应的支付。 支持跳转和jsapi
|
||||
if (orderAndConfig.value?.aggregateConfig.callType === GatewayCallTypeEnum.jsapi){
|
||||
const json = JSON.parse(data.payBody)
|
||||
jsapiPay(json)
|
||||
}
|
||||
if (orderAndConfig.value?.aggregateConfig.callType === GatewayCallTypeEnum.link){
|
||||
location.replace(data.payBody as any)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ import {
|
||||
getCashierCodeConfig,
|
||||
} from '../CashierCode.api'
|
||||
|
||||
import { AggregateEnum, CashierCodeTypeEnum } from '@/enums/daxpay/DaxPayEnum'
|
||||
import { AggregateEnum, CashierCodeTypeEnum, GatewayCallTypeEnum } from '@/enums/daxpay/DaxPayEnum'
|
||||
import router from '@/router'
|
||||
import { useKeyboard } from '@/hooks/daxpay/useKeyboard'
|
||||
|
||||
@@ -153,9 +153,14 @@ function pay() {
|
||||
cashierPay(from)
|
||||
.then(({ data }) => {
|
||||
loading.value = false
|
||||
// 拉起jsapi支付
|
||||
// 根据类型拉起对应的支付。 支持跳转和jsapi
|
||||
if (cashierInfo.value?.callType === GatewayCallTypeEnum.jsapi) {
|
||||
const json = JSON.parse(data.payBody)
|
||||
jsapiPay(json)
|
||||
}
|
||||
if (cashierInfo.value?.callType === GatewayCallTypeEnum.link) {
|
||||
location.replace(data.payBody as any)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user