update yshop-drink-uniapp-vue3/pages/menu/menu.vue.
同一个商品加入购物车,数量未合并bug Signed-off-by: df <664791309@qq.com>
This commit is contained in:
1 file changed
+1
-1
@@ -534,7 +534,7 @@ const calcSize = () => {
|
||||
const handleAddToCart = (cate, newGood, num) =>{ //添加到购物车
|
||||
const index = cart.value.findIndex(item => {
|
||||
if (newGood) {
|
||||
return (item.id === newGood.id) && (item.props_text === good.value.valueStr)
|
||||
return (item.id === newGood.id) && (item.valueStr === good.value.valueStr)
|
||||
} else {
|
||||
return item.id === newGood.id
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user