From 9ac308e17e6013c45d3613cfe29f89b457c8c164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Tue, 31 Oct 2023 15:38:02 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/permission.js b/src/permission.js index 8540d8a2..a75cd6f6 100644 --- a/src/permission.js +++ b/src/permission.js @@ -16,7 +16,7 @@ whiteList.push(OAUTH2_LOGIN_PAGE_PATH) router.beforeEach(async (to, from, next) => { console.log(to.query) // 单点登录 - if (to.query.code) { + if (to.query.code && !Vue.ls.get(ACCESS_TOKEN)) { const { result } = await getSSOUserInfo({ code: to.query.code }) const userInfo = result.userInfo Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)