fix: api声明优化 接口请求错误兜底优化
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user