增加登录跳转刷新
This commit is contained in:
parent
d10a6cb178
commit
a4abdf9cc0
|
|
@ -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 => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue