Skip to content

Commit 1597fbf

Browse files
committed
feat: 修改Cookie文字
1 parent 3ba85f3 commit 1597fbf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/renderer/components/login/CookieLogin.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const loginByToken = async () => {
4141
if (user.data && user.data.profile) {
4242
const successMsg = t('login.message.tokenLoginSuccess');
4343
message.success(successMsg);
44-
emit('loginSuccess', user.data.profile, 'token');
44+
emit('loginSuccess', user.data.profile, 'cookie');
4545
} else {
4646
// token无效,清除localStorage
4747
localStorage.removeItem('token');

src/renderer/views/login/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
<!-- Cookie登录组件 -->
7070
<div
71-
v-else-if="activeMode === LoginMode.TOKEN && !isTransitioning"
71+
v-else-if="activeMode === LoginMode.COOKIE && !isTransitioning"
7272
key="token"
7373
class="phone"
7474
>
@@ -102,7 +102,7 @@ enum LoginMode {
102102
QR = 'qr',
103103
PHONE = 'phone',
104104
UID = 'uid',
105-
TOKEN = 'token'
105+
COOKIE = 'cookie'
106106
}
107107
108108
const { t } = useI18n();
@@ -111,13 +111,13 @@ const router = useRouter();
111111
const userStore = useUserStore();
112112
113113
// 当前激活的登录模式
114-
const activeMode = ref<LoginMode>(LoginMode.TOKEN);
114+
const activeMode = ref<LoginMode>(LoginMode.COOKIE);
115115
// 用于控制内容切换动画
116116
const isTransitioning = ref(false);
117117
118118
// 登录选项配置
119119
const loginTabs = computed(() => [
120-
{ key: LoginMode.TOKEN, label: t('login.title.cookie') },
120+
{ key: LoginMode.COOKIE, label: t('login.title.cookie') },
121121
{ key: LoginMode.UID, label: t('login.title.uid') },
122122
{ key: LoginMode.QR, label: t('login.title.qr') }
123123
]);

0 commit comments

Comments
 (0)