refactor: 项目结构优化调整

This commit is contained in:
Ray.Hao
2025-12-20 21:56:48 +08:00
parent 5851976c5d
commit 65ad4fe59f
68 changed files with 2463 additions and 1761 deletions

View File

@@ -1,11 +1,12 @@
import request from "@/utils/request";
import type { LogPageQuery, LogPageVo } from "@/types/api";
const LOG_BASE_URL = "/api/v1/logs";
const LogAPI = {
/** 获取日志分页列表 */
getPage(queryParams: LogPageQuery) {
return request<any, PageResult<LogPageVO[]>>({
return request<any, PageResult<LogPageVo[]>>({
url: `${LOG_BASE_URL}/page`,
method: "get",
params: queryParams,
@@ -14,35 +15,3 @@ const LogAPI = {
};
export default LogAPI;
export interface LogPageQuery extends PageQuery {
/** 搜索关键字 */
keywords?: string;
/** 操作时间 */
createTime?: [string, string];
}
export interface LogPageVO {
/** 主键 */
id: string;
/** 日志模块 */
module: string;
/** 日志内容 */
content: string;
/** 请求路径 */
requestUri: string;
/** 请求方法 */
method: string;
/** IP 地址 */
ip: string;
/** 地区 */
region: string;
/** 浏览器 */
browser: string;
/** 终端系统 */
os: string;
/** 执行时间(毫秒) */
executionTime: number;
/** 操作人 */
operator: string;
}