ruoyi-plus-vben5/apps/web-antd/src/api/core/user.ts

46 lines
814 B
TypeScript
Raw Normal View History

import { requestClient } from '#/api/request';
2024-08-07 08:57:56 +08:00
export interface Role {
dataScope: string;
flag: boolean;
roleId: number;
roleKey: string;
roleName: string;
roleSort: number;
status: string;
superAdmin: boolean;
}
export interface User {
avatar: string;
createTime: string;
deptId: number;
deptName: string;
email: string;
loginDate: string;
loginIp: string;
nickName: string;
phonenumber: string;
remark: string;
roles: Role[];
sex: string;
status: string;
tenantId: string;
userId: number;
userName: string;
userType: string;
}
export interface UserInfoResp {
permissions: string[];
roles: string[];
user: User;
}
/**
*
*/
2024-08-07 13:42:33 +08:00
export async function getUserInfoApi() {
2024-08-07 08:57:56 +08:00
return requestClient.get<UserInfoResp>('/system/user/getInfo');
}