File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ const loginByToken = async () => {
41
41
if (user .data && user .data .profile ) {
42
42
const successMsg = t (' login.message.tokenLoginSuccess' );
43
43
message .success (successMsg );
44
- emit (' loginSuccess' , user .data .profile , ' token ' );
44
+ emit (' loginSuccess' , user .data .profile , ' cookie ' );
45
45
} else {
46
46
// token无效,清除localStorage
47
47
localStorage .removeItem (' token' );
Original file line number Diff line number Diff line change 68
68
69
69
<!-- Cookie登录组件 -->
70
70
<div
71
- v-else-if =" activeMode === LoginMode.TOKEN && !isTransitioning"
71
+ v-else-if =" activeMode === LoginMode.COOKIE && !isTransitioning"
72
72
key =" token"
73
73
class =" phone"
74
74
>
@@ -102,7 +102,7 @@ enum LoginMode {
102
102
QR = ' qr' ,
103
103
PHONE = ' phone' ,
104
104
UID = ' uid' ,
105
- TOKEN = ' token '
105
+ COOKIE = ' cookie '
106
106
}
107
107
108
108
const { t } = useI18n ();
@@ -111,13 +111,13 @@ const router = useRouter();
111
111
const userStore = useUserStore ();
112
112
113
113
// 当前激活的登录模式
114
- const activeMode = ref <LoginMode >(LoginMode .TOKEN );
114
+ const activeMode = ref <LoginMode >(LoginMode .COOKIE );
115
115
// 用于控制内容切换动画
116
116
const isTransitioning = ref (false );
117
117
118
118
// 登录选项配置
119
119
const loginTabs = computed (() => [
120
- { key: LoginMode .TOKEN , label: t (' login.title.cookie' ) },
120
+ { key: LoginMode .COOKIE , label: t (' login.title.cookie' ) },
121
121
{ key: LoginMode .UID , label: t (' login.title.uid' ) },
122
122
{ key: LoginMode .QR , label: t (' login.title.qr' ) }
123
123
]);
You can’t perform that action at this time.
0 commit comments