fix: 修复临时菜添加成功未加入购物车
This commit is contained in:
parent
c9c584fd7c
commit
cb6fa28e2a
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue