7.16
This commit is contained in:
@@ -135,11 +135,12 @@ export default {
|
||||
});
|
||||
},
|
||||
// 选择地区计算运费
|
||||
getFreight({ freight_hash, city_id, area_id }) {
|
||||
getFreight({ freight_hash, city_id, area_id, delivery }) {
|
||||
return vm.$u.post('Buy/change_addr', {
|
||||
freight_hash: freight_hash,
|
||||
city_id: city_id,
|
||||
area_id: area_id,
|
||||
delivery: delivery,
|
||||
});
|
||||
},
|
||||
// 商品详情
|
||||
@@ -186,6 +187,29 @@ export default {
|
||||
page: page
|
||||
});
|
||||
},
|
||||
// 拼团列表
|
||||
getPinTuanList() {
|
||||
return vm.$u.post('Specialci/pintuanList');
|
||||
},
|
||||
// 拼团商品详情
|
||||
getPinTuanDetails({ pintuan_id }) {
|
||||
return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
|
||||
},
|
||||
// 优惠券列表
|
||||
getCouponList({ page, store_id, type, gc_id }) {
|
||||
return vm.$u.post('Coupon/CouponList', {
|
||||
page: page,
|
||||
store_id: store_id,
|
||||
type: type,
|
||||
gc_id: gc_id,
|
||||
});
|
||||
},
|
||||
// 领取优惠券
|
||||
getCoupon({ vouchertemplate_id }) {
|
||||
return vm.$u.post('Coupon/getCoupon', {
|
||||
vouchertemplate_id: vouchertemplate_id,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,16 +4,20 @@ Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
count: 0
|
||||
cartInfo: {}, // 购物车数据
|
||||
orderAddress: {}, // 下单时选择的地址
|
||||
},
|
||||
getters: {
|
||||
doubleCount (state) {
|
||||
return state.count * 2
|
||||
getOrderAddress(state) {
|
||||
return state.orderAddress;
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
increment (state) {
|
||||
state.count++
|
||||
updateCart(state, cart) {
|
||||
state.cartInfo = cart;
|
||||
},
|
||||
updateAddress(state, address) {
|
||||
state.orderAddress = address;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user