group order
This commit is contained in:
@@ -6,10 +6,17 @@ const store = new Vuex.Store({
|
||||
state: {
|
||||
cartInfo: {}, // 购物车数据
|
||||
orderAddress: {}, // 下单时选择的地址
|
||||
goodsDetails: {}, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
},
|
||||
getters: {
|
||||
getOrderAddress(state) {
|
||||
return state.orderAddress;
|
||||
},
|
||||
getGoodsType(state) {
|
||||
return state.goodsDetails.type;
|
||||
},
|
||||
getGoodsInfo(state) {
|
||||
return state.goodsDetails.goods;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
@@ -18,7 +25,10 @@ const store = new Vuex.Store({
|
||||
},
|
||||
updateAddress(state, address) {
|
||||
state.orderAddress = address;
|
||||
}
|
||||
},
|
||||
setGoodsDetails(state, goods) {
|
||||
state.goodsDetails = goods;
|
||||
},
|
||||
}
|
||||
})
|
||||
export default store;
|
||||
Reference in New Issue
Block a user