류윤주 류윤주 04-09
Merge branch 'master' of http://210.180.118.83/jhpark/cms_frontend
@3139c3e9cda8ef9fc6bb4a63e417d465a0c3fe2e
client/views/layout/AdminHeader.vue
--- client/views/layout/AdminHeader.vue
+++ client/views/layout/AdminHeader.vue
@@ -50,9 +50,9 @@
         // 로그 아웃
         async fnlogOut() {
             await this.logout();
-            this.$router.push({
-                path: this.$filters.ctxPath("/login.page"),
-            });
+            // this.$router.push({
+            //     path: this.$filters.ctxPath("/login.page"),
+            // });
         },
         // 캐시 초기화
         async cacheClean() {
client/views/pages/AppStore.js
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
@@ -68,6 +68,7 @@
   actions: {
     async logout({ commit }) {
       try {
+        const ctx = this.state.contextPath; // 캐시 초기화 전 contextPath 저장
         const res = await logOutProc();
         alert(res.data.message);
         if (res.status == 200) {
@@ -81,7 +82,7 @@
           document.cookie = "refresh=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
           document.cookie = "Authorization=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
           // 4. 로그인 페이지로 이동
-          window.location = state.contextPath + "/login.page";
+          window.location = ctx + "/login.page";
         }
       } catch(error) {
         const errorData = error.response.data;
client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
--- client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
+++ client/views/pages/adm/system/LoginPolicy/LoginPolicy.vue
@@ -180,14 +180,15 @@
               storeCtx = '';
             }
             store.commit("setContextPath", storeCtx); // 캐시 초기화 요청을 보내기 위한 Context Path 정보 저장
-            const cacheRes = await cacheReSet(); // 캐시 초기화
+            await this.$store.dispatch("logout");
+            /* const cacheRes = await cacheReSet(); // 캐시 초기화
             if (cacheRes.status !== 200) {
               alert(cacheRes.data.message);
             }
             store.commit("setStoreReset"); // 캐시 초기화 후 Store 초기화
             store.commit("setContextPath", storeCtx); // 라우터 Context Path 정보 저장
             window.location.href = `${storeCtx}/login.page`;
-            // window.location.href = `${storeCtx}/adm/main.page`;
+            // window.location.href = `${storeCtx}/adm/main.page`; */
           } else {
             alert(res.data.message);
           }
Add a comment
List