mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 01:04:20 +09:00
수정건 수정
This commit is contained in:
@@ -71,10 +71,12 @@ const router = new Router({
|
||||
router.beforeEach((to, from, next) => {
|
||||
const isPublic = to.matched.some(record => record.meta.public);
|
||||
const loggedIn = !!tokenSvc.getToken();
|
||||
|
||||
if (!isPublic && !loggedIn) {
|
||||
return next('/login');
|
||||
}else{
|
||||
var nextUrl = to.fullPath;
|
||||
var fromUrl = from.fullPath;
|
||||
if(nextUrl == '/'){
|
||||
console.log(store.getters);
|
||||
const rootUrl = store.getters['login/getRootUrl'];
|
||||
@@ -82,7 +84,12 @@ router.beforeEach((to, from, next) => {
|
||||
return next('/login');
|
||||
}
|
||||
return next(rootUrl);
|
||||
}
|
||||
}else if(nextUrl == '/view/login/auth'){
|
||||
if(fromUrl != '/login'){
|
||||
return next('/login');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
to.matched.some(record => {
|
||||
|
||||
Reference in New Issue
Block a user