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