|
|
|
@ -71,6 +71,8 @@ const user = {
|
|
|
|
|
commit('SET_ID', user.userId)
|
|
|
|
|
commit('SET_NAME', user.userName)
|
|
|
|
|
commit('SET_AVATAR', avatar)
|
|
|
|
|
localStorage.setItem('POOL_NAME_LIST',JSON.stringify(res.poolNameList))
|
|
|
|
|
localStorage.setItem('USER_POOL_NAME_CURRENT',user.poolName)
|
|
|
|
|
resolve(res)
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
reject(error)
|
|
|
|
@ -90,7 +92,7 @@ const user = {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 退出系统
|
|
|
|
|
LogOut({ commit, state }) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
@ -98,6 +100,8 @@ const user = {
|
|
|
|
|
commit('SET_TOKEN', '')
|
|
|
|
|
commit('SET_ROLES', [])
|
|
|
|
|
commit('SET_PERMISSIONS', [])
|
|
|
|
|
localStorage.setItem('POOL_NAME_LIST',[])
|
|
|
|
|
localStorage.setItem('USER_POOL_NAME_CURRENT','')
|
|
|
|
|
removeToken()
|
|
|
|
|
resolve()
|
|
|
|
|
}).catch(error => {
|
|
|
|
@ -110,6 +114,8 @@ const user = {
|
|
|
|
|
FedLogOut({ commit }) {
|
|
|
|
|
return new Promise(resolve => {
|
|
|
|
|
commit('SET_TOKEN', '')
|
|
|
|
|
localStorage.setItem('POOL_NAME_LIST',[])
|
|
|
|
|
localStorage.setItem('USER_POOL_NAME_CURRENT','')
|
|
|
|
|
removeToken()
|
|
|
|
|
resolve()
|
|
|
|
|
})
|
|
|
|
|