|
@@ -1,5 +1,5 @@
|
|
import ColProtocol from '@/components/col-protocol'
|
|
import ColProtocol from '@/components/col-protocol'
|
|
-import { Button, Dialog, Icon, Popup, Sticky, Toast } from 'vant'
|
|
|
|
|
|
+import { Button, Dialog, Popup, Toast } from 'vant'
|
|
import ColPopup from '@/components/col-popup'
|
|
import ColPopup from '@/components/col-popup'
|
|
import { defineComponent } from 'vue'
|
|
import { defineComponent } from 'vue'
|
|
import { postMessage } from '@/helpers/native-message'
|
|
import { postMessage } from '@/helpers/native-message'
|
|
@@ -14,7 +14,7 @@ import qs from 'query-string'
|
|
// status: 'success | fail'
|
|
// status: 'success | fail'
|
|
// }})
|
|
// }})
|
|
|
|
|
|
-import iconTips from '@common/images/icon_tips.png'
|
|
|
|
|
|
+// import iconTips from '@common/images/icon_tips.png'
|
|
import Payment from './payment'
|
|
import Payment from './payment'
|
|
import UrlPayment from '../adapay/payment'
|
|
import UrlPayment from '../adapay/payment'
|
|
import ColHeader from '@/components/col-header'
|
|
import ColHeader from '@/components/col-header'
|
|
@@ -31,7 +31,7 @@ import OrderLive from './order-live'
|
|
import OrderPractice from './order-practice'
|
|
import OrderPractice from './order-practice'
|
|
import OrderVip from './order-vip'
|
|
import OrderVip from './order-vip'
|
|
import OrderMusic from './order-music'
|
|
import OrderMusic from './order-music'
|
|
-import { browser, moneyFormat } from '@/helpers/utils'
|
|
|
|
|
|
+import { moneyFormat } from '@/helpers/utils'
|
|
import OrderPinao from './order-pinao'
|
|
import OrderPinao from './order-pinao'
|
|
import { getMusicDetail } from '@/student/trade/tradeOrder'
|
|
import { getMusicDetail } from '@/student/trade/tradeOrder'
|
|
import OrderActive from './order-active'
|
|
import OrderActive from './order-active'
|
|
@@ -61,6 +61,7 @@ export default defineComponent({
|
|
bottomHeight: 0,
|
|
bottomHeight: 0,
|
|
paymentVendor: '', //支付厂商
|
|
paymentVendor: '', //支付厂商
|
|
paymentVersion: 'V1', // 支付版本,可用值:V1 老版,V2 新版
|
|
paymentVersion: 'V1', // 支付版本,可用值:V1 老版,V2 新版
|
|
|
|
+ paymentChannels: [] as any, // 可以选择的支付类型
|
|
showQrcode: false,
|
|
showQrcode: false,
|
|
orderTimer: null as any,
|
|
orderTimer: null as any,
|
|
qrCodeUrl: '',
|
|
qrCodeUrl: '',
|
|
@@ -118,7 +119,18 @@ export default defineComponent({
|
|
//
|
|
//
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- await this.getOrderPayType()
|
|
|
|
|
|
+ // 判断是否已经有支付方式了
|
|
|
|
+ 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()
|
|
|
|
+ }
|
|
this.orderAmount = orderStatus.orderObject.actualPrice || 0
|
|
this.orderAmount = orderStatus.orderObject.actualPrice || 0
|
|
this.orderPrice = orderStatus.orderObject.actualPrice || 0
|
|
this.orderPrice = orderStatus.orderObject.actualPrice || 0
|
|
this.dataLoading = false
|
|
this.dataLoading = false
|
|
@@ -156,7 +168,7 @@ export default defineComponent({
|
|
async getOrderPayType() {
|
|
async getOrderPayType() {
|
|
try {
|
|
try {
|
|
const orderObject = orderStatus.orderObject
|
|
const orderObject = orderStatus.orderObject
|
|
- console.log(orderObject)
|
|
|
|
|
|
+ // 单独处理其它支付类型下面用的bizId
|
|
let bizId =
|
|
let bizId =
|
|
orderObject.orderList.length > 0 ? orderObject.orderList[0].id : ''
|
|
orderObject.orderList.length > 0 ? orderObject.orderList[0].id : ''
|
|
if (orderObject.orderType === 'PRACTICE') {
|
|
if (orderObject.orderType === 'PRACTICE') {
|
|
@@ -188,6 +200,7 @@ export default defineComponent({
|
|
)
|
|
)
|
|
this.paymentVersion = data.paymentVersion || 'V1'
|
|
this.paymentVersion = data.paymentVersion || 'V1'
|
|
this.paymentVendor = data.paymentVendor
|
|
this.paymentVendor = data.paymentVendor
|
|
|
|
+ this.paymentChannels = data.paymentChannels // 可以选择的支付类型
|
|
} catch {
|
|
} catch {
|
|
//
|
|
//
|
|
}
|
|
}
|
|
@@ -212,7 +225,6 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- console.log(orderStatus.orderObject, 'orderInfo')
|
|
|
|
// 判断是否有订单号
|
|
// 判断是否有订单号
|
|
if (orderStatus.orderObject.orderNo) {
|
|
if (orderStatus.orderObject.orderNo) {
|
|
if (this.paymentVersion === 'V1') {
|
|
if (this.paymentVersion === 'V1') {
|
|
@@ -279,9 +291,7 @@ export default defineComponent({
|
|
const res = await request.post(url, {
|
|
const res = await request.post(url, {
|
|
data: {
|
|
data: {
|
|
activityId: orderObject.activityId || null,
|
|
activityId: orderObject.activityId || null,
|
|
- // bizId: '',
|
|
|
|
couponIds: orderObject.couponId,
|
|
couponIds: orderObject.couponId,
|
|
- // currentPrice: 0,
|
|
|
|
goodsInfos: [...orderTenantInfos()],
|
|
goodsInfos: [...orderTenantInfos()],
|
|
orderDesc: orderObject.orderDesc,
|
|
orderDesc: orderObject.orderDesc,
|
|
orderName: orderObject.orderName,
|
|
orderName: orderObject.orderName,
|
|
@@ -512,11 +522,17 @@ export default defineComponent({
|
|
onBackOut={this.onBackOut}
|
|
onBackOut={this.onBackOut}
|
|
/>
|
|
/>
|
|
) : (
|
|
) : (
|
|
|
|
+ // this.paymentVersion = data.paymentVersion || 'V1'
|
|
|
|
+ // this.paymentVendor = data.paymentVendor
|
|
|
|
+ // this.paymentChannels = data.paymentChannels // 可以选择的支付类型
|
|
<UrlPayment
|
|
<UrlPayment
|
|
paymentConfig={{
|
|
paymentConfig={{
|
|
...orderStatus.orderObject,
|
|
...orderStatus.orderObject,
|
|
orderNo: this.orderNo
|
|
orderNo: this.orderNo
|
|
}}
|
|
}}
|
|
|
|
+ // paymentVersion={this.paymentVersion}
|
|
|
|
+ paymentVendor={this.paymentVendor}
|
|
|
|
+ paymentChannels={this.paymentChannels}
|
|
onClose={() => (this.paymentStatus = false)}
|
|
onClose={() => (this.paymentStatus = false)}
|
|
onBackOut={this.onBackOut}
|
|
onBackOut={this.onBackOut}
|
|
onConfirm={(val: any) => this.onConfirm(val)}
|
|
onConfirm={(val: any) => this.onConfirm(val)}
|