首次登录修改密码去除调用logout接口
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3925652428
commit
d1ed8b39f0
|
@ -273,6 +273,21 @@ const actions = {
|
|||
console.log(e)
|
||||
}
|
||||
},
|
||||
async resetData({ commit, state }) {
|
||||
try {
|
||||
removeToken() // must remove token first
|
||||
// await loginOut({
|
||||
// UserRoleId: zzSessionStorage.getItem('userId'),
|
||||
// IdentityUserId: zzSessionStorage.getItem('identityUserId'),
|
||||
// })
|
||||
resetRouter()
|
||||
removeName()
|
||||
zzSessionStorage.clear()
|
||||
commit('RESET_STATE')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
setToken({ commit }, token) {
|
||||
commit('SET_TOKEN', token)
|
||||
},
|
||||
|
|
|
@ -138,7 +138,7 @@ export default {
|
|||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
async logout() {
|
||||
var loginType = zzSessionStorage.getItem('loginType')
|
||||
await this.$store.dispatch('user/logout')
|
||||
await this.$store.dispatch('user/resetData')
|
||||
if (loginType) {
|
||||
this.$router.push(`/login?loginType=${loginType}`)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue