TC 수정사항 반영

This commit is contained in:
kimre
2022-07-16 23:53:22 +09:00
parent c323de8bb9
commit e8328fef2c
43 changed files with 954 additions and 904 deletions

View File

@@ -1,6 +1,7 @@
import Vue from 'vue';
import Router from 'vue-router';
import searchcondition from './store'
import store from './store'
//import login from '@/modules/login/store/index'
import tokenSvc from '@/common/token-service';
import HubwebLayout from './views/HubwebLayout.vue';
@@ -21,6 +22,7 @@ import riskmgtRoutes from './modules/riskMgt/router';
import monthRoutes from './modules/stats/router';
// import channelList from './modules/attractMgt/views/ChannelList';
Vue.use(Router)
const router = new Router({
@@ -76,6 +78,16 @@ router.beforeEach((to, from, next) => {
if (!isPublic && !loggedIn) {
return next('/login');
}else{
var nextUrl = to.fullPath;
if(nextUrl == '/'){
console.log(store.getters);
const rootUrl = store.getters['login/getRootUrl'];
if(rootUrl == null){
return next('/login');
}
return next(rootUrl);
}
}
to.matched.some(record => {
@@ -86,7 +98,7 @@ router.beforeEach((to, from, next) => {
// console.log("패밀리");
} else {
// 그 외의 경우 검색 조건 초기화
searchcondition.commit("searchcondition/updateSearchCondition", null);
store.commit("searchcondition/updateSearchCondition", null);
// console.log("낫패밀리");
}
}