diff --git a/common/api/shop.js b/common/api/shop.js index 437f818..c3d2678 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -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 }); }, // 秒杀列表 diff --git a/common/store/index.js b/common/store/index.js index afce820..c40505e 100644 --- a/common/store/index.js +++ b/common/store/index.js @@ -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; \ No newline at end of file diff --git a/components/shop/group/index.vue b/components/shop/group/index.vue index 247ad65..d9e89fe 100644 --- a/components/shop/group/index.vue +++ b/components/shop/group/index.vue @@ -2,10 +2,10 @@ 全部拼团 - 查看更多> + 查看更多> - + @@ -42,6 +42,11 @@ export default { this.swiperCurrent = current; this.current = current; }, + viewMore() { + this.$u.route({ + url: 'pageC/groupBuy/index', + }) + } } } diff --git a/components/shop/group/item.vue b/components/shop/group/item.vue index 8254e3a..b3dabb8 100644 --- a/components/shop/group/item.vue +++ b/components/shop/group/item.vue @@ -1,5 +1,5 @@