fix: 修复临时菜添加成功未加入购物车
This commit is contained in:
@@ -648,7 +648,7 @@ export const useCartsStore = defineStore("carts", () => {
|
||||
return ElMessage.warning(msg.message || '该商品已存在')
|
||||
}
|
||||
const skuData = getProductDetails({ product_id: msg.data.product_id, sku_id: msg.data.sku_id })
|
||||
if (skuData) {
|
||||
if (skuData || msg.data.is_temporary) {
|
||||
const newGoods = { ...skuData, ...msg.data }
|
||||
console.log('newGoods', newGoods)
|
||||
list.value.push(newGoods)
|
||||
|
||||
Reference in New Issue
Block a user