修改购物车删除的逻辑

This commit is contained in:
赵毅 2025-11-20 14:46:08 +08:00
parent 79292aa1f3
commit 5a965ccb16
5 changed files with 17 additions and 6 deletions

View File

@ -169,8 +169,7 @@
</view>
</template>
<template #input>
<text style="width: 80rpx; text-align: center"
class="input">{{
<text style="width: 80rpx; text-align: center" class="input">{{
item.count }}</text>
</template>
<template #plus>
@ -517,7 +516,7 @@ export default {
// total += goods.commodity_goods_info.sales_price * goods.count;
// }
if(goods.is_one_one === 1) {
if (goods.is_one_one === 1) {
total += goods.price * (goods.count / 2)
} else {
total += goods.price * goods.count
@ -535,6 +534,7 @@ export default {
const that = this;
request(apiArr.deleteCar, "POST", {
ids: [carItem.id],
goods_cate: 3,
}).then((res) => {
//
item.splice(goodsIndex, 1);
@ -700,6 +700,7 @@ export default {
request(apiArr.deleteCar, "POST", {
ids,
goods_cate: 3,
})
.then((res) => {
uni.showToast({

View File

@ -304,9 +304,9 @@ export default {
isAdver: item.adver_id ? true : ''
}));
// NavgateTo(`../submitOrder/index?shopCarList=${JSON.stringify(arr)}`);
if(this.is_group_buy){
if (this.is_group_buy) {
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
}else{
} else {
NavgateTo(`../goodsSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
}
},
@ -520,6 +520,7 @@ export default {
const that = this;
request(apiArr.deleteCar, "POST", {
ids: [carItem.id],
goods_cate: 1,
}).then((res) => {
//
item.splice(goodsIndex, 1);
@ -685,6 +686,7 @@ export default {
request(apiArr.deleteCar, "POST", {
ids,
goods_cate: 1,
})
.then((res) => {
uni.showToast({

View File

@ -133,7 +133,6 @@ export default {
},
craeteOrder() {
uni.showLoading({
title: '加载中',
})

View File

@ -561,6 +561,7 @@ export default {
const that = this;
request(apiArr.deleteCar, "POST", {
ids: [carItem.id],
goods_cate: this.activeTab + 1,
}).then((res) => {
//
item.splice(goodsIndex, 1);
@ -726,6 +727,7 @@ export default {
request(apiArr.deleteCar, "POST", {
ids,
goods_cate: that.activeTab + 1,
})
.then((res) => {
uni.showToast({

View File

@ -158,6 +158,13 @@
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F9F9F9"
}
},
{
"path": "contract/index",
"style": {
"navigationBarTitleText": "合作协议",
"navigationBarBackgroundColor": "#fff"
}
}
]
},