style:请求加载
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -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); | ... | ... |
-
Please register or sign in to post a comment