首次登录修改密码去除调用logout接口
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-12-26 15:52:40 +08:00
parent 3925652428
commit d1ed8b39f0
2 changed files with 16 additions and 1 deletions

View File

@ -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)
},

View File

@ -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 {