diff --git a/pages/index/components/diamond.vue b/pages/index/components/diamond.vue index 30e6050..dbcb39a 100644 --- a/pages/index/components/diamond.vue +++ b/pages/index/components/diamond.vue @@ -54,9 +54,7 @@ let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code') uni.cache.set('tableCode', tableCode) if (tableCode) { - uni.pro.navigateTo('order_food/order_food', { - tableCode: tableCode, - }) + uni.pro.navigateTo('order_food/order_food') } } }); diff --git a/pages/login/login.vue b/pages/login/login.vue index 2835a7f..9858c35 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -34,10 +34,10 @@ - + @@ -150,7 +150,6 @@ this.agreeShow = false; }, blurinput(e) { - console.log(e); uni.conf.baseUrl = e; this.baseUrl = e; this.showpopup = false; @@ -235,7 +234,6 @@ } }, rightClick() { - console.log(11); uni.switchTab({ url: '/pages/device_shop/index' }); @@ -269,13 +267,13 @@ }); return false; } - if (this.radioChangeItem == false) { - uni.showToast({ - icon: 'none', - title: '请先阅读《用户协议》和《隐私政策》' - }); - return; - } + // if (this.radioChangeItem == false) { + // uni.showToast({ + // icon: 'none', + // title: '请先阅读《用户协议》和《隐私政策》' + // }); + // return; + // } let res = await this.api.loginapplogin({ username: this.form.loginName, password: this.form.password, @@ -352,11 +350,9 @@ } }, fail: (err) => { - console.log(err) } }); } catch (e) { - console.log(e) } } }); diff --git a/pages/order_detail/order_detail.vue b/pages/order_detail/order_detail.vue index c7d08af..2acb8ec 100644 --- a/pages/order_detail/order_detail.vue +++ b/pages/order_detail/order_detail.vue @@ -171,7 +171,7 @@ 以优惠¥{{emitorderfoodform.couponsPrice}} - + 立即付款 @@ -340,10 +340,8 @@ orderId: this.listinfoid }) }, - // 去结算 showpopupclick() { - console.log(1212121) if (this.numValue == 0) { let data = { //定义socket数据传参 "skuId": '', diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue index 94db7b7..b64ea8d 100644 --- a/pages/order_food/order_food.vue +++ b/pages/order_food/order_food.vue @@ -274,21 +274,21 @@ }, async onLoad(e) { if (e.q) { - this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code') - uni.cache.set('tableCode', this.tableCode) + let tableCode = this.getQueryString(decodeURIComponent(e.q), 'code') + uni.cache.set('tableCode', tableCode) // this.scanCodehandle() - uni.pro.navigateTo('login/login', { - type: 0 - }) - } else { - this.tableCode = uni.cache.get('tableCode') - this.productqueryShopIdByTableCode() //获取shop User id } - + if (!uni.cache.get('token') && uni.cache.get('tableCode')) { + uni.reLaunch({ + url: '/pages/login/login?type=' + 0 + }); + // uni.pro.navigateTo('login/login', { + // type: 0 + // }) + } uni.$on('message', this.getMessage) - this.$nextTick(() => { - this.countTitleTopNum(); + this.countTitleTopNum(); //导航栏 }); }, onUnload() { @@ -296,7 +296,7 @@ uni.$off('message') }, onShow() { - if (uni.cache.get('token')) { + if (uni.cache.get('token') && uni.cache.get('tableCode')) { this.productqueryShopIdByTableCode() //获取shop User id } }, @@ -429,7 +429,7 @@ uni.cache.set('miniAppOpenId', res.data.userInfo .miniAppOpenId) uni.cache.set('userInfo', res.data.userInfo); - this.productqueryShopIdByTableCode()//获取shop User id + this.productqueryShopIdByTableCode() //获取shop User id } }, fail: (err) => { @@ -479,7 +479,7 @@ }, async productqueryProduct() { //list 数据 let res = await this.api.productqueryProduct({ - code:uni.cache.get('tableCode'), + code: uni.cache.get('tableCode'), productGroupId: '' }) if (res.code == 0) {