提交 bc9139f4 编写于 作者: C cangdu 提交者: GitHub

Merge pull request #55 from clarkdo/master

[移除购物车]购物车非空逻辑修正
...@@ -94,9 +94,9 @@ export default { ...@@ -94,9 +94,9 @@ export default {
specs, specs,
}) { }) {
let cart = state.cartList; let cart = state.cartList;
let shop = cart[shopid] = (cart[shopid] || {}); let shop = (cart[shopid] || {});
let category = shop[category_id] = (shop[category_id] || {}); let category = (shop[category_id] || {});
let item = category[item_id] = (category[item_id] || {}); let item = (category[item_id] || {});
if (item && item[food_id]) { if (item && item[food_id]) {
if (item[food_id]['num'] > 0) { if (item[food_id]['num'] > 0) {
item[food_id]['num']--; item[food_id]['num']--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册