把 cartList[shopId]?.[item._id]?.[‘count’] 改成item.count
来源:11-7 根据购物车选中状态计算订单金额(1)

weixin_慕函数4026144
2021-12-07
把 cartList[shopId]?.[item._id]?.[‘count’] 改成item.count
item不是发请求获取的数组里的项吗,怎么会有count属性
写回答
1回答
-
Dell
2021-12-09
同学你看下,全局代码里搜索count,我这里面是做了判断的,如果没有count,我会给它初始化一个
022022-01-09
相似问题