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

bug fixes

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