Merge branch 'master' into xbx

This commit is contained in:
2020-07-21 21:03:56 +08:00
18 changed files with 611 additions and 118 deletions

View File

@@ -113,10 +113,12 @@ export default {
});
},
// 订单步骤1展示结算数据
settlementOrder({ ifcart, cart_id }) {
settlementOrder({ ifcart, cart_id, pintuan_id, pintuangroup_id }) {
return vm.$u.post('buy/buy_step1', {
ifcart: ifcart,
cart_id: cart_id,
pintuan_id: pintuan_id,
pintuangroup_id: pintuangroup_id,
});
},
// 订单步骤2发起订单返回订单信息
@@ -126,6 +128,9 @@ export default {
cart_id: cart_id,
address_id: address_id,
buy_city_id: buy_city_id,
pintuan_id: pintuan_id,
pintuangroup_id: pintuangroup_id,
voucher_id: voucher_id, // 优惠券信息
});
},
// 订单步骤3发起支付第三方统一下单
@@ -183,9 +188,9 @@ export default {
return vm.$u.post('Spike/recommendedSpike');
},
// 秒杀详情
getSpikeInfo({ id }) {
getSpikeInfo({ groupbuy_id }) {
return vm.$u.post('Spike/spikeInfo', {
groupbuy_id: id
groupbuy_id: groupbuy_id
});
},
// 秒杀列表

View File

@@ -4,9 +4,12 @@ Vue.use(Vuex)
const store = new Vuex.Store({
state: {
cartInfo: {}, // 购物车数据
orderType: '', // 订单类型 1 普通订单 2 购物车订单 3 拼团订单 4 秒杀订单
orderInfo: {}, // 订单数据 订单步骤1展示结算数据
orderAddress: {}, // 下单时选择的地址
goodsDetails: {}, // 商品详情 1普通 2拼团 3秒杀 4优惠券
goods_id: '', // 拼团商品 id
groupbuyInfo: {}, // 秒杀详情
},
getters: {
getOrderAddress(state) {
@@ -20,8 +23,11 @@ const store = new Vuex.Store({
}
},
mutations: {
updateCart(state, cart) {
state.cartInfo = cart;
setOrderType(state, type) {
state.orderType = type;
},
updateOrderInfo(state, info) {
state.orderInfo = info;
},
updateAddress(state, address) {
state.orderAddress = address;
@@ -29,6 +35,12 @@ const store = new Vuex.Store({
setGoodsDetails(state, goods) {
state.goodsDetails = goods;
},
setGoodsId(state, id) {
state.goods_id = id;
},
setGroupbuyInfo(state, info) {
state.groupbuyInfo = info;
},
}
})
export default store;