|
@@ -256,7 +256,8 @@ const transform: AxiosTransform = {
|
|
|
}
|
|
}
|
|
|
// 请求是否被取消
|
|
// 请求是否被取消
|
|
|
const isCancel = axios.isCancel(error);
|
|
const isCancel = axios.isCancel(error);
|
|
|
- if (!isCancel) {
|
|
|
|
|
|
|
+ const isShowErrorMessage = error.response.config.requestOptions.isShowErrorMessage;
|
|
|
|
|
+ if (!isCancel && isShowErrorMessage) {
|
|
|
checkStatus(error.response && error.response.status, msg);
|
|
checkStatus(error.response && error.response.status, msg);
|
|
|
} else {
|
|
} else {
|
|
|
console.warn(error, '请求被取消!');
|
|
console.warn(error, '请求被取消!');
|