mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-09 08:18:44 +01:00
refs #100 Refresh default active account when load global header
This commit is contained in:
parent
cdea89e8ac
commit
e77e05c556
@ -44,6 +44,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const accounts = await this.$store.dispatch('GlobalHeader/listAccounts')
|
const accounts = await this.$store.dispatch('GlobalHeader/listAccounts')
|
||||||
if (this.$route.params.id === undefined) {
|
if (this.$route.params.id === undefined) {
|
||||||
|
this.$store.dispatch('GlobalHeader/schmearMenu', accounts[0]._id)
|
||||||
return this.$router.push({ path: `/${accounts[0]._id}/home` })
|
return this.$router.push({ path: `/${accounts[0]._id}/home` })
|
||||||
} else {
|
} else {
|
||||||
return this.$store.dispatch('GlobalHeader/schmearMenu', this.$route.params.id)
|
return this.$store.dispatch('GlobalHeader/schmearMenu', this.$route.params.id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user