feat: 增加 demo 环境处理

This commit is contained in:
zhengkunwang223
2023-02-21 15:19:12 +08:00
committed by zhengkunwang223
parent 554a238fd3
commit 0e11b18cd6
18 changed files with 113 additions and 42 deletions

View File

@@ -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);
},