mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-12-12 13:47:13 +08:00
bugfix login from redirect (#333)
This commit is contained in:
parent
1a3d50424f
commit
f700b0341e
@ -123,7 +123,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async logout() {
|
async logout() {
|
||||||
await this.$store.dispatch('user/logout')
|
await this.$store.dispatch('user/logout')
|
||||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
this.$router.push({ path: '/login', query: { redirect: this.$route.fullPath }})
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
this.$router.push({ name: 'Profile' })
|
this.$router.push({ name: 'Profile' })
|
||||||
|
|||||||
@ -169,7 +169,7 @@ const actions = {
|
|||||||
root: true
|
root: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// dispatch('tagsView/delAllViews', null, { root:true })
|
dispatch('tagsView/delAllViews', null, { root: true })
|
||||||
removeToken()
|
removeToken()
|
||||||
removeCurrentRole()
|
removeCurrentRole()
|
||||||
resetRouter()
|
resetRouter()
|
||||||
|
|||||||
@ -134,7 +134,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function(route) {
|
handler: function(route) {
|
||||||
this.redirect = route.query && route.query.redirect
|
this.redirect = route.query.redirect
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user