update 单点登录
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user