Commit f0c904ff authored by xieyishang's avatar xieyishang

~~~

parent b326200d
......@@ -618,14 +618,31 @@ export default {
},
// 全部删除商品
// 全部删除商品 清空购物车
delAllGoods() {
this.odata = [];
// this.odata = [];
this.listdata = [];
this.totalMoney = 0;
this.totalCount = 0;
this.totaljifen = 0;
this.childgoods = {spec_list:[]};
let req = {
ids: this.odata.map(product => product.id),
};
this.$API.cashier.cart.delete.post(req)
.then((res) => {
console.log("🚀 ~ delCart ~ res:", res);
if (res.code == 1) {
that.getCartList();
}else{
this.$message.error(res.message);
}
})
.catch((err) => {
console.log("🚀 ~ delCart ~ err:", err);
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment