fix: 系统检查修复 — 安全和稳定性
后端: - config.ts 使用 requireAdmin 中间件,统一响应格式 - feedback.ts 使用 requireAdmin 中间件,移除重复权限检查 - feedback.ts 添加 affectedRows 检查(反馈不存在时返回 404) - 全局错误处理中间件兜底未捕获异常 前端: - request.ts 添加 15 秒请求超时设置
This commit is contained in:
@@ -47,6 +47,7 @@ export function request<T = any>(options: RequestOptions): Promise<T> {
|
||||
url: API_BASE + options.url,
|
||||
method: options.method || 'GET',
|
||||
data: options.data,
|
||||
timeout: 15000, // 15秒超时
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
...(token ? { Authorization: `Bearer ${token}` } : {})
|
||||
|
||||
Reference in New Issue
Block a user