From e1338a9e9936089469ce04f887a3fdd186cba471 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 26 Jan 2024 15:58:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E7=BB=8F=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/router/index.js b/router/index.js index af876092..b947a47c 100644 --- a/router/index.js +++ b/router/index.js @@ -10,7 +10,9 @@ console.log("getCurrentPages",apages) function hasPermission (url) { console.log('url',url); // let islogin = sessionStorage.getItem("isLogin"); - let islogin = this.$store.state.hasLogin + + let islogin = sessionStorage.getItem("hasLogin") + // let islogin = this.$store.state.hasLogin islogin = Boolean(Number(islogin));//返回布尔值 // 在白名单中或有登录判断条件可以直接跳转 if(whiteList.indexOf(url) !== -1 || islogin) {