From b9eaf4c1f19e6b0ab592afbcea5089f0bb56e7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Fri, 21 Nov 2025 17:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shop/shopCar/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/shop/shopCar/index.vue b/packages/shop/shopCar/index.vue index 9522bcfd..f7ecc76e 100644 --- a/packages/shop/shopCar/index.vue +++ b/packages/shop/shopCar/index.vue @@ -518,9 +518,14 @@ export default { // 删除商品的通用方法 deleteCarItem(carItem, goodsIndex, item) { const that = this; + const currentTime = new Date().getTime(); + const isGroupBuyActive = carItem.commodity_goods_info.group_buy_activity_info && + currentTime >= new Date(carItem.commodity_goods_info.group_buy_activity_info?.start_time).getTime() && + currentTime <= new Date(carItem.commodity_goods_info.group_buy_activity_info?.end_time).getTime(); + request(apiArr.deleteCar, "POST", { ids: [carItem.id], - goods_cate: 1, + goods_cate: isGroupBuyActive ? 2 : 1, }).then((res) => { // 从商品列表中移除该商品 item.splice(goodsIndex, 1); @@ -686,7 +691,7 @@ export default { request(apiArr.deleteCar, "POST", { ids, - goods_cate: 1, + goods_cate: goods_cate, }) .then((res) => { uni.showToast({