feat: API 访问日志系统(拦截器 + 统计分析 + 管理页面)
- V6: api_access_logs 表(method/path/email/IP/status/耗时/错误) - ApiLogInterceptor: 记录所有 /api/v1/** 请求,order(0) 最优先 - ApiLogController: 分页查询 + 按邮箱/路径统计(24h 窗口) - 前端 ApiLogs.vue: 筛选/统计面板/日志列表/分页 - 导航新增「访问日志」菜单项
This commit is contained in:
@@ -61,5 +61,10 @@ export default {
|
||||
add: (data) => api.post('/admin/psks', data),
|
||||
toggle: (id) => api.post(`/admin/psks/${id}/toggle`)
|
||||
},
|
||||
logs: {
|
||||
list: (params) => api.get('/admin/logs', { params }),
|
||||
emailStats: () => api.get('/admin/logs/stats/email'),
|
||||
pathStats: () => api.get('/admin/logs/stats/path'),
|
||||
},
|
||||
health: () => api.get('/health', { baseURL: '' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user