Skip to content

Commit

Permalink
perf: Solve the problem of frequently entering "SYSTEM" after logging in
Browse files Browse the repository at this point in the history
  • Loading branch information
Halo1236 committed Aug 22, 2024
1 parent d561701 commit c554044
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/layout/components/NavHeader/AccountDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

<script>
import { mapGetters } from 'vuex'
import { SYSTEM_ORG_ID } from '@/utils/org'
export default {
name: 'AccountDropdown',
Expand Down Expand Up @@ -74,6 +75,10 @@ export default {
}
},
logout() {
const currentOrg = this.store.getters.currentOrg
if (currentOrg === SYSTEM_ORG_ID) {
this.$store.dispatch('users/leaveSettingOrg')
}
}
}
}
Expand Down

0 comments on commit c554044

Please sign in to comment.