Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -26,7 +26,7 @@ axios.interceptors.request.use( | ... | @@ -26,7 +26,7 @@ axios.interceptors.request.use( |
| 26 | // 响应拦截器 | 26 | // 响应拦截器 |
| 27 | axios.interceptors.response.use( | 27 | axios.interceptors.response.use( |
| 28 | response => { | 28 | response => { |
| 29 | - let userType = router.currentRoute.value.href.indexOf('business') > 0 ? 'b' : 'c'; | 29 | + let userType = router && router.currentRoute.value.href.indexOf('business') > 0 ? 'b' : 'c'; |
| 30 | if (response.data.code === 401) { | 30 | if (response.data.code === 401) { |
| 31 | // 未授权跳转登录页 | 31 | // 未授权跳转登录页 |
| 32 | // 带着上一个页面的信息 | 32 | // 带着上一个页面的信息 | ... | ... |
-
Please register or login to post a comment