令牌过期
This commit is contained in:
@@ -32,8 +32,9 @@ service.interceptors.response.use(
|
||||
return result;
|
||||
} else {
|
||||
if (code === 401) {
|
||||
localStorage.removeItem('token');
|
||||
msg.error('登录已过期,请重新登录').then(r => {
|
||||
msg.error(message).then(r => {
|
||||
localStorage.removeItem('token');
|
||||
localStorage.removeItem('user');
|
||||
window.location.href = '/'
|
||||
msg.destroy()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user