mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 01:04:20 +09:00
TC 수정사항 반영
This commit is contained in:
@@ -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("낫패밀리");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user