修改购物车删除的逻辑
This commit is contained in:
parent
79292aa1f3
commit
5a965ccb16
@ -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>
|
||||||
@ -517,7 +516,7 @@ export default {
|
|||||||
// total += goods.commodity_goods_info.sales_price * goods.count;
|
// 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)
|
total += goods.price * (goods.count / 2)
|
||||||
} else {
|
} else {
|
||||||
total += goods.price * goods.count
|
total += goods.price * goods.count
|
||||||
@ -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({
|
||||||
|
|||||||
@ -304,9 +304,9 @@ export default {
|
|||||||
isAdver: item.adver_id ? true : ''
|
isAdver: item.adver_id ? true : ''
|
||||||
}));
|
}));
|
||||||
// NavgateTo(`../submitOrder/index?shopCarList=${JSON.stringify(arr)}`);
|
// NavgateTo(`../submitOrder/index?shopCarList=${JSON.stringify(arr)}`);
|
||||||
if(this.is_group_buy){
|
if (this.is_group_buy) {
|
||||||
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
||||||
}else{
|
} else {
|
||||||
NavgateTo(`../goodsSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
NavgateTo(`../goodsSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -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({
|
||||||
|
|||||||
@ -133,7 +133,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
craeteOrder() {
|
craeteOrder() {
|
||||||
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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({
|
||||||
|
|||||||
@ -158,6 +158,13 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarBackgroundColor": "#F9F9F9"
|
"navigationBarBackgroundColor": "#F9F9F9"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "contract/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "合作协议",
|
||||||
|
"navigationBarBackgroundColor": "#fff"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user