Commit 31db8d42 by Zheng Jie

[代码优化](v2.6):修复重新登录后重定向参数丢失,具体查看如下 issues

close https://github.com/elunez/eladmin/issues/584
parent e6081ec7
......@@ -46,6 +46,7 @@ import { encrypt } from '@/utils/rsaEncrypt'
import Config from '@/settings'
import { getCodeImg } from '@/api/login'
import Cookies from 'js-cookie'
import qs from 'qs'
import Background from '@/assets/images/background.jpg'
export default {
name: 'Login',
......@@ -73,7 +74,12 @@ export default {
watch: {
$route: {
handler: function(route) {
this.redirect = route.query && route.query.redirect
if (route.query) {
const data = route.query
this.redirect = data.redirect
delete data.redirect
this.redirect = this.redirect + '&' + qs.stringify(data, { indices: false })
}
},
immediate: true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment