order
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user