feat: 增加 demo 环境处理
This commit is contained in:

committed by
zhengkunwang223

parent
554a238fd3
commit
0e11b18cd6
@@ -79,7 +79,7 @@ class RequestHttp {
|
||||
async (error: AxiosError) => {
|
||||
const { response } = error;
|
||||
if (error.message.indexOf('timeout') !== -1) MsgError('请求超时!请您稍后重试');
|
||||
if (response) checkStatus(response.status);
|
||||
if (response) checkStatus(response.status, response.data['message']);
|
||||
if (!window.navigator.onLine) router.replace({ path: '/500' });
|
||||
return Promise.reject(error);
|
||||
},
|
||||
|
Reference in New Issue
Block a user