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:
mediabot-pt
2026-06-30 11:32:50 +08:00
parent 1664033c53
commit 88728ce2c2
10 changed files with 331 additions and 0 deletions

View File

@@ -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: '' })
}