group order

This commit is contained in:
2020-07-20 17:17:41 +08:00
parent 50085a341f
commit a6e1241238
11 changed files with 494 additions and 55 deletions

View File

@@ -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;