update 单点登录修改
This commit is contained in:
+2
-1
@@ -14,8 +14,9 @@ const whiteList = ['/user/login', '/user/register', '/user/register-result', '/u
|
|||||||
whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
|
whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
console.log(to.query)
|
||||||
// 单点登录
|
// 单点登录
|
||||||
if (to.query.code && top.frames.length > 0) {
|
if (to.query.code) {
|
||||||
const result = await getSSOUserInfo({ code: to.query.code })
|
const result = await getSSOUserInfo({ code: to.query.code })
|
||||||
const userInfo = result.userInfo
|
const userInfo = result.userInfo
|
||||||
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
|
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
|
||||||
|
|||||||
Reference in New Issue
Block a user