订单逻辑修改

This commit is contained in:
GaoHao
2024-09-26 09:20:08 +08:00
parent 5f03e44701
commit 1de598f1b1
16 changed files with 856 additions and 135 deletions

View File

@@ -54,13 +54,27 @@
}
// #ifdef APP || MP-WEIXIN || MP-ALIPAY
uni.scanCode({
success: (res) => {
success: async(res) => {
let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
uni.cache.set('tableCode', tableCode)
if (tableCode) {
uni.pro.navigateTo('order_food/order_food', {
tableCode: tableCode,
let data = await this.api.productqueryShop({
code: uni.cache.get('tableCode'),
lng: uni.cache.get('getLocationstorage').lng ? uni.cache.get('getLocationstorage').lng :
'',
lat: uni.cache.get('getLocationstorage').lat ? uni.cache.get('getLocationstorage').lat :
'',
})
if ( !data.data.shopTableInfo.orderId && data.data.storeInfo.isTableFee == 1) {
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
tableCode: tableCode,
})
} else {
uni.pro.navigateTo('order_food/order_food', {
tableCode: tableCode,
})
}
}
},
fail:( res) =>{