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

This commit is contained in:
YeMingfei666 2024-10-30 17:05:14 +08:00
parent b8977bd81a
commit 8a1718a547
1 changed files with 12 additions and 8 deletions

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)