
--- client/views/common/filters.js
+++ client/views/common/filters.js
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 |
// Context Path를 제외한 URL 생성 |
13 | 13 |
logicalPath(path) { |
14 | 14 |
const contextPath = store.state.contextPath || ''; |
15 |
- return (contextPath !== '/' && path.startsWith(contextPath)) ? path.slice(contextPath.length) : path; |
|
15 |
+ return (contextPath !== '' && path.startsWith(contextPath)) ? path.slice(contextPath.length) : path; |
|
16 | 16 |
}, |
17 | 17 |
|
18 | 18 |
// 아이디 정규식(5~20자의 영문 소문자, 숫자와 특수기호(_),(-)만 사용) |
--- client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
+++ client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
... | ... | @@ -167,8 +167,8 @@ |
167 | 167 |
if (!this.validation()) { |
168 | 168 |
return; |
169 | 169 |
} |
170 |
- // const isCheck = confirm("Context Path를 변경하면 로그아웃됩니다.\n계속하시겠습니까?"); |
|
171 |
- const isCheck = confirm("Context Path를 변경하시겠습니까?"); |
|
170 |
+ const isCheck = confirm("Context Path를 변경하면 로그아웃됩니다.\n계속하시겠습니까?"); |
|
171 |
+ // const isCheck = confirm("Context Path를 변경하시겠습니까?"); |
|
172 | 172 |
if (isCheck) { |
173 | 173 |
try { |
174 | 174 |
let ctx = { path: this.cntxtPth }; |
... | ... | @@ -180,11 +180,11 @@ |
180 | 180 |
storeCtx = ''; |
181 | 181 |
} |
182 | 182 |
store.commit("setContextPath", storeCtx); // 캐시 초기화 요청을 보내기 위한 Context Path 정보 저장 |
183 |
- // const cacheRes = await cacheReSet(); // 캐시 초기화 |
|
184 |
- // alert(cacheRes.data.message); |
|
185 |
- // store.commit("setStoreReset"); // 캐시 초기화 후 Store 초기화 |
|
186 |
- // window.location.reload(); // AppRouter 재실행을 위한 페이지 새로고침 |
|
187 |
- window.location.href = `${storeCtx}/adm/main.page`; |
|
183 |
+ const cacheRes = await cacheReSet(); // 캐시 초기화 |
|
184 |
+ store.commit("setStoreReset"); // 캐시 초기화 후 Store 초기화 |
|
185 |
+ store.commit("setContextPath", storeCtx); // 라우터 Context Path 정보 저장 |
|
186 |
+ window.location.href = `${storeCtx}/login.page`; |
|
187 |
+ // window.location.href = `${storeCtx}/adm/main.page`; |
|
188 | 188 |
} else { |
189 | 189 |
alert(res.data.message); |
190 | 190 |
} |
--- client/views/pages/login/Login.vue
+++ client/views/pages/login/Login.vue
... | ... | @@ -131,7 +131,17 @@ |
131 | 131 |
alert("알 수 없는 로그인 방식입니다."); |
132 | 132 |
return; |
133 | 133 |
} |
134 |
- const url = this.restoreRedirect("redirect"); |
|
134 |
+ |
|
135 |
+ let url = this.restoreRedirect("redirect"); |
|
136 |
+ const ctx = store.state.contextPath; |
|
137 |
+ if (ctx !== "") { |
|
138 |
+ // redirect 값에서 Context Path 추가 |
|
139 |
+ url = this.$filters.ctxPath(url); |
|
140 |
+ } else { |
|
141 |
+ // redirect 값에서 기존 Context Path 제거 |
|
142 |
+ url = url.replace(/^\/[^\/]+/, ""); // 첫 번째 '/' 이후의 경로만 남김 |
|
143 |
+ } |
|
144 |
+ |
|
135 | 145 |
if (url != null && url != "") { |
136 | 146 |
if (url == this.$filters.ctxPath("/searchId.page") || url == this.$filters.ctxPath("/resetPswd.page")) { |
137 | 147 |
this.$router.push({ path: this.$filters.ctxPath("/main.page") }); |
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?