fix: api声明优化 接口请求错误兜底优化

This commit is contained in:
ZhuRui
2026-08-07 09:13:15 +08:00
parent 3cddae93aa
commit 530de8b31c
32 changed files with 43 additions and 44 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ const request = (
const data = await res.json();
if (data.code == 401) {
if (data.code === '401') {
handleUnauthorized(data.msg);
return Promise.reject(new Error(data.msg || 'Unauthorized'));
}