【修改】idm系统单点登录
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import Vue from 'vue'
|
||||
import {UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
|
||||
// idm 系统单点登录 获取用户信息
|
||||
const loginIdmPlatform = (params) => getAction('/sys/singleSignOn',params)
|
||||
const loginIdmPlatform = (params) => postAction(`/sys/singleSignOn?code=${params.code}`)
|
||||
//角色管理
|
||||
const addRole = (params)=>postAction('/sys/role/add',params)
|
||||
const editRole = (params)=>postAction('/sys/role/edit',params)
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ router.beforeEach(async (to, from, next) => {
|
||||
}
|
||||
}
|
||||
// idm系统单点登录
|
||||
if(to.path === '/user/login' && to.query.v){
|
||||
let result = await loginIdmPlatform({uuid:to.query.v})
|
||||
if(to.path === '/user/login' && to.query.code){
|
||||
let result = await loginIdmPlatform({code:to.query.code})
|
||||
if(result.success){
|
||||
Vue.ls.set(USER_INFO, result.result.userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
Vue.ls.set(ACCESS_TOKEN, result.result.token, 7 * 24 * 60 * 60 * 1000)
|
||||
|
||||
Reference in New Issue
Block a user