
--- client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
+++ client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
... | ... | @@ -174,10 +174,19 @@ |
174 | 174 |
const res = await saveCntxtPth(ctx); |
175 | 175 |
alert(res.data.message); |
176 | 176 |
if (res.status == 200) { |
177 |
- store.commit("setStoreReset"); |
|
177 |
+ console.log("origin store contextPath : ", store.state.contextPath); |
|
178 |
+ let storeCtx = this.cntxtPth; |
|
179 |
+ if(storeCtx == '/') { |
|
180 |
+ storeCtx = ''; |
|
181 |
+ } |
|
182 |
+ store.commit("setContextPath", storeCtx); // 캐시 초기화 요청을 보내기 위한 Context Path 정보 저장 |
|
178 | 183 |
const cacheRes = await cacheReSet(); // 캐시 초기화 |
179 | 184 |
alert(cacheRes.data.message); |
180 |
- window.location = `${store.state.contextPath}/login.page`; |
|
185 |
+ store.commit("setStoreReset"); // 캐시 초기화 후 Store 초기화 |
|
186 |
+ // console.log("before reload store contextPath : ", store.state.contextPath); |
|
187 |
+ // window.location.reload(); // AppRouter 재실행을 위한 페이지 새로고침 |
|
188 |
+ // console.log("after reload store contextPath : ", store.state.contextPath); |
|
189 |
+ window.location.href = `${storeCtx}/login.page`; |
|
181 | 190 |
} else { |
182 | 191 |
alert(res.data.message); |
183 | 192 |
} |
... | ... | @@ -195,6 +204,16 @@ |
195 | 204 |
this.$refs.cntxtPth.focus(); |
196 | 205 |
return false; |
197 | 206 |
} |
207 |
+ if(this.cntxtPth.length > 50) { |
|
208 |
+ alert("Context Path는 50자 이내로 입력해주세요."); |
|
209 |
+ this.$refs.cntxtPth.focus(); |
|
210 |
+ return false; |
|
211 |
+ } |
|
212 |
+ if(this.cntxtPth == this.defaultCntxtPth) { |
|
213 |
+ alert("변경된 내용이 없습니다."); |
|
214 |
+ this.$refs.cntxtPth.focus(); |
|
215 |
+ return false; |
|
216 |
+ } |
|
198 | 217 |
if(!regex.test(this.cntxtPth)) { |
199 | 218 |
alert("Context Path는 '/'로 시작해야 하며, 알파벳, 숫자, '-' 또는 '_'만 포함할 수 있습니다."); |
200 | 219 |
this.$refs.cntxtPth.focus(); |
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?