mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-16 07:10:34 +08:00
fix: 更改API相关接口的路径
This commit is contained in:
@@ -96,3 +96,13 @@ export const loginByPassword = (data: LoginByPasswordDTO) => {
|
||||
export const getLoginUserInfo = () => {
|
||||
return http.request<ResponseData<TokenDTO>>("get", "/getLoginUserInfo");
|
||||
};
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
/** 获取动态菜单 */
|
||||
export const getAsyncRoutes = () => {
|
||||
return http.request<Result>("get", "/getRouters");
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data: Array<any>;
|
||||
};
|
||||
|
||||
export const getAsyncRoutes = () => {
|
||||
return http.request<Result>("get", "/getRouters");
|
||||
};
|
||||
@@ -1,24 +1,5 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
/** 总条目数 */
|
||||
total?: number;
|
||||
/** 每页显示条目个数 */
|
||||
pageSize?: number;
|
||||
/** 当前页数 */
|
||||
currentPage?: number;
|
||||
};
|
||||
};
|
||||
|
||||
type ResultDept = {
|
||||
success: boolean;
|
||||
data?: Array<any>;
|
||||
};
|
||||
|
||||
export interface SystemNoticeQuery extends BasePageQuery {
|
||||
noticeType: string;
|
||||
noticeTitle: string;
|
||||
@@ -43,21 +24,6 @@ export type SystemNoticeRequest = {
|
||||
status: number;
|
||||
};
|
||||
|
||||
/** 获取用户管理列表 */
|
||||
export const getUserList = (data?: object) => {
|
||||
return http.request<Result>("post", "/user", { data });
|
||||
};
|
||||
|
||||
/** 获取角色管理列表 */
|
||||
export const getRoleList = (data?: object) => {
|
||||
return http.request<Result>("post", "/role", { data });
|
||||
};
|
||||
|
||||
/** 获取部门管理列表 */
|
||||
export const getDeptList = (data?: object) => {
|
||||
return http.request<ResultDept>("post", "/dept", { data });
|
||||
};
|
||||
|
||||
/** 获取系统通知列表 */
|
||||
export const getSystemNoticeListApi = (params?: SystemNoticeQuery) => {
|
||||
return http.request<ResponseData<PageDTO<SystemNoticeDTO>>>(
|
||||
@@ -96,38 +62,3 @@ export const deleteSystemNoticeApi = (data: Array<number>) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
type OperationLogDTO = {
|
||||
operationId: number;
|
||||
businessType: number;
|
||||
businessTypeStr: string;
|
||||
requestMethod: string;
|
||||
requestModule: string;
|
||||
requestUrl: string;
|
||||
calledMethod: string;
|
||||
operatorType: number;
|
||||
operatorTypeStr: string;
|
||||
userId: number;
|
||||
username: string;
|
||||
operatorIp: string;
|
||||
operatorLocation: string;
|
||||
deptId: number;
|
||||
deptName: string;
|
||||
operationParam: string;
|
||||
operationResult: string;
|
||||
status: number;
|
||||
statusStr: string;
|
||||
errorStack: string;
|
||||
operationTime: Date;
|
||||
};
|
||||
|
||||
/** 获取操作日志列表 */
|
||||
export const getOperationLogListApi = (params?: SystemNoticeQuery) => {
|
||||
return http.request<ResponseData<PageDTO<OperationLogDTO>>>(
|
||||
"get",
|
||||
"/operationLog/list",
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
export type UserResult = {
|
||||
success: boolean;
|
||||
data: {
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 当前登陆用户的角色 */
|
||||
roles: Array<string>;
|
||||
/** `token` */
|
||||
accessToken: string;
|
||||
/** 用于调用刷新`accessToken`的接口时所需的`token` */
|
||||
refreshToken: string;
|
||||
/** `accessToken`的过期时间(格式'xxxx/xx/xx xx:xx:xx') */
|
||||
expires: Date;
|
||||
};
|
||||
};
|
||||
|
||||
export type RefreshTokenResult = {
|
||||
success: boolean;
|
||||
data: {
|
||||
/** `token` */
|
||||
accessToken: string;
|
||||
/** 用于调用刷新`accessToken`的接口时所需的`token` */
|
||||
refreshToken: string;
|
||||
/** `accessToken`的过期时间(格式'xxxx/xx/xx xx:xx:xx') */
|
||||
expires: Date;
|
||||
};
|
||||
};
|
||||
|
||||
/** 登录 */
|
||||
export const getLogin = (data?: object) => {
|
||||
return http.request<UserResult>("post", "/login", { data });
|
||||
};
|
||||
Reference in New Issue
Block a user