
250409 하석형 AppStore 로그아웃 전 Context Path 저장 및 로그아웃 시 Context Path 로그인 페이지로 이동
@832f76e848992a147da2434c0e8d9f04d83a1f37
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
... | ... | @@ -68,6 +68,7 @@ |
68 | 68 |
actions: { |
69 | 69 |
async logout({ commit }) { |
70 | 70 |
try { |
71 |
+ const ctx = this.state.contextPath; // 캐시 초기화 전 contextPath 저장 |
|
71 | 72 |
const res = await logOutProc(); |
72 | 73 |
alert(res.data.message); |
73 | 74 |
if (res.status == 200) { |
... | ... | @@ -81,7 +82,7 @@ |
81 | 82 |
document.cookie = "refresh=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; |
82 | 83 |
document.cookie = "Authorization=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; |
83 | 84 |
// 4. 로그인 페이지로 이동 |
84 |
- window.location = state.contextPath + "/login.page"; |
|
85 |
+ window.location = ctx + "/login.page"; |
|
85 | 86 |
} |
86 | 87 |
} catch(error) { |
87 | 88 |
const errorData = error.response.data; |
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?