提交 7ab19108 编写于 作者: C Clark Du

[移除购物车]补充food非空校验

上级 49f6c3b6
......@@ -97,7 +97,7 @@ export default {
let shop = cart[shopid] = (cart[shopid] || {});
let category = shop[category_id] = (shop[category_id] || {});
let item = category[item_id] = (category[item_id] || {});
if (item) {
if (item && item[food_id]) {
if (item[food_id]['num'] > 0) {
item[food_id]['num']--;
state.cartList = {...cart};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册