공지사항 인증 URL 등록 처리

This commit is contained in:
kimjhjjang
2022-11-08 16:58:31 +09:00
parent a131c45400
commit 669f7c0aec
3 changed files with 1 additions and 8 deletions

View File

@@ -11,7 +11,6 @@ const state = {
authToken: null,
beforeUrl: null,
isLoading: false,
loginPathUrl: null,
};
const getters = {
@@ -27,7 +26,6 @@ const getters = {
getAuthToken: (state) => state.authToken,
getBeforeUrl: (state) => state.beforeUrl,
isLoading: (state) => state.isLoading,
getLoginPathUrl: (state) => state.loginPathUrl,
};
const mutations = {
@@ -73,9 +71,6 @@ const mutations = {
isLoading: (state, value) => {
state.isLoading = value;
},
setLoginPathUrl: (state, value) => {
state.loginPathUrl = value;
},
};
const actions = {};

View File

@@ -66,15 +66,12 @@ const router = new Router({
router.beforeEach((to, from, next) => {
const isPublic = to.matched.some((record) => record.meta.public);
const loggedIn = !!tokenSvc.getToken();
store.commit('login/setLoginPathUrl', isPublic + '/' + loggedIn + to.fullPath);
if (!isPublic && !loggedIn) {
return next('/login');
} else {
var nextUrl = to.fullPath;
var fromUrl = from.fullPath;
console.log(fromUrl);
var menuUrls = store.getters['login/getMenuUrls'];
if (menuUrls.length > 0) {
var moveFlag = false;