Skip to content

Commit 23996b3

Browse files
committed
fix: log-out callback
1 parent 4aa01c1 commit 23996b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/GlobalHeader/AvatarDropdown.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ export default {
5454
title: this.$t('layouts.usermenu.dialog.title'),
5555
content: this.$t('layouts.usermenu.dialog.content'),
5656
onOk: () => {
57-
return new Promise((resolve, reject) => {
58-
setTimeout(Math.random() > 0.5 ? resolve : reject, 1500)
59-
}).catch(() => console.log('Oops errors!'))
57+
// return new Promise((resolve, reject) => {
58+
// setTimeout(Math.random() > 0.5 ? resolve : reject, 1500)
59+
// }).catch(() => console.log('Oops errors!'))
60+
return this.$store.dispatch('Logout').then(() => {
61+
this.$router.push({ name: 'login' })
62+
})
6063
},
6164
onCancel () {}
6265
})

0 commit comments

Comments
 (0)