订单逻辑修改
This commit is contained in:
@@ -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) =>{
|
||||
|
||||
Reference in New Issue
Block a user