From 15afc855fc1245f452594a5f20dad21d38acbfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Fri, 5 Sep 2025 14:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=9B=A2=E8=B4=AD=E5=92=8C?= =?UTF-8?q?=E6=98=93=E8=B4=AD=E7=9A=84=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shop/groupPurchase/index.vue | 11 +++++++++-- packages/shop/shopCar/index.vue | 8 ++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) 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() {