Commit 1d28ec2f by 张杰

增加全局拦截,登录失效重新刷新一下页面

1 parent b8a3b5ee
......@@ -45,8 +45,13 @@ export function checkStatus(status, msg) {
break;
case 603:
error('未登录或登录已过期,请重新登录');
store.dispatch('app/setToken', '');
localStorage.removeItem('token');
localStorage.removeItem('userInfo');
localStorage.removeItem('breadcrumb');
store.dispatch('app/setToken', '');
setTimeout(() => {
window.location.reload();
}, 10)
break;
case 505:
error('http版本不支持该请求!');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!