优化token失效重新登录

This commit is contained in:
gaoxs
2020-06-03 20:12:00 +08:00
parent d7e0875381
commit 8267cbc18e
6 changed files with 80 additions and 77 deletions

View File

@ -51,6 +51,7 @@ const vuexStore = new Vuex.Store({
cookie.set(LOGIN_KEY, token, expires_time);
},
LOGOUT(state) {
console.log('清除数据')
state.token = null;
state.userInfo = null
let spread = cookie.get('spread')