Commit 0396f0b8 authored by 潘永坪's avatar 潘永坪

单产品代码优化

parent 66533f99
......@@ -1122,29 +1122,6 @@ export default {
},
//---点击去支付
goPay() {
if (this.serviceList.length == 0) {
//没有额外服务,直接支付
this.placeOrder()
}
if (this.serviceList.length > 0) {
//有额外服务,并且选择了额外服务的,直接支付
if (this.chooseService.length > 0) {
this.placeOrder()
}
}
if (this.serviceList.length > 0) {
if (this.chooseService.length == 0 && this.showErmai) {
//没有购买额外服务,并且选择的北站,跳出弹窗
this.showExtraPop = true
}
if (this.chooseService.length == 0 && !this.showErmai) {
//没有购买额外服务,并且选择的南站,直接购买
this.placeOrder()
}
}
},
//---下单
placeOrder() {
if (this.dateList.length == 0) {
//价格库存为空时,点击无效
return
......@@ -1198,10 +1175,29 @@ export default {
})
return
}
this.preOrder()
if (this.serviceList.length == 0) {
//没有额外服务,直接支付
this.placeOrder()
}
if (this.serviceList.length > 0) {
//有额外服务,并且选择了额外服务的,直接支付
if (this.chooseService.length > 0) {
this.placeOrder()
}
}
if (this.serviceList.length > 0) {
if (this.chooseService.length == 0 && this.showErmai) {
//没有购买额外服务,并且选择的北站,跳出弹窗
this.showExtraPop = true
}
if (this.chooseService.length == 0 && !this.showErmai) {
//没有购买额外服务,并且选择的南站,直接购买
this.placeOrder()
}
}
},
//---下单
preOrder() {
//---下单
placeOrder() {
//参数游客信息组装
let orderTouristList = this.chooseContact.map((item) => {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment