fix:拼团详情bug修复,购物车改变数量修改

pull/8/head
kele 2023-03-21 19:06:27 +08:00
parent 6e39585ef3
commit 4be139a93e
2 changed files with 3 additions and 1 deletions

View File

@ -294,7 +294,8 @@
const { error, data } = await sheep.$api.activity.grouponDetail(id);
if (error === 0) {
state.data = data;
state.number = Number(state.data.num - state.data.current_num);
let number = Number(state.data.num - state.data.current_num);
state.number = number > 0 ? number : 0;
} else {
state.data = null;
}

View File

@ -151,6 +151,7 @@
cart.delete(cartItem.id);
return;
}
cartItem.goods_num = e;
cart.update({
goods_id: cartItem.goods_id,
goods_num: e,