From 5a8dda09c19a66c0aad2923c32f914be77a0f694 Mon Sep 17 00:00:00 2001 From: linju-json Date: Sat, 22 May 2021 17:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93username=EF=BC=88?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D&=E5=AF=86=E7=A0=81=EF=BC=89?= =?UTF-8?q?=E4=B8=BA=E7=AC=AC=E4=B8=80=E4=BC=98=E5=85=88=E7=BA=A7=E7=9A=84?= =?UTF-8?q?=E7=99=BB=E9=99=86=E6=96=B9=E5=BC=8F=E6=97=B6=E3=80=82=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=88=87=E6=8D=A2=E5=88=B0smsCode(=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81)=E7=99=BB=E9=99=86=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/appInit.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/appInit.js b/common/appInit.js index 2e746ef1..feaa79ea 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -33,7 +33,12 @@ export default function() { //获取当前页面路径(即url去掉"?"和"?"后的参数) const url = e.url.split('?')[0] //控制登录优先级 - if (url == '/pages/ucenter/login-page/index/index') { + let pages = getCurrentPages(); + if ( + url == '/pages/ucenter/login-page/index/index' + && + pages[pages.length - 1].route.split('/')[2]!='login-page' + ) { //一键登录(univerify)、账号(username)、验证码登录(短信smsCode) if (login[0] == 'univerify') { if(e.url == url) { e.url += '?' } //添加参数之前判断是否带了`?`号如果没有就补上,因为当开发场景本身有参数的情况下是已经带了`?`号 -- GitLab