Files
novalon-manage-system/novalon-manage-web/src/api/exceptionLog.ts
T
张翔 be5d5ede90 feat: 添加异常日志功能并优化UI样式
refactor: 重构后端查询逻辑和API响应处理

fix: 修复用户角色更新和文件上传问题

test: 添加前端性能测试脚本和E2E测试用例

chore: 更新依赖版本和配置文件

docs: 添加环境检查脚本和测试文档

style: 统一表格标签样式和路由命名

perf: 优化前端页面加载速度和响应时间
2026-03-24 13:32:20 +08:00

40 lines
932 B
TypeScript

import request from '@/utils/request'
export interface ExceptionLog {
id?: number
username?: string
operation?: string
method?: string
params?: string
errorMsg?: string
exceptionStack?: string
ip?: string
createTime?: string
}
export interface PageResponse<T> {
content: T[]
totalPages: number
totalElements: number
currentPage: number
size: number
}
export const exceptionLogApi = {
getAll: () => request.get<ExceptionLog[]>('/logs/exception'),
getById: (id: number) => request.get<ExceptionLog>(`/logs/exception/${id}`),
getPage: (params: {
page?: number
size?: number
sort?: string
order?: string
keyword?: string
}) => request.get<PageResponse<ExceptionLog>>('/logs/exception/page', { params }),
getCount: () => request.get<number>('/logs/exception/count'),
create: (data: Partial<ExceptionLog>) => request.post<ExceptionLog>('/logs/exception', data)
}