diff --git a/src/utils/request.js b/src/utils/request.js index 150c8608d3fe83c5d67333e95fbdaaded9b61648..ea9fed246eb4c331120c085fae90449c740309c1 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -4,7 +4,6 @@ */ import { extend } from 'umi-request'; import { notification } from 'antd'; -import router from 'umi/router'; const codeMessage = { 200: '服务器成功返回请求的数据。', @@ -36,24 +35,6 @@ const errorHandler = error => { message: `请求错误 ${status}: ${url}`, description: errortext, }); - - if (status === 401) { - notification.error({ - message: '未登录或登录已过期,请重新登录。', - }); - } - // environment should not be used - if (status === 403) { - router.push('/exception/403'); - return; - } - if (status <= 504 && status >= 500) { - router.push('/exception/500'); - return; - } - if (status >= 404 && status < 422) { - router.push('/exception/404'); - } }; /**