
250527 하석형 사용자 메인 로그인/로그아웃 표시, 사용자 로그아웃 시 메인페이지로 이동
@a52afa4b2efd838fda6d7f18b334fb016e5f9e7e
--- client/views/layout/UserHeader.vue
+++ client/views/layout/UserHeader.vue
... | ... | @@ -3,36 +3,28 @@ |
3 | 3 |
<div class="header-wrap"> |
4 | 4 |
<div class="flex justify-between align-center header"> |
5 | 5 |
<div class="logo"> |
6 |
- <router-link |
|
7 |
- :to="{ path: this.$filters.ctxPath('/') }" |
|
8 |
- > |
|
9 |
- <img |
|
10 |
- src="../../resources/img/logo-color.png" |
|
11 |
- alt="홈" |
|
12 |
- /> |
|
6 |
+ <router-link :to="{ path: this.$filters.ctxPath('/') }"> |
|
7 |
+ <img src="../../resources/img/logo-color.png" alt="홈" /> |
|
13 | 8 |
</router-link> |
14 |
- |
|
9 |
+ |
|
15 | 10 |
</div> |
16 | 11 |
<div v-show="pageRole === 'potal'" class="mobile-menu mr10"> |
17 |
- <!-- <p class="white detail-text">문의전화</p> --> |
|
18 |
- <p>☎ 054)639-6161~3</p> |
|
12 |
+ <!-- <p class="white detail-text">문의전화</p> --> |
|
13 |
+ <p>☎ 054)639-6161~3</p> |
|
14 |
+ </div> |
|
15 |
+ <div class="user-info mobile-menu"> |
|
16 |
+ <div class="flex align-center"> |
|
17 |
+ <button class="user-name cursor" @click="fnLink"> |
|
18 |
+ {{ mbrNm }}님 |
|
19 |
+ </button> |
|
20 |
+ <button v-if="mbrId" class="logout-btn" @click="fnlogOut">로그아웃</button> |
|
21 |
+ <button v-else class="logout-btn" @click="fnlogin">로그인</button> |
|
19 | 22 |
</div> |
20 |
- <div |
|
21 |
- class="user-info mobile-menu" |
|
22 |
- > |
|
23 |
- <div class="flex align-center"> |
|
24 |
- <button class="user-name cursor" @click="fnLink"> |
|
25 |
- {{ mbrNm }}님 |
|
26 |
- </button> |
|
27 |
- <button class="logout-btn" @click="fnlogOut">로그아웃</button> |
|
28 |
- </div> |
|
29 |
- </div> |
|
30 |
- <UserMenu /> |
|
31 |
- <div class="flex justify-end align-center user-info-wrap"> |
|
23 |
+ </div> |
|
24 |
+ <UserMenu /> |
|
25 |
+ <!-- <div class="flex justify-end align-center user-info-wrap"> |
|
32 | 26 |
|
33 |
- <div |
|
34 |
- class="user-info pc-menu" |
|
35 |
- > |
|
27 |
+ <div class="user-info pc-menu"> |
|
36 | 28 |
<div class="flex align-center"> |
37 | 29 |
<button class="user-name cursor" @click="fnLink"> |
38 | 30 |
{{ mbrNm }}님 |
... | ... | @@ -42,12 +34,10 @@ |
42 | 34 |
</div> |
43 | 35 |
</div> |
44 | 36 |
<div v-show="pageRole === 'potal'" class="pc-menu"> |
45 |
- <!-- <p class="white detail-text">문의전화</p> --> |
|
46 |
- <p |
|
47 |
- > |
|
37 |
+ <p> |
|
48 | 38 |
☎ 054)639-6161~3 |
49 | 39 |
</p> |
50 |
- </div> |
|
40 |
+ </div> --> |
|
51 | 41 |
</div> |
52 | 42 |
</div> |
53 | 43 |
</header> |
... | ... | @@ -69,13 +59,20 @@ |
69 | 59 |
pageRole: this.$store.state.userType, |
70 | 60 |
}; |
71 | 61 |
}, |
62 |
+ created() { |
|
63 |
+ }, |
|
72 | 64 |
methods: { |
73 | 65 |
...mapActions(["logout"]), |
66 |
+ // 로그아웃 |
|
74 | 67 |
async fnlogOut() { |
75 | 68 |
await this.logout(); |
69 |
+ }, |
|
70 |
+ |
|
71 |
+ // 로그인 |
|
72 |
+ fnlogin() { |
|
76 | 73 |
this.$router.push({ |
77 |
- path: this.$filters.ctxPath("/"), |
|
78 |
- }); |
|
74 |
+ path: this.$filters.ctxPath("/login.page"), |
|
75 |
+ }) |
|
79 | 76 |
}, |
80 | 77 |
|
81 | 78 |
// 사용자 정보 보기로 이동 |
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
... | ... | @@ -131,7 +131,8 @@ |
131 | 131 |
if(admPath) { |
132 | 132 |
window.location = ctx + "/cmslogin.page"; |
133 | 133 |
} else { |
134 |
- window.location = ctx + "/login.page"; |
|
134 |
+ // window.location = ctx + "/login.page"; |
|
135 |
+ window.location = ctx + "/"; |
|
135 | 136 |
} |
136 | 137 |
|
137 | 138 |
} catch(error) { |
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?