提交 e39283f0 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 e7f64c26
...@@ -81,7 +81,12 @@ Vue.filter('avatar', function(value) { ...@@ -81,7 +81,12 @@ Vue.filter('avatar', function(value) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (to.meta.requiredLogin) { if (to.meta.requiredLogin) {
store.dispatch('checkLogin').then(isLogin => { store.dispatch('checkLogin').then(isLogin => {
isLogin ? next() : next('/login') isLogin
? next()
: next({
path: '/login',
query: { redirect_uri: encodeURIComponent(window.location.href) }
})
}) })
return return
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论