fix: 修复前端 lint 错误 — 移除 ref 模式,用 useEffect 依赖注入回调
- api.ts: 移除 catch 中未使用的 err 变量 - auth.tsx: 去掉 useRef 模式,直接在 useEffect 中注册回调并声明依赖
This commit is contained in:
@@ -116,7 +116,7 @@ async function request<T>(
|
||||
}
|
||||
|
||||
return { data: body as T, status };
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return {
|
||||
error: { code: "NETWORK_ERROR", message: "网络连接失败,请检查网络" },
|
||||
status: 0,
|
||||
|
||||
Reference in New Issue
Block a user