From 74c4037999ddd3300937b1553146d9fd90682a5c Mon Sep 17 00:00:00 2001 From: jiang Date: Mon, 1 Apr 2019 21:22:19 +0800 Subject: [PATCH] =?UTF-8?q?401=20=E4=B8=8D=E9=9C=80=E8=A6=81=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=B7=E6=B1=82=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index def290be..0801b1d4 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -32,11 +32,6 @@ const errorHandler = error => { const errortext = codeMessage[response.status] || response.statusText; const { status, url } = response; - notification.error({ - message: `请求错误 ${status}: ${url}`, - description: errortext, - }); - if (status === 401) { notification.error({ message: '未登录或登录已过期,请重新登录。', @@ -48,6 +43,10 @@ const errorHandler = error => { }); return; } + notification.error({ + message: `请求错误 ${status}: ${url}`, + description: errortext, + }); // environment should not be used if (status === 403) { router.push('/exception/403'); -- GitLab