fix: 修复前端 lint 错误 — 移除 ref 模式,用 useEffect 依赖注入回调

- api.ts: 移除 catch 中未使用的 err 变量
- auth.tsx: 去掉 useRef 模式,直接在 useEffect 中注册回调并声明依赖
This commit is contained in:
hhs
2026-06-20 15:07:09 +08:00
parent d78cdb509d
commit 970f10a274
2 changed files with 4 additions and 10 deletions

View File

@@ -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,