From f0b12bdecb6febf05d2ba667fe426f119e4ab6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Mon, 10 Jul 2023 17:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B7=AF=E7=94=B1=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router/index.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/router/index.js b/router/index.js index ce28b74..ebd78bf 100644 --- a/router/index.js +++ b/router/index.js @@ -30,20 +30,20 @@ router.beforeEach((to, from, next) => { return } // 检查用户是否授权了微信 - // if(to.name != 'webWechatIndex' && openId === ''){ - // authFollow({ - // // url: 'https://web.douhuotest.douhuofalv.com/webWechat/index' - // url: 'https://web.douhuofalv.com/webWechat/index' - // }).then(res => { - // window.location.href = res - // }).catch(err => { - // uni.showToast({ - // title: err.message, - // icon: "none" - // }) - // }) - // return - // } + if(to.name != 'webWechatIndex' && openId === ''){ + authFollow({ + // url: 'https://web.douhuotest.douhuofalv.com/webWechat/index' + url: 'https://web.douhuofalv.com/webWechat/index' + }).then(res => { + window.location.href = res + }).catch(err => { + uni.showToast({ + title: err.message, + icon: "none" + }) + }) + return + } // 检查是否需要登录 if(to.auth && token === ''){