21 lines
521 B
TypeScript
21 lines
521 B
TypeScript
import {get,post} from "@/service/request.ts";
|
|
|
|
export function getUserInfo() {
|
|
return get<UserProfile>('/userinfo')
|
|
}
|
|
|
|
/**
|
|
* 使用 sso 返回的code、state换取登录凭证或用户信息
|
|
* @param code
|
|
* @param state
|
|
*/
|
|
export function auth(code:string,state:string){
|
|
return post<UserProfile>('/auth', {code, state})
|
|
}
|
|
|
|
export function getPermissionList(){
|
|
return get<PermissionUserList[]>('/roles')
|
|
}
|
|
export function savePermissionList(roles:PermissionUserList[]){
|
|
return post('/roles',{roles})
|
|
} |