|
@@ -119,18 +119,9 @@ export default defineComponent({
|
|
|
//
|
|
|
}
|
|
|
}
|
|
|
- // 判断是否已经有支付方式了
|
|
|
- const paymentConfig = orderStatus.orderObject.paymentConfig || {}
|
|
|
- if (
|
|
|
- paymentConfig.paymentVendor &&
|
|
|
- paymentConfig.paymentVersion &&
|
|
|
- orderStatus.orderObject.orderNo
|
|
|
- ) {
|
|
|
- this.paymentVersion = orderStatus.orderObject.paymentVendor || 'V1'
|
|
|
- this.paymentVendor = orderStatus.orderObject.paymentVersion
|
|
|
- } else {
|
|
|
- await this.getOrderPayType()
|
|
|
- }
|
|
|
+
|
|
|
+ await this.getOrderPayType()
|
|
|
+
|
|
|
this.orderAmount = orderStatus.orderObject.actualPrice || 0
|
|
|
this.orderPrice = orderStatus.orderObject.actualPrice || 0
|
|
|
this.dataLoading = false
|
|
@@ -198,8 +189,21 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
- this.paymentVersion = data.paymentVersion || 'V1'
|
|
|
- this.paymentVendor = data.paymentVendor
|
|
|
+
|
|
|
+ // 判断是否已经有支付方式了
|
|
|
+ const paymentConfig = orderStatus.orderObject.paymentConfig || {}
|
|
|
+ if (
|
|
|
+ paymentConfig.paymentVendor &&
|
|
|
+ paymentConfig.paymentVersion &&
|
|
|
+ orderStatus.orderObject.orderNo
|
|
|
+ ) {
|
|
|
+ this.paymentVersion = paymentConfig.paymentVersion || 'V1'
|
|
|
+ this.paymentVendor = paymentConfig.paymentVendor
|
|
|
+ } else {
|
|
|
+ this.paymentVersion = data.paymentVersion || 'V1'
|
|
|
+ this.paymentVendor = data.paymentVendor
|
|
|
+ }
|
|
|
+
|
|
|
this.paymentChannels = data.paymentChannels // 可以选择的支付类型
|
|
|
} catch {
|
|
|
//
|
|
@@ -232,16 +236,24 @@ export default defineComponent({
|
|
|
} else {
|
|
|
this.orderInfo = orderStatus.orderObject.paymentConfig || {}
|
|
|
this.orderNo = orderStatus.orderObject.orderNo
|
|
|
- const paymentChannel =
|
|
|
- orderStatus.orderObject.paymentConfig.paymentConfig.paymentChannel
|
|
|
- if (paymentChannel) {
|
|
|
- const payCode = beforeSubmit(paymentChannel)
|
|
|
- this.onConfirm({
|
|
|
- payCode,
|
|
|
- pay_channel: paymentChannel
|
|
|
- })
|
|
|
- } else {
|
|
|
+ const paymentChannel = this.orderInfo.paymentConfig.paymentChannel
|
|
|
+
|
|
|
+ // 判断是否为原生支付
|
|
|
+ if (
|
|
|
+ this.orderInfo.paymentVendor.indexOf('wxpay') > -1 ||
|
|
|
+ this.orderInfo.paymentVendor.indexOf('alipay') > -1
|
|
|
+ ) {
|
|
|
this.paymentStatus = true
|
|
|
+ } else {
|
|
|
+ if (paymentChannel) {
|
|
|
+ const payCode = beforeSubmit(paymentChannel)
|
|
|
+ this.onConfirm({
|
|
|
+ payCode,
|
|
|
+ pay_channel: paymentChannel
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.paymentStatus = true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|