|
@@ -20,7 +20,7 @@ const codeMessage = {
|
20
|
20
|
410: '请求的资源被永久删除,且不会再得到的。',
|
21
|
21
|
422: '当创建一个对象时,发生一个验证错误。',
|
22
|
22
|
500: '服务器发生错误,请检查服务器。',
|
23
|
|
- 502: '网关错误。',
|
|
23
|
+ 502: '连接服务超时',
|
24
|
24
|
503: '服务不可用,服务器暂时过载或维护。',
|
25
|
25
|
504: '网关超时。',
|
26
|
26
|
};
|
|
@@ -70,7 +70,8 @@ request.interceptors.response.use(async (response, options) => {
|
70
|
70
|
const errorText = codeMessage[response.status] || response.statusText;
|
71
|
71
|
const { status, url } = response;
|
72
|
72
|
notification.error({
|
73
|
|
- message: `请求错误 ${status}: ${url}`,
|
|
73
|
+ // message: `连接超时,请刷新或重新登录 ${status}: ${url}`,
|
|
74
|
+ message: `连接超时,请刷新或重新登录 ${status}: ${url}`,
|
74
|
75
|
description: errorText,
|
75
|
76
|
});
|
76
|
77
|
throw new Error(response.statusText);
|