하석형 하석형 05-27
250527 하석형 사용자 메인 로그인/로그아웃 표시, 사용자 로그아웃 시 메인페이지로 이동
@a52afa4b2efd838fda6d7f18b334fb016e5f9e7e
client/views/layout/UserHeader.vue
--- client/views/layout/UserHeader.vue
+++ client/views/layout/UserHeader.vue
@@ -3,36 +3,28 @@
     <div class="header-wrap">
       <div class="flex justify-between align-center header">
         <div class="logo">
-          <router-link
-            :to="{ path: this.$filters.ctxPath('/') }"
-          >
-            <img
-              src="../../resources/img/logo-color.png"
-              alt="홈"
-            />
+          <router-link :to="{ path: this.$filters.ctxPath('/') }">
+            <img src="../../resources/img/logo-color.png" alt="홈" />
           </router-link>
-          
+
         </div>
         <div v-show="pageRole === 'potal'" class="mobile-menu mr10">
-            <!-- <p class="white detail-text">문의전화</p> -->
-            <p>☎ 054)639-6161~3</p>
+          <!-- <p class="white detail-text">문의전화</p> -->
+          <p>☎ 054)639-6161~3</p>
+        </div>
+        <div class="user-info mobile-menu">
+          <div class="flex align-center">
+            <button class="user-name cursor" @click="fnLink">
+              {{ mbrNm }}님
+            </button>
+            <button v-if="mbrId" class="logout-btn" @click="fnlogOut">로그아웃</button>
+            <button v-else class="logout-btn" @click="fnlogin">로그인</button>
           </div>
-          <div
-            class="user-info mobile-menu"
-          >
-            <div class="flex align-center">
-              <button class="user-name cursor" @click="fnLink">
-                {{ mbrNm }}님
-              </button>
-              <button class="logout-btn" @click="fnlogOut">로그아웃</button>
-            </div>
-          </div>
-          <UserMenu />
-        <div class="flex justify-end align-center user-info-wrap">
+        </div>
+        <UserMenu />
+        <!-- <div class="flex justify-end align-center user-info-wrap">
 
-          <div
-            class="user-info pc-menu"
-          >
+          <div class="user-info pc-menu">
             <div class="flex align-center">
               <button class="user-name cursor" @click="fnLink">
                 {{ mbrNm }}님
@@ -42,12 +34,10 @@
           </div>
         </div>
         <div v-show="pageRole === 'potal'" class="pc-menu">
-          <!-- <p class="white detail-text">문의전화</p> -->
-          <p
-          >
+          <p>
             ☎ 054)639-6161~3
           </p>
-        </div>
+        </div> -->
       </div>
     </div>
   </header>
@@ -69,13 +59,20 @@
       pageRole: this.$store.state.userType,
     };
   },
+  created() {
+  },
   methods: {
     ...mapActions(["logout"]),
+    // 로그아웃
     async fnlogOut() {
       await this.logout();
+    },
+
+    // 로그인
+    fnlogin() {
       this.$router.push({
-        path: this.$filters.ctxPath("/"),
-      });
+        path: this.$filters.ctxPath("/login.page"),
+      })
     },
 
     // 사용자 정보 보기로 이동
client/views/pages/AppStore.js
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
@@ -131,7 +131,8 @@
         if(admPath) {
           window.location = ctx + "/cmslogin.page";
         } else {
-          window.location = ctx + "/login.page";
+          // window.location = ctx + "/login.page";
+          window.location = ctx + "/";
         }
         
       } catch(error) {
Add a comment
List