mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 01:04:20 +09:00
라우터 console 체크 및 공지사항 FAQ console.log 삭제
This commit is contained in:
@@ -66,7 +66,11 @@ const router = new Router({
|
||||
router.beforeEach((to, from, next) => {
|
||||
const isPublic = to.matched.some((record) => record.meta.public);
|
||||
const loggedIn = !!tokenSvc.getToken();
|
||||
console.log(isPublic);
|
||||
console.log(loggedIn);
|
||||
console.log(to);
|
||||
if (!isPublic && !loggedIn) {
|
||||
console.log('1');
|
||||
return next('/login');
|
||||
} else {
|
||||
var nextUrl = to.fullPath;
|
||||
@@ -77,6 +81,7 @@ router.beforeEach((to, from, next) => {
|
||||
var moveFlag = false;
|
||||
for (var i = 0; i < menuUrls.length; i++) {
|
||||
var targetUrl = menuUrls[i];
|
||||
console.log('nextUrl : ' + nextUrl + ' /// targetUrl : ' + targetUrl);
|
||||
if (nextUrl == targetUrl) {
|
||||
moveFlag = true;
|
||||
if (fromUrl != '/' && fromUrl != '/view/error/404' && fromUrl != '/view/error/500') {
|
||||
@@ -179,17 +184,16 @@ router.beforeEach((to, from, next) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// url 홈페이지 관리
|
||||
if (nextUrl == '/homeMgt/notice' || nextUrl == '/homeMgt/faq') {
|
||||
/* if (nextUrl == '/homeMgt/notice' || nextUrl == '/homeMgt/faq') {
|
||||
moveFlag = true;
|
||||
}
|
||||
} */
|
||||
|
||||
// url 배치 모니터링
|
||||
if((nextUrl == '/sysMgt/batchList') || '/sysMgt/batchDetail'){
|
||||
/* if (nextUrl == '/sysMgt/batchList' || '/sysMgt/batchDetail') {
|
||||
moveFlag = true;
|
||||
}
|
||||
|
||||
*/
|
||||
if (!moveFlag) {
|
||||
if (
|
||||
fromUrl == '/login' ||
|
||||
@@ -197,6 +201,7 @@ router.beforeEach((to, from, next) => {
|
||||
fromUrl == '/view/login/resetPassword' ||
|
||||
fromUrl == '/view/login/updatePassword'
|
||||
) {
|
||||
console.log('2');
|
||||
return next('/login');
|
||||
}
|
||||
// store.commit("login/isErrorPage", true);
|
||||
@@ -209,6 +214,7 @@ router.beforeEach((to, from, next) => {
|
||||
nextUrl == '/view/login/updatePassword'
|
||||
) {
|
||||
if (fromUrl != '/login') {
|
||||
console.log('3');
|
||||
return next('/login');
|
||||
}
|
||||
}
|
||||
@@ -216,6 +222,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (nextUrl == '/') {
|
||||
const rootUrl = store.getters['login/getRootUrl'];
|
||||
if (rootUrl == null) {
|
||||
console.log('4');
|
||||
return next('/login');
|
||||
}
|
||||
return next(rootUrl);
|
||||
@@ -224,6 +231,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (nextUrl == '/login' && loggedIn) {
|
||||
const rootUrl = store.getters['login/getRootUrl'];
|
||||
if (rootUrl == null) {
|
||||
console.log('5');
|
||||
return next('/login');
|
||||
}
|
||||
return next(rootUrl);
|
||||
|
||||
Reference in New Issue
Block a user