fix:拼团详情bug修复,购物车改变数量修改
parent
6e39585ef3
commit
4be139a93e
|
@ -294,7 +294,8 @@
|
||||||
const { error, data } = await sheep.$api.activity.grouponDetail(id);
|
const { error, data } = await sheep.$api.activity.grouponDetail(id);
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
state.data = data;
|
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 {
|
} else {
|
||||||
state.data = null;
|
state.data = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,6 +151,7 @@
|
||||||
cart.delete(cartItem.id);
|
cart.delete(cartItem.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
cartItem.goods_num = e;
|
||||||
cart.update({
|
cart.update({
|
||||||
goods_id: cartItem.goods_id,
|
goods_id: cartItem.goods_id,
|
||||||
goods_num: e,
|
goods_num: e,
|
||||||
|
|
Loading…
Reference in New Issue