代客下单增加临时菜

This commit is contained in:
2024-11-21 09:52:17 +08:00
parent d8738f4e74
commit 7e994f84f0
5 changed files with 105 additions and 20 deletions

View File

@@ -9,7 +9,10 @@ export function getNowCart(records) {
const arr = []
for (let i in Cart) {
const item=Cart[i]
const key = item.productId + '_' + item.skuId
const productId=item.productId
const skuId=item.skuId
const isLinShiCai=!productId&&!skuId?true:false
const key =isLinShiCai?item.name: (item.productId + '_' + item.skuId)
if (goodsMap.hasOwnProperty(key)) {
const index = goodsMap[key]
arr[index].number = arr[index].number * 1 + item.number