
--- client/resources/api/cntxtPth.js
+++ client/resources/api/cntxtPth.js
... | ... | @@ -1,7 +1,7 @@ |
1 | 1 |
import apiClient from "./index"; |
2 | 2 |
|
3 | 3 |
export const getCntxtPth = () => { |
4 |
- return apiClient.get(`/admin/cntxtPth/findLatestCntxtPth.json`); |
|
4 |
+ return apiClient.get(`/sys/cntxtPth/findLatestCntxtPth.json`); |
|
5 | 5 |
} |
6 | 6 |
|
7 | 7 |
export const saveCntxtPth = cntxtPth => { |
--- client/resources/api/index.js
+++ client/resources/api/index.js
... | ... | @@ -9,14 +9,14 @@ |
9 | 9 |
}); |
10 | 10 |
|
11 | 11 |
const excludeCtxUrls = [ |
12 |
- '/admin/cntxtPth/findLatestCntxtPth.json' // Context Path 정보 호출 |
|
12 |
+ '/sys/cntxtPth/findLatestCntxtPth.json' // Context Path 정보 호출 |
|
13 | 13 |
] |
14 | 14 |
|
15 | 15 |
apiClient.interceptors.request.use( |
16 | 16 |
config => { |
17 | 17 |
const excludeCtxUrl = excludeCtxUrls.some(url => config.url.includes(url)); |
18 | 18 |
const contextPath = store.state.contextPath || ''; |
19 |
- if(contextPath != '/' && !excludeCtxUrl) { |
|
19 |
+ if(!excludeCtxUrl) { |
|
20 | 20 |
config.url = contextPath + config.url; // 요청 시 Context Path 추가 |
21 | 21 |
} |
22 | 22 |
|
--- client/views/common/filters.js
+++ client/views/common/filters.js
... | ... | @@ -1,7 +1,14 @@ |
1 | 1 |
import moment from 'moment'; |
2 |
+import store from '../pages/AppStore'; |
|
2 | 3 |
|
3 | 4 |
const filters = { |
4 | 5 |
|
6 |
+ // Context Path를 포함한 URL 생성 |
|
7 |
+ ctxPath(value) { |
|
8 |
+ const contextPath = store.state.contextPath || ''; |
|
9 |
+ return contextPath + value; |
|
10 |
+ }, |
|
11 |
+ |
|
5 | 12 |
// 아이디 정규식(5~20자의 영문 소문자, 숫자와 특수기호(_),(-)만 사용) |
6 | 13 |
date(value) { |
7 | 14 |
return moment(value).format('YYYY-MM-DD'); |
--- client/views/component/Breadcrumb/Breadcrumb.vue
+++ client/views/component/Breadcrumb/Breadcrumb.vue
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
<template> |
2 | 2 |
<div v-if="breadcrumbList.length > 0"> |
3 |
- <span><router-link :to="{path : '/adm/main.page'}">홈</router-link> > </span> |
|
3 |
+ <span><router-link :to="{path : this.$filters.ctxPath('/adm/main.page')}">홈</router-link> > </span> |
|
4 | 4 |
<span v-for="(crumb, index) in breadcrumbList" :key="index"> |
5 | 5 |
{{ crumb.menuNm }} |
6 | 6 |
<span v-if="index < breadcrumbList.length - 1"> > </span> |
--- client/views/layout/AdminHeader.vue
+++ client/views/layout/AdminHeader.vue
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
<div class="page-title"> |
5 | 5 |
<p>{{ pgNm }} </p> |
6 | 6 |
</div> |
7 |
- <Breadcrumb v-if="$route.path !== '/adm/main.page' && $route.path !== '/main.page'" /> |
|
7 |
+ <Breadcrumb v-if="$route.path !== this.$filters.ctxPath('/adm/main.page') && $route.path !== this.$filters.ctxPath('/main.page')" /> |
|
8 | 8 |
</div> |
9 | 9 |
<div class="info-wrap"> |
10 | 10 |
<div class="info"> |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 |
// 사이트 이동 |
44 | 44 |
fnSiteMove() { |
45 | 45 |
this.$router.push({ |
46 |
- path: "/", |
|
46 |
+ path: this.$filters.ctxPath("/"), |
|
47 | 47 |
}); |
48 | 48 |
}, |
49 | 49 |
...mapActions(["logout"]), |
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 |
async fnlogOut() { |
52 | 52 |
await this.logout(); |
53 | 53 |
this.$router.push({ |
54 |
- path: "/login.page", |
|
54 |
+ path: this.$filters.ctxPath("/login.page"), |
|
55 | 55 |
}); |
56 | 56 |
}, |
57 | 57 |
// 캐시 초기화 |
--- client/views/layout/AdminMenu.vue
+++ client/views/layout/AdminMenu.vue
... | ... | @@ -1,7 +1,7 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="side-bar"> |
3 | 3 |
<div class="logo"> |
4 |
- <router-link :to="{path : '/adm/main.page'}">ADMINISTRATOR</router-link> |
|
4 |
+ <router-link :to="{path : this.$filters.ctxPath('/adm/main.page')}">ADMINISTRATOR</router-link> |
|
5 | 5 |
</div> |
6 | 6 |
<nav> |
7 | 7 |
<ul class="main-menu"> |
... | ... | @@ -77,7 +77,8 @@ |
77 | 77 |
isOpen: false, // 1뎁스 닫힘 |
78 | 78 |
childList: menu.childList.map(sub => ({ |
79 | 79 |
...sub, |
80 |
- isOpen: false // 2뎁스도 닫힘 |
|
80 |
+ isOpen: false, // 2뎁스도 닫힘 |
|
81 |
+ routerUrl: this.$filters.ctxPath(sub.routerUrl) |
|
81 | 82 |
})) |
82 | 83 |
})); |
83 | 84 |
// 전체 메뉴 트리 store에 저장 |
--- client/views/layout/UserHeader.vue
+++ client/views/layout/UserHeader.vue
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
<div class="flex justify-between align-center header"> |
5 | 5 |
<div class="logo"> |
6 | 6 |
<router-link |
7 |
- :to="{ path: '/' }" |
|
7 |
+ :to="{ path: this.$filters.ctxPath('/') }" |
|
8 | 8 |
> |
9 | 9 |
<img |
10 | 10 |
src="../../resources/img/logo-color.png" |
... | ... | @@ -74,14 +74,14 @@ |
74 | 74 |
async fnlogOut() { |
75 | 75 |
await this.logout(); |
76 | 76 |
this.$router.push({ |
77 |
- path: "/", |
|
77 |
+ path: this.$filters.ctxPath("/"), |
|
78 | 78 |
}); |
79 | 79 |
}, |
80 | 80 |
|
81 | 81 |
// 사용자 정보 보기로 이동 |
82 | 82 |
fnLink() { |
83 | 83 |
this.$router.push({ |
84 |
- path: "/portal/myInfo/view.page", |
|
84 |
+ path: this.$filters.ctxPath("/portal/myInfo/view.page"), |
|
85 | 85 |
}); |
86 | 86 |
}, |
87 | 87 |
}, |
--- client/views/layout/UserMenu.vue
+++ client/views/layout/UserMenu.vue
... | ... | @@ -150,7 +150,13 @@ |
150 | 150 |
}; |
151 | 151 |
const res = await findBySysMenu(params); |
152 | 152 |
if (res.status == 200) { |
153 |
- this.menuList = res.data.data.menuList; |
|
153 |
+ this.menuList = res.data.data.menuList.map(menu => ({ |
|
154 |
+ ...menu, |
|
155 |
+ childList: menu.childList.map(sub => ({ |
|
156 |
+ ...sub, |
|
157 |
+ routerUrl: this.$filters.ctxPath(sub.routerUrl) |
|
158 |
+ })) |
|
159 |
+ })); |
|
154 | 160 |
// 전체 메뉴 트리 store에 저장 |
155 | 161 |
this.$store.commit('setMenuList', this.menuList); |
156 | 162 |
this.fnMenuActive(this.$route.path); |
--- client/views/pages/App.vue
+++ client/views/pages/App.vue
... | ... | @@ -3,15 +3,15 @@ |
3 | 3 |
<AdminHeader /> |
4 | 4 |
<AdminMenu /> |
5 | 5 |
<main class="main-wrap"> |
6 |
- <div :class="{'content-wrap': true, 'main': this.$route.path === '/adm/main.page'}"> |
|
6 |
+ <div :class="{'content-wrap': true, 'main': this.$route.path === this.$filters.ctxPath('/adm/main.page')}"> |
|
7 | 7 |
<router-view /> |
8 | 8 |
</div> |
9 | 9 |
</main> |
10 |
- </div> |
|
10 |
+ </div> |
|
11 | 11 |
<div v-else v-cloak class="user-wrap relative"> |
12 |
- <UserHeader v-if="path != '/login.page'"/> |
|
12 |
+ <UserHeader v-if="path != this.$filters.ctxPath('/login.page')"/> |
|
13 | 13 |
<main class="main-wrap"> |
14 |
- <Breadcrumb v-if="$route.path !== '/adm/main.page' && $route.path !== '/main.page'" /> |
|
14 |
+ <Breadcrumb v-if="$route.path !== this.$filters.ctxPath('/adm/main.page') && $route.path !== this.$filters.ctxPath('/main.page')" /> |
|
15 | 15 |
<router-view /> |
16 | 16 |
</main> |
17 | 17 |
</div> |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 |
computed: { |
44 | 44 |
isAdminPage() { |
45 | 45 |
// 현재 URL을 기반으로 사용자와 관리자 페이지 여부를 판단 |
46 |
- return this.$route && this.$route.path.startsWith("/adm"); |
|
46 |
+ return this.$route && this.$route.path.startsWith(this.$filters.ctxPath("/adm")); |
|
47 | 47 |
}, |
48 | 48 |
}, |
49 | 49 |
components: { |
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
... | ... | @@ -1,5 +1,6 @@ |
1 | 1 |
import { createWebHistory, createRouter } from "vue-router"; |
2 | 2 |
import store from "./AppStore"; |
3 |
+import filters from '../common/filters'; |
|
3 | 4 |
|
4 | 5 |
// 메인화면 |
5 | 6 |
import Main from "./user/portal/main/Main.vue"; |
... | ... | @@ -31,12 +32,15 @@ |
31 | 32 |
try { |
32 | 33 |
const res = await getCntxtPth(); |
33 | 34 |
if (res.status == 200) { |
34 |
- const ctx = res.data.data || ""; // Context Path 정보 |
|
35 |
+ let ctx = res.data.data || ''; // Context Path 정보 |
|
36 |
+ if(ctx == '/') { |
|
37 |
+ ctx = ''; // Context Path가 '/'인 경우 빈 문자열로 설정 |
|
38 |
+ } |
|
35 | 39 |
store.commit("setContextPath", ctx); // Context Path 정보 저장 |
36 | 40 |
return ctx; |
37 | 41 |
}else { |
38 | 42 |
store.commit("setStoreReset"); |
39 |
- window.location = '/' |
|
43 |
+ window.location = filters.ctxPath('/') |
|
40 | 44 |
} |
41 | 45 |
} catch (error) { |
42 | 46 |
return []; |
... | ... | @@ -57,7 +61,7 @@ |
57 | 61 |
return newRoutes; |
58 | 62 |
}else { |
59 | 63 |
store.commit("setStoreReset"); |
60 |
- window.location = '/' |
|
64 |
+ window.location = filters.ctxPath('/') |
|
61 | 65 |
} |
62 | 66 |
} catch (error) { |
63 | 67 |
return []; |
... | ... | @@ -149,7 +153,9 @@ |
149 | 153 |
const dynamicRoutes = await fetchRoutes(); // DB에 적재된 라우터 정보 호출 |
150 | 154 |
const prefixedBeforeRoutes = addContextPathToRoutes(beforeRoutes, ctx); // 기존 라우터 정보에 Context Path 추가 |
151 | 155 |
const prefixedDynamicRoutes = addContextPathToRoutes(dynamicRoutes, ctx); // DB에 적재된 라우터 정보에 Context Path 추가 |
156 |
+ console.log('prefixedDynamicRoutes: ', prefixedDynamicRoutes); |
|
152 | 157 |
const newRoutes = prefixedBeforeRoutes.concat(prefixedDynamicRoutes); // 기존 라우터 정보와 합치기 |
158 |
+ console.log('newRoutes: ', newRoutes); |
|
153 | 159 |
const AppRouter = createRouter({ |
154 | 160 |
history: createWebHistory(), |
155 | 161 |
routes: newRoutes, |
... | ... | @@ -167,8 +173,8 @@ |
167 | 173 |
console.log('loginMode', loginMode) |
168 | 174 |
// 로그인 상태 확인 (JWT 또는 SESSION) |
169 | 175 |
const isLogin = loginMode === 'J' ? store.state.authorization : store.state.mbrId; |
170 |
- if (!isLogin && to.path !== '/login.page') { |
|
171 |
- next({ path: "/login.page" }); |
|
176 |
+ if (!isLogin && to.path !== filters.ctxPath('/login.page')) { |
|
177 |
+ next({ path: filters.ctxPath("/login.page") }); |
|
172 | 178 |
return; |
173 | 179 |
} |
174 | 180 |
|
... | ... | @@ -185,16 +191,16 @@ |
185 | 191 |
const roleCheck = isValidRole(); |
186 | 192 |
if (!accesCheck || !roleCheck) { |
187 | 193 |
alert('접근이 불가합니다.\n관리자에게 문의하세요.'); |
188 |
- next('/'); |
|
194 |
+ next(filters.ctxPath('/')); |
|
189 | 195 |
} |
190 | 196 |
// 경로에 따른 사용자 타입 설정 |
191 |
- if (to.path === '/') { |
|
197 |
+ if (to.path === filters.ctxPath('/')) { |
|
192 | 198 |
store.commit('setUserType', 'portal') |
193 |
- } else if (to.path.startsWith('/adm')) { |
|
199 |
+ } else if (to.path.startsWith(filters.ctxPath('/adm'))) { |
|
194 | 200 |
store.commit('setUserType', 'adm'); |
195 | 201 |
} |
196 | 202 |
|
197 |
- if (to.path === '/login.page') { |
|
203 |
+ if (to.path === filters.ctxPath('/login.page')) { |
|
198 | 204 |
store.commit('setPath', to.path); |
199 | 205 |
next(); |
200 | 206 |
return; |
... | ... | @@ -204,11 +210,11 @@ |
204 | 210 |
sessionStorage.setItem("redirect", to.fullPath); |
205 | 211 |
|
206 | 212 |
// 메인 페이지 or 로그인 페이지 |
207 |
- if (to.path === '/' || to.path.includes('/login.page') || to.path.startsWith('/cmmn/') || to.path.includes('/searchId.page') || to.path.includes('/resetPswd.page')) { |
|
213 |
+ if (to.path === filters.ctxPath('/') || to.path.includes('/login.page') || to.path.startsWith(filters.ctxPath('/cmmn/')) || to.path.includes('/searchId.page') || to.path.includes('/resetPswd.page')) { |
|
208 | 214 |
let path = to.path; |
209 | 215 |
// 게시판일 경우 .page로 끝나는 경로가 있으므로 마지막 '/' 이전 경로로 설정 |
210 | 216 |
if (to.path.includes('BBS_MNG')) { |
211 |
- const lastSlashIndex = to.path.lastIndexOf('/'); // 마지막 '/' 인덱스 |
|
217 |
+ const lastSlashIndex = to.path.lastIndexOf(filters.ctxPath('/')); // 마지막 '/' 인덱스 |
|
212 | 218 |
path = to.path.substring(0, lastSlashIndex); // 마지막 '/' 이전 경로 |
213 | 219 |
} |
214 | 220 |
store.commit('setPath', path); |
... | ... | @@ -242,7 +248,7 @@ |
242 | 248 |
// 권한이 있고 접근 가능한 경우 |
243 | 249 |
if (hasAcc) { |
244 | 250 |
if (to.path.includes('.page')) { |
245 |
- const lastSlashIndex = to.path.lastIndexOf('/'); // 마지막 '/' 인덱스 |
|
251 |
+ const lastSlashIndex = to.path.lastIndexOf(filters.ctxPath('/')); // 마지막 '/' 인덱스 |
|
246 | 252 |
const path = to.path.substring(0, lastSlashIndex); // 마지막 '/' 이전 경로 |
247 | 253 |
store.commit('setPath', path); |
248 | 254 |
} |
... | ... | @@ -262,7 +268,7 @@ |
262 | 268 |
} |
263 | 269 |
} else { |
264 | 270 |
// sessionStorage.setItem("redirect", to.fullPath); |
265 |
- next({ path: "/login.page" }); |
|
271 |
+ next({ path: filters.ctxPath("/login.page") }); |
|
266 | 272 |
} |
267 | 273 |
}); |
268 | 274 |
return AppRouter; |
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
... | ... | @@ -81,7 +81,7 @@ |
81 | 81 |
document.cookie = "refresh=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; |
82 | 82 |
document.cookie = "Authorization=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; |
83 | 83 |
// 4. 로그인 페이지로 이동 |
84 |
- window.location = "/login.page"; |
|
84 |
+ window.location = state.contextPath + "/login.page"; |
|
85 | 85 |
} |
86 | 86 |
} catch(error) { |
87 | 87 |
const errorData = error.response.data; |
--- client/views/pages/adm/boardManagement/template/commonTemplate/CommonInsert.vue
+++ client/views/pages/adm/boardManagement/template/commonTemplate/CommonInsert.vue
... | ... | @@ -352,7 +352,7 @@ |
352 | 352 |
} |
353 | 353 |
// axios 호출 |
354 | 354 |
await defaultAxios({ |
355 |
- url: "/sys/bbsCn/saveBbsCn.file", |
|
355 |
+ url: this.$filters.ctxPath("/sys/bbsCn/saveBbsCn.file"), |
|
356 | 356 |
method: "post", |
357 | 357 |
headers: { |
358 | 358 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
... | ... | @@ -414,7 +414,7 @@ |
414 | 414 |
} |
415 | 415 |
// axios 호출 |
416 | 416 |
defaultAxios({ |
417 |
- url: "/sys/bbsCn/updateBbsCn.file", |
|
417 |
+ url: this.$filters.ctxPath("/sys/bbsCn/updateBbsCn.file"), |
|
418 | 418 |
method: "post", |
419 | 419 |
headers: { |
420 | 420 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/boardManagement/template/faqTemplate/FaqInsert.vue
+++ client/views/pages/adm/boardManagement/template/faqTemplate/FaqInsert.vue
... | ... | @@ -395,7 +395,7 @@ |
395 | 395 |
} |
396 | 396 |
// axios 호출 |
397 | 397 |
await defaultAxios({ |
398 |
- url: "/sys/bbsCn/saveBbsCn.file", |
|
398 |
+ url: this.$filters.ctxPath("/sys/bbsCn/saveBbsCn.file"), |
|
399 | 399 |
method: "post", |
400 | 400 |
headers: { |
401 | 401 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
... | ... | @@ -455,7 +455,7 @@ |
455 | 455 |
} |
456 | 456 |
// axios 호출 |
457 | 457 |
defaultAxios({ |
458 |
- url: "/sys/bbsCn/updateBbsCn.file", |
|
458 |
+ url: this.$filters.ctxPath("/sys/bbsCn/updateBbsCn.file"), |
|
459 | 459 |
method: "post", |
460 | 460 |
headers: { |
461 | 461 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/boardManagement/template/galleryTemplate/GalleryInsert.vue
+++ client/views/pages/adm/boardManagement/template/galleryTemplate/GalleryInsert.vue
... | ... | @@ -482,7 +482,7 @@ |
482 | 482 |
} |
483 | 483 |
// axios 호출 |
484 | 484 |
await defaultAxios({ |
485 |
- url: "/sys/bbsCn/saveBbsCn.file", |
|
485 |
+ url: this.$filters.ctxPath("/sys/bbsCn/saveBbsCn.file"), |
|
486 | 486 |
method: "post", |
487 | 487 |
headers: { |
488 | 488 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
... | ... | @@ -544,7 +544,7 @@ |
544 | 544 |
} |
545 | 545 |
// axios 호출 |
546 | 546 |
defaultAxios({ |
547 |
- url: "/sys/bbsCn/updateBbsCn.file", |
|
547 |
+ url: this.$filters.ctxPath("/sys/bbsCn/updateBbsCn.file"), |
|
548 | 548 |
method: "post", |
549 | 549 |
headers: { |
550 | 550 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/boardManagement/template/galleryTemplate/GallerySelectListOne.vue
+++ client/views/pages/adm/boardManagement/template/galleryTemplate/GallerySelectListOne.vue
... | ... | @@ -344,7 +344,7 @@ |
344 | 344 |
} |
345 | 345 |
try { |
346 | 346 |
const response = await defaultAxios({ |
347 |
- url: "/sys/file/fileDownload.json", // URL 경로 확인 |
|
347 |
+ url: this.$filters.ctxPath("/sys/file/fileDownload.json"), // URL 경로 확인 |
|
348 | 348 |
method: "post", |
349 | 349 |
headers: { |
350 | 350 |
"Content-Type": "application/json; charset=UTF-8", |
--- client/views/pages/adm/boardManagement/template/videoTemplate/VideoInsert.vue
+++ client/views/pages/adm/boardManagement/template/videoTemplate/VideoInsert.vue
... | ... | @@ -514,7 +514,7 @@ |
514 | 514 |
} |
515 | 515 |
// axios 호출 |
516 | 516 |
await defaultAxios({ |
517 |
- url: "/sys/bbsCn/saveBbsCn.file", |
|
517 |
+ url: this.$filters.ctxPath("/sys/bbsCn/saveBbsCn.file"), |
|
518 | 518 |
method: "post", |
519 | 519 |
headers: { |
520 | 520 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
... | ... | @@ -576,7 +576,7 @@ |
576 | 576 |
} |
577 | 577 |
// axios 호출 |
578 | 578 |
defaultAxios({ |
579 |
- url: "/sys/bbsCn/updateBbsCn.file", |
|
579 |
+ url: this.$filters.ctxPath("/sys/bbsCn/updateBbsCn.file"), |
|
580 | 580 |
method: "post", |
581 | 581 |
headers: { |
582 | 582 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/boardManagement/template/videoTemplate/VideoSelectListOne.vue
+++ client/views/pages/adm/boardManagement/template/videoTemplate/VideoSelectListOne.vue
... | ... | @@ -317,7 +317,7 @@ |
317 | 317 |
} |
318 | 318 |
try { |
319 | 319 |
const response = await defaultAxios({ |
320 |
- url: "/sys/file/fileDownload.json", // URL 경로 확인 |
|
320 |
+ url: this.$filters.ctxPath("/sys/file/fileDownload.json"), // URL 경로 확인 |
|
321 | 321 |
method: "post", |
322 | 322 |
headers: { |
323 | 323 |
"Content-Type": "application/json; charset=UTF-8", |
--- client/views/pages/adm/main/Main.vue
+++ client/views/pages/adm/main/Main.vue
... | ... | @@ -234,11 +234,11 @@ |
234 | 234 |
} |
235 | 235 |
if (this.bbsCnList[idx].type == "faq") { |
236 | 236 |
this.$router.push({ |
237 |
- path: "/adm/" + this.bbsCnList[idx]["mng_id"] + "/list.page", |
|
237 |
+ path: this.$filters.ctxPath("/adm/") + this.bbsCnList[idx]["mng_id"] + "/list.page", |
|
238 | 238 |
}); |
239 | 239 |
} else { |
240 | 240 |
this.$router.push({ |
241 |
- path: "/adm/" + this.bbsCnList[idx]["mng_id"] + "/view.page", |
|
241 |
+ path: this.$filters.ctxPath("/adm/") + this.bbsCnList[idx]["mng_id"] + "/view.page", |
|
242 | 242 |
query: { |
243 | 243 |
pageId: this.bbsCnList[idx]["id"], |
244 | 244 |
}, |
--- client/views/pages/adm/member/termsManagement/TermsManagementSelectList.vue
+++ client/views/pages/adm/member/termsManagement/TermsManagementSelectList.vue
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 |
methods: { |
86 | 86 |
passwordReset: function () {}, |
87 | 87 |
insertPage: function () { |
88 |
- this.$router.push({ path: "/adm/termsManagementInsert.page", query: {} }); |
|
88 |
+ this.$router.push({ path: this.$filters.ctxPath("/adm/termsManagementInsert.page"), query: {} }); |
|
89 | 89 |
}, |
90 | 90 |
}, |
91 | 91 |
watch: {}, |
--- client/views/pages/adm/popup/PopupManagementInsert.vue
+++ client/views/pages/adm/popup/PopupManagementInsert.vue
... | ... | @@ -300,9 +300,9 @@ |
300 | 300 |
// URL 삽입 |
301 | 301 |
let url = null; |
302 | 302 |
if (this.popup["popupId"] != null) { |
303 |
- url = "/admin/popup/updateProc.file"; |
|
303 |
+ url = this.$filters.ctxPath("/admin/popup/updateProc.file"); |
|
304 | 304 |
} else { |
305 |
- url = "/admin/popup/insertProc.file"; |
|
305 |
+ url = this.$filters.ctxPath("/admin/popup/insertProc.file"); |
|
306 | 306 |
} |
307 | 307 |
|
308 | 308 |
this.axiosUpsert(url, formData); |
--- client/views/pages/adm/statistics/BbsStatistics.vue
+++ client/views/pages/adm/statistics/BbsStatistics.vue
... | ... | @@ -206,7 +206,7 @@ |
206 | 206 |
formData.append("chart", chartToBlob); |
207 | 207 |
// 실행 |
208 | 208 |
defaultAxios({ |
209 |
- url: "/sys/cntnStats/excelDownload.file", |
|
209 |
+ url: this.$filters.ctxPath("/sys/cntnStats/excelDownload.file"), |
|
210 | 210 |
method: "post", |
211 | 211 |
headers: { |
212 | 212 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/statistics/MenuStatistics.vue
+++ client/views/pages/adm/statistics/MenuStatistics.vue
... | ... | @@ -205,7 +205,7 @@ |
205 | 205 |
formData.append("chart", chartToBlob); |
206 | 206 |
// 실행 |
207 | 207 |
defaultAxios({ |
208 |
- url: "/sys/cntnStats/excelDownload.file", |
|
208 |
+ url: this.$filters.ctxPath("/sys/cntnStats/excelDownload.file"), |
|
209 | 209 |
method: "post", |
210 | 210 |
headers: { |
211 | 211 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/statistics/UserStatistics.vue
+++ client/views/pages/adm/statistics/UserStatistics.vue
... | ... | @@ -194,7 +194,7 @@ |
194 | 194 |
formData.append("chart", chartToBlob); |
195 | 195 |
// 실행 |
196 | 196 |
defaultAxios({ |
197 |
- url: "/sys/cntnStats/excelDownload.file", |
|
197 |
+ url: this.$filters.ctxPath("/sys/cntnStats/excelDownload.file"), |
|
198 | 198 |
method: "post", |
199 | 199 |
headers: { |
200 | 200 |
"Content-Type": "multipart/form-data; charset=UTF-8", |
--- client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
+++ client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 |
// await saveByLoginMode(loginMode); |
143 | 143 |
alert('로그인 방식이 변경되었습니다.\n다시 로그인해주세요.'); |
144 | 144 |
store.commit("setStoreReset"); |
145 |
- window.location = '/login.page'; |
|
145 |
+ window.location = this.$filters.ctxPath('/login.page'); |
|
146 | 146 |
} catch (err) { |
147 | 147 |
alert('로그인 방식 저장 실패: ' + (err.response?.data?.message || err.message)); |
148 | 148 |
this.lgnMode = this.previousLgnMode; |
... | ... | @@ -174,19 +174,16 @@ |
174 | 174 |
const res = await saveCntxtPth(ctx); |
175 | 175 |
alert(res.data.message); |
176 | 176 |
if (res.status == 200) { |
177 |
- console.log("origin store contextPath : ", store.state.contextPath); |
|
178 | 177 |
let storeCtx = this.cntxtPth; |
179 | 178 |
if(storeCtx == '/') { |
180 | 179 |
storeCtx = ''; |
181 | 180 |
} |
182 | 181 |
store.commit("setContextPath", storeCtx); // 캐시 초기화 요청을 보내기 위한 Context Path 정보 저장 |
183 |
- const cacheRes = await cacheReSet(); // 캐시 초기화 |
|
184 |
- alert(cacheRes.data.message); |
|
185 |
- store.commit("setStoreReset"); // 캐시 초기화 후 Store 초기화 |
|
186 |
- // console.log("before reload store contextPath : ", store.state.contextPath); |
|
182 |
+ // const cacheRes = await cacheReSet(); // 캐시 초기화 |
|
183 |
+ // alert(cacheRes.data.message); |
|
184 |
+ // store.commit("setStoreReset"); // 캐시 초기화 후 Store 초기화 |
|
187 | 185 |
// window.location.reload(); // AppRouter 재실행을 위한 페이지 새로고침 |
188 |
- // console.log("after reload store contextPath : ", store.state.contextPath); |
|
189 |
- window.location.href = `${storeCtx}/login.page`; |
|
186 |
+ window.location.href = `${storeCtx}/adm/main.page`; |
|
190 | 187 |
} else { |
191 | 188 |
alert(res.data.message); |
192 | 189 |
} |
--- client/views/pages/login/Login.vue
+++ client/views/pages/login/Login.vue
... | ... | @@ -133,13 +133,13 @@ |
133 | 133 |
} |
134 | 134 |
const url = this.restoreRedirect("redirect"); |
135 | 135 |
if (url != null && url != "") { |
136 |
- if (url == "/searchId.page" || url == "/resetPswd.page") { |
|
137 |
- this.$router.push({ path: "/main.page" }); |
|
136 |
+ if (url == this.$filters.ctxPath("/searchId.page") || url == this.$filters.ctxPath("/resetPswd.page")) { |
|
137 |
+ this.$router.push({ path: this.$filters.ctxPath("/main.page") }); |
|
138 | 138 |
} else { |
139 | 139 |
this.$router.push({ path: url }); |
140 | 140 |
} |
141 | 141 |
} else { |
142 |
- this.$router.push({ path: "/" }); |
|
142 |
+ this.$router.push({ path: this.$filters.ctxPath("/") }); |
|
143 | 143 |
} |
144 | 144 |
|
145 | 145 |
|
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 |
}, |
151 | 151 |
moveSearchId() { |
152 | 152 |
this.$router.push({ |
153 |
- path: "/resetPswd.page", |
|
153 |
+ path: this.$filters.ctxPath("/resetPswd.page"), |
|
154 | 154 |
query: { |
155 | 155 |
tab: "id", |
156 | 156 |
}, |
... | ... | @@ -158,7 +158,7 @@ |
158 | 158 |
}, |
159 | 159 |
moveResetPswd() { |
160 | 160 |
this.$router.push({ |
161 |
- path: "/resetPswd.page", |
|
161 |
+ path: this.$filters.ctxPath("/resetPswd.page"), |
|
162 | 162 |
query: { |
163 | 163 |
tab: "pw", |
164 | 164 |
}, |
--- client/views/pages/login/ResetPswd.vue
+++ client/views/pages/login/ResetPswd.vue
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 |
); |
170 | 170 |
if (isCheck) { |
171 | 171 |
this.$router.push({ |
172 |
- path: "/login.page", |
|
172 |
+ path: this.$filters.ctxPath("/login.page"), |
|
173 | 173 |
}); |
174 | 174 |
} |
175 | 175 |
} catch (error) { |
... | ... | @@ -200,7 +200,7 @@ |
200 | 200 |
); |
201 | 201 |
if (isCheck) { |
202 | 202 |
this.$router.push({ |
203 |
- path: "/login.page", |
|
203 |
+ path: this.$filters.ctxPath("/login.page"), |
|
204 | 204 |
}); |
205 | 205 |
} |
206 | 206 |
} |
--- client/views/pages/login/SearchId.vue
+++ client/views/pages/login/SearchId.vue
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 |
); |
72 | 72 |
if (isCheck) { |
73 | 73 |
this.$router.push({ |
74 |
- path: "/login.page", |
|
74 |
+ path: this.$filters.ctxPath("/login.page"), |
|
75 | 75 |
}); |
76 | 76 |
} |
77 | 77 |
} catch (error) { |
--- client/views/pages/user/etc/NotFound.vue
+++ client/views/pages/user/etc/NotFound.vue
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 |
methods: { |
39 | 39 |
fnMainMove() { |
40 | 40 |
this.$router.push({ |
41 |
- path: "/", |
|
41 |
+ path: this.$filters.ctxPath("/"), |
|
42 | 42 |
}); |
43 | 43 |
}, |
44 | 44 |
fnGoBack() { |
--- client/views/pages/user/portal/search/Search.vue
+++ client/views/pages/user/portal/search/Search.vue
... | ... | @@ -328,7 +328,7 @@ |
328 | 328 |
fnView(item, subItem) { |
329 | 329 |
let menuPath = null; |
330 | 330 |
if(item.routerUrl.includes('.page')) { |
331 |
- const lastSlashIndex = item.routerUrl.lastIndexOf('/'); // 마지막 '/' 인덱스 |
|
331 |
+ const lastSlashIndex = item.routerUrl.lastIndexOf(this.$filters.ctxPath('/')); // 마지막 '/' 인덱스 |
|
332 | 332 |
menuPath = item.routerUrl.substring(0, lastSlashIndex) ; // 마지막 '/' 이전 경로 |
333 | 333 |
} |
334 | 334 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?