diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue index 1438e60..5693cbc 100644 --- a/pages/order_food/order_food.vue +++ b/pages/order_food/order_food.vue @@ -274,23 +274,18 @@ this.countScrollTitle(e.scrollTop); }, onLoad(e) { - if (e.q) { - let tableCode = this.getQueryString(decodeURIComponent(e.q), 'code') - uni.cache.set('tableCode', tableCode) - // this.scanCodehandle() - } if (!uni.cache.get('token') && uni.cache.get('tableCode')) { uni.reLaunch({ url: '/pages/login/login?types=' + 0 }); return false } + if (e.q) { + let tableCode = this.getQueryString(decodeURIComponent(e.q), 'code') + uni.cache.set('tableCode', tableCode) + } + this.productqueryShopIdByTableCode() //获取shop User id uni.$on('message', this.getMessage) - setTimeout(() => { - if (uni.cache.get('token') && uni.cache.get('tableCode')) { - this.productqueryShopIdByTableCode() //获取shop User id - } - }, 500) this.$nextTick(() => { this.countTitleTopNum(); //导航栏 });