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({