首次登录修改密码去除调用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)
|
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) {
|
setToken({ commit }, token) {
|
||||||
commit('SET_TOKEN', token)
|
commit('SET_TOKEN', token)
|
||||||
},
|
},
|
||||||
|
|
|
@ -138,7 +138,7 @@ export default {
|
||||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||||
async logout() {
|
async logout() {
|
||||||
var loginType = zzSessionStorage.getItem('loginType')
|
var loginType = zzSessionStorage.getItem('loginType')
|
||||||
await this.$store.dispatch('user/logout')
|
await this.$store.dispatch('user/resetData')
|
||||||
if (loginType) {
|
if (loginType) {
|
||||||
this.$router.push(`/login?loginType=${loginType}`)
|
this.$router.push(`/login?loginType=${loginType}`)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue