Skip to content

Commit cbb3012

Browse files
committed
[移除购物车]购物车非空逻辑修正
1 parent 7ab1910 commit cbb3012

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/store/mutations.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ export default {
9494
specs,
9595
}) {
9696
let cart = state.cartList;
97-
let shop = cart[shopid] = (cart[shopid] || {});
98-
let category = shop[category_id] = (shop[category_id] || {});
99-
let item = category[item_id] = (category[item_id] || {});
97+
let shop = (cart[shopid] || {});
98+
let category = (shop[category_id] || {});
99+
let item = (category[item_id] || {});
100100
if (item && item[food_id]) {
101101
if (item[food_id]['num'] > 0) {
102102
item[food_id]['num']--;

0 commit comments

Comments
 (0)