|
|
@ -174,7 +174,8 @@ |
|
|
coupon_index: null, |
|
|
coupon_index: null, |
|
|
goods_type: 1, |
|
|
goods_type: 1, |
|
|
itemsPrice: 0, // 商品金额(所有商品之和,但不包括额外费用及优惠) |
|
|
itemsPrice: 0, // 商品金额(所有商品之和,但不包括额外费用及优惠) |
|
|
totalPrice: 0 // 合计价格 |
|
|
|
|
|
|
|
|
totalPrice: 0 ,// 合计价格 |
|
|
|
|
|
clickContinue: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -325,6 +326,8 @@ |
|
|
// 提交订单 |
|
|
// 提交订单 |
|
|
confirm(){ |
|
|
confirm(){ |
|
|
console.log(this.address) |
|
|
console.log(this.address) |
|
|
|
|
|
if(this.clickContinue == true) { |
|
|
|
|
|
this.clickContinue = false; |
|
|
if(this.address == null) { |
|
|
if(this.address == null) { |
|
|
this.$msg('请先添加收货地址!'); |
|
|
this.$msg('请先添加收货地址!'); |
|
|
return |
|
|
return |
|
|
@ -333,8 +336,9 @@ |
|
|
order_no: this.order_detail.order.order_no, |
|
|
order_no: this.order_detail.order.order_no, |
|
|
pick_self: this.mode, // 0 配送,1自提 |
|
|
pick_self: this.mode, // 0 配送,1自提 |
|
|
address_id: this.address.id, |
|
|
address_id: this.address.id, |
|
|
note: this.value |
|
|
|
|
|
|
|
|
note: this.value, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 是否选择了优惠券 TODO 优惠券id是否传对? |
|
|
// 是否选择了优惠券 TODO 优惠券id是否传对? |
|
|
if(this.coupon_index != null){ |
|
|
if(this.coupon_index != null){ |
|
|
par.coupon_id = this.order_detail.coupons[this.coupon_index].id; |
|
|
par.coupon_id = this.order_detail.coupons[this.coupon_index].id; |
|
|
@ -347,7 +351,6 @@ |
|
|
Authorization: this.token |
|
|
Authorization: this.token |
|
|
} |
|
|
} |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
console.log("`````````", res); |
|
|
|
|
|
if(res.data.code == 200 || res.data.code == true){ |
|
|
if(res.data.code == 200 || res.data.code == true){ |
|
|
let order = res.data.data.order; |
|
|
let order = res.data.data.order; |
|
|
let url = '/pages/order/cashier/cashier'; |
|
|
let url = '/pages/order/cashier/cashier'; |
|
|
@ -355,10 +358,13 @@ |
|
|
url += '&order_no='+ order.order_no; |
|
|
url += '&order_no='+ order.order_no; |
|
|
this.$cookieStorage.set('last_pay_time', order.last_pay_time); |
|
|
this.$cookieStorage.set('last_pay_time', order.last_pay_time); |
|
|
this.$url(url, {type: 'redirect'}); |
|
|
this.$url(url, {type: 'redirect'}); |
|
|
|
|
|
this.clickContinue = true; |
|
|
}else{ |
|
|
}else{ |
|
|
this.$msg(res.data.message); |
|
|
this.$msg(res.data.message); |
|
|
|
|
|
this.clickContinue = true; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 选择优惠券 |
|
|
// 选择优惠券 |
|
|
couponChange(event){ |
|
|
couponChange(event){ |
|
|
|