增加登录跳转刷新
This commit is contained in:
@@ -49,6 +49,9 @@ http.interceptors.response.use(response => {
|
|||||||
if (response.data && response.data.code === 401) { // 401, token失效
|
if (response.data && response.data.code === 401) { // 401, token失效
|
||||||
clearLoginInfo()
|
clearLoginInfo()
|
||||||
router.push({name: 'login'})
|
router.push({name: 'login'})
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.reload()
|
||||||
|
}, 300);
|
||||||
}
|
}
|
||||||
return response
|
return response
|
||||||
}, error => {
|
}, error => {
|
||||||
|
|||||||
Reference in New Issue
Block a user