7b918a52 by 任超

style:请求加载

1 parent 498da4b6
...@@ -24,7 +24,7 @@ service.interceptors.request.use( ...@@ -24,7 +24,7 @@ service.interceptors.request.use(
24 return config 24 return config
25 }, 25 },
26 error => { 26 error => {
27 if (config.showLoading) { 27 if (error.showLoading) {
28 endLoadingSubCount(config.loadingTarget); 28 endLoadingSubCount(config.loadingTarget);
29 } 29 }
30 Message.error('请求超时!'); 30 Message.error('请求超时!');
...@@ -57,7 +57,7 @@ service.interceptors.response.use( ...@@ -57,7 +57,7 @@ service.interceptors.response.use(
57 type: 'error', 57 type: 'error',
58 duration: 5 * 1000 58 duration: 5 * 1000
59 }) 59 })
60 if (response.config.showLoading) { 60 if (error.config.showLoading) {
61 endLoadingSubCount(); 61 endLoadingSubCount();
62 } 62 }
63 return Promise.reject(error); 63 return Promise.reject(error);
......