7b918a52 by 任超

style:请求加载

1 parent 498da4b6
......@@ -24,7 +24,7 @@ service.interceptors.request.use(
return config
},
error => {
if (config.showLoading) {
if (error.showLoading) {
endLoadingSubCount(config.loadingTarget);
}
Message.error('请求超时!');
......@@ -57,7 +57,7 @@ service.interceptors.response.use(
type: 'error',
duration: 5 * 1000
})
if (response.config.showLoading) {
if (error.config.showLoading) {
endLoadingSubCount();
}
return Promise.reject(error);
......