|
@@ -176,12 +176,14 @@
|
|
|
async confirmOrder() {
|
|
|
//小程序创建的订单,先在后台创建订单,创建成功后跳转至支付页面
|
|
|
if (this.order.orderSource === 'MINI_APP') {
|
|
|
- let createOrderRes = await uni.$http.post('/hotelOrder', this.order)
|
|
|
- if (createOrderRes.data.code !== 200) {
|
|
|
- uni.$showMsg('订单创建失败,请重试')
|
|
|
- return
|
|
|
+ if (!this.order.orderId) {
|
|
|
+ let createOrderRes = await uni.$http.post('/hotelOrder', this.order)
|
|
|
+ if (createOrderRes.data.code !== 200) {
|
|
|
+ uni.$showMsg('订单创建失败,请重试')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.updateOrder(createOrderRes.data.data)
|
|
|
}
|
|
|
- this.updateOrder(createOrderRes.data.data)
|
|
|
this.confirmDone = true
|
|
|
this.title = '订单支付'
|
|
|
} else {
|