代客下单修改部分页面跳转逻辑

This commit is contained in:
2024-10-11 15:45:52 +08:00
parent ec509d1186
commit c9e195c859
4 changed files with 39 additions and 22 deletions

View File

@@ -391,8 +391,7 @@
// data.table=res.content[0]
}
}
let $originGoods = ref([])
let $originGoods = []
async function init() {
const shopInfo = await tbShopInfo()
$shop.value = shopInfo
@@ -417,10 +416,10 @@
}
return isShow;
});
$originGoods.value = goods
$originGoods=goods
if (!data.table.tableId) {
//无桌台
setTabBar(category, $originGoods.value, [])
setTabBar(category, goods, [])
return
}
const {
@@ -464,9 +463,9 @@
const newval = searchValue.value
let arr = []
if (newval == "") {
arr = $originGoods.value;
arr = $originGoods;
} else {
arr = $originGoods.value.filter((v) =>
arr = $originGoods.filter((v) =>
v.name.includes(newval.trim())
);
}
@@ -659,7 +658,9 @@
function chooseGuige(foodsindex, index) {
if (!canAddGoods()) {
return infoBox.showToast('清先选择桌台')
return infoBox.showToast('清先选择桌台',0.5).then(res=>{
chooseTable()
})
}
const $goods = data.tabbar[index].foods[foodsindex]
guigeModelData.title = $goods.name
@@ -763,7 +764,9 @@
}
async function goodsUpdate(foodsindex, index, isAdd) {
if (!canAddGoods()) {
return infoBox.showToast('先选择桌台')
return infoBox.showToast('先选择桌台',0.5).then(res=>{
chooseTable()
})
}
const $goods = data.tabbar[index].foods[foodsindex]
if ($goods.isDan) {
@@ -981,6 +984,7 @@
// watchChooseuser()
watchChooseTable()
watchUpdate()
init()
})
let isCreateOrderToDetail = ref(false)
onLoad((opt) => {
@@ -998,7 +1002,7 @@
// go.back()
// }, 1500)
// }
init()
// init()
})
</script>