diff --git a/packages/shop/groupPurchase/index.vue b/packages/shop/groupPurchase/index.vue index 01cbe02b..4ef68a22 100644 --- a/packages/shop/groupPurchase/index.vue +++ b/packages/shop/groupPurchase/index.vue @@ -206,7 +206,11 @@ export default { }); }); }, - toDetail(item) { + toDetail(itemObj) { + const item = { + ...itemObj, + groupById: itemObj.group_buy_activity_info.id + }; NavgateTo(`/packages/shop/groupPurchaseDetail/index?item=${JSON.stringify(item)}`) }, // 获取商品价格范围 @@ -295,7 +299,10 @@ export default { }, // 跳转到购物车 shopCar() { - NavgateTo("../shopCar/index"); + const item = { + is_group_buy: 1, + } + NavgateTo("../shopCar/index?item=" + JSON.stringify(item)); }, // 计算距离结束日期的剩余时间 getEndTheCountdown(endTime) { diff --git a/packages/shop/shopCar/index.vue b/packages/shop/shopCar/index.vue index b68b27a4..8051dfe6 100644 --- a/packages/shop/shopCar/index.vue +++ b/packages/shop/shopCar/index.vue @@ -228,7 +228,7 @@ export default { isDayshow: false, isParcelPostchecked: false, parcelPostshow: false, - + is_group_buy: '' }; }, // watch: { @@ -303,7 +303,10 @@ export default { // 获取购物车列表 getShopCar() { - request(apiArr.getCar, "POST", {}).then((res) => { + const params = { + is_group_buy: this.is_group_buy + } + request(apiArr.getCar, "POST", params).then((res) => { if (res.normal_cart_list.length > 0) { res.normal_cart_list.forEach((item) => { item.checked = false; @@ -717,6 +720,7 @@ export default { const meun = menuButtonInfo(); this.top = meun.top; this.localHeight = meun.height; + this.is_group_buy = options.item ? JSON.parse(options.item).is_group_buy : '' this.getShopCar(); }, onShow() {