order
This commit is contained in:
@@ -112,6 +112,7 @@ export default {
|
||||
couponStatus: false,
|
||||
choiceCoupon: {}, // 使用的平台优惠券
|
||||
goodsClass: [],
|
||||
orderType: '', // 订单类型 1 普通订单 2 购物车订单 3 拼团订单 4 秒杀订单
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -135,8 +136,9 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.orderInfo = this.$store.state.cartInfo;
|
||||
console.log(this.orderInfo);
|
||||
this.orderType = this.$store.state.orderType;
|
||||
this.orderInfo = this.$store.state.orderInfo;
|
||||
// console.log(this.orderInfo);
|
||||
},
|
||||
onShow() {
|
||||
// 判断是不是从选择地址页面返回
|
||||
@@ -170,12 +172,16 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$u.api.sendOrder({
|
||||
let params = {
|
||||
ifcart: 1,
|
||||
cart_id: id,
|
||||
address_id: this.addressInfo.address_id,
|
||||
buy_city_id: this.addressInfo.city_id,
|
||||
}).then(res => {
|
||||
}
|
||||
// if(this.orderType == 3) {
|
||||
// Object.assign(params, { pintuan_id: })
|
||||
// }
|
||||
this.$u.api.sendOrder(params).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$u.route({
|
||||
url: '/pageC/cart/cashier',
|
||||
|
||||
@@ -100,7 +100,8 @@ export default {
|
||||
// ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||
this.$u.api.settlementOrder({ ifcart: 1, cart_id: id }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$store.commit('updateCart', res.data)
|
||||
this.$store.commit('orderType', 2);
|
||||
this.$store.commit('updateOrderInfo', res.data);
|
||||
this.$u.route({
|
||||
url: '/pageC/cart/ConfirmOrder'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user