.
This commit is contained in:
@@ -122,7 +122,7 @@ http.interceptors.response.use(
|
||||
response.config.custom.showLoading && closeLoading();
|
||||
|
||||
// 自定义处理【error 错误提示】:如果需要显示错误提示,则显示错误提示
|
||||
if (response.data.code !== 0) {
|
||||
if (response.data.code !== 0 && response.data.code !== 200) {
|
||||
// 特殊:如果 401 错误码,则跳转到登录页 or 刷新令牌
|
||||
if (response.data.code === 401) {
|
||||
return refreshToken(response.config);
|
||||
|
||||
Reference in New Issue
Block a user