update yshop-drink-uniapp-vue3/pages/menu/menu.vue.

同一个商品加入购物车,数量未合并bug

Signed-off-by: df <664791309@qq.com>
This commit is contained in:
df authored and Gitee committed 2025-07-04 08:41:33 +00:00
1 parent ca53fb4e2a
commit 994fa0fe87
1 file changed
+1 -1
+1 -1
View File
@@ -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
}