修改购物车删除的逻辑

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> </view>
</template> </template>
<template #input> <template #input>
<text style="width: 80rpx; text-align: center" <text style="width: 80rpx; text-align: center" class="input">{{
class="input">{{
item.count }}</text> item.count }}</text>
</template> </template>
<template #plus> <template #plus>
@ -535,6 +534,7 @@ export default {
const that = this; const that = this;
request(apiArr.deleteCar, "POST", { request(apiArr.deleteCar, "POST", {
ids: [carItem.id], ids: [carItem.id],
goods_cate: 3,
}).then((res) => { }).then((res) => {
// //
item.splice(goodsIndex, 1); item.splice(goodsIndex, 1);
@ -700,6 +700,7 @@ export default {
request(apiArr.deleteCar, "POST", { request(apiArr.deleteCar, "POST", {
ids, ids,
goods_cate: 3,
}) })
.then((res) => { .then((res) => {
uni.showToast({ uni.showToast({

View File

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

View File

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

View File

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

View File

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