完善动态菜单、设置角色等功能,修复登录问题
This commit is contained in:
@@ -4,6 +4,10 @@ import store from './store/index'
|
||||
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
||||
// console.log(to)
|
||||
// console.log(from)
|
||||
// console.log(next)
|
||||
const user = store.state.user.user; //获取是有user
|
||||
if (!user) { //如果没有登入
|
||||
if (to.path == '/login/' || to.path == '/register/' || to.path == '/reset_password/' || to.path == '/qq/') {
|
||||
|
||||
Reference in New Issue
Block a user