【修改】idm系统单点登录

This commit is contained in:
fengachen
2022-04-07 17:09:03 +08:00
parent 9be806c3b1
commit 9ffcf46cff
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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)