修改无台桌时也获取一次购物车

This commit is contained in:
2024-10-30 17:05:14 +08:00
parent b8977bd81a
commit 8a1718a547

View File

@@ -482,16 +482,20 @@
return isShow;
});
$originGoods = goods
if (!data.table.tableId) {
//无桌台
// if (!data.table.tableId) {
// //无桌台
setTabBar(category, goods, [])
return
// setTabBar(category, goods, [])
// return
// }
// const {
// masterId
// } = await getMasterId()
// data.masterId = masterId
if(data.table.tableId){
const masterRes = await getMasterId()
data.masterId = masterRes.masterId
}
const {
masterId
} = await getMasterId()
data.masterId = masterId
const cartRes = await getCart()
cars.length = 0
const cartArr = getNowCart(cartRes.records)