From 467dd38d5f16029c01b58776011d79545b5896d3 Mon Sep 17 00:00:00 2001
From: HenryDu8133 <813367384@qq.com>
Date: Sat, 12 Sep 2026 21:06:26 +0800
Subject: [PATCH] =?UTF-8?q?feat(auth):=20=E6=96=B0=E5=A2=9E=E5=BE=AE?=
=?UTF-8?q?=E4=BF=A1=E8=81=9A=E5=90=88=E7=99=BB=E5=BD=95=E5=85=A5=E5=8F=A3?=
=?UTF-8?q?=E4=B8=8E=E8=B4=A6=E5=8F=B7=E7=BB=91=E5=AE=9A=E5=8D=A1\n\n-=20O?=
=?UTF-8?q?AuthButtons.vue:=20aggregate=20=E5=90=AF=E7=94=A8=E6=97=B6?=
=?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=BE=AE=E4=BF=A1=E7=99=BB=E5=BD=95=E6=8C=89?=
=?UTF-8?q?=E9=92=AE=EF=BC=8C=E5=BE=AE=E4=BF=A1=E7=BB=BF=20hover=20+=20?=
=?UTF-8?q?=E4=B8=93=E5=B1=9E=20SVG=20=E5=9B=BE=E6=A0=87\n-=20OAuthBinding?=
=?UTF-8?q?Card.vue:=20=E6=96=B0=E5=A2=9E=E5=BE=AE=E4=BF=A1=20aggregate=20?=
=?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=8D=A1=EF=BC=8C=E6=94=AF=E6=8C=81=E7=BB=91?=
=?UTF-8?q?=E5=AE=9A=E8=B7=B3=E8=BD=AC=20/api/auth/aggregate=20=E5=92=8C?=
=?UTF-8?q?=E8=A7=A3=E7=BB=91\n-=20account/index.vue:=20hasOAuthProviders?=
=?UTF-8?q?=20=E5=88=A4=E5=AE=9A=E5=8A=A0=E5=85=A5=20aggregate\n-=20oauth.?=
=?UTF-8?q?ts:=20getProviderDisplayName=20=E4=B8=AD=20aggregate=20?=
=?UTF-8?q?=E6=98=A0=E5=B0=84=E4=B8=BA=20=E5=BE=AE=E4=BF=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/components/Auth/OAuthBindingCard.vue | 40 ++++++++++++++++++++++++
app/components/Auth/OAuthButtons.vue | 12 +++----
app/pages/account/index.vue | 2 +-
app/utils/oauth.ts | 3 +-
4 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/app/components/Auth/OAuthBindingCard.vue b/app/components/Auth/OAuthBindingCard.vue
index 3329656..03f07f3 100644
--- a/app/components/Auth/OAuthBindingCard.vue
+++ b/app/components/Auth/OAuthBindingCard.vue
@@ -117,6 +117,45 @@
+
+
+
+
+
+ {{
+ getProviderDisplayName('aggregate')
+ }}
+ {{
+ aggregateIdentity.providerUsername
+ }}
+ 未绑定
+
+
+
+
+
+
+
identities.value.find((i) => i.provider === 'github'))
const casdoorIdentity = computed(() => identities.value.find((i) => i.provider === 'casdoor'))
const googleIdentity = computed(() => identities.value.find((i) => i.provider === 'google'))
+const aggregateIdentity = computed(() => identities.value.find((i) => i.provider === 'aggregate'))
const webauthnIdentities = computed(() => identities.value.filter((i) => i.provider === 'webauthn'))
const fetchIdentities = async () => {
diff --git a/app/components/Auth/OAuthButtons.vue b/app/components/Auth/OAuthButtons.vue
index d7a169f..b21365f 100644
--- a/app/components/Auth/OAuthButtons.vue
+++ b/app/components/Auth/OAuthButtons.vue
@@ -27,12 +27,12 @@
@@ -152,10 +152,10 @@ const loginWith = (provider: string) => {
border-color: #dadce0;
}
-.oauth-btn-aggregate:hover {
- background: var(--bg-secondary, #12b7f5);
+.oauth-btn-wechat:hover {
+ background: var(--bg-secondary, #07c160);
color: var(--text-primary, #ffffff);
- border-color: var(--border-secondary, #12b7f5);
+ border-color: var(--border-secondary, #07c160);
}
.oauth-empty-hint {
diff --git a/app/pages/account/index.vue b/app/pages/account/index.vue
index 09d80dc..6a2856b 100644
--- a/app/pages/account/index.vue
+++ b/app/pages/account/index.vue
@@ -133,7 +133,7 @@ const { showToast } = useToast()
const config = useRuntimeConfig()
const hasOAuthProviders = computed(() => {
- return config.public.oauth.github || config.public.oauth.casdoor || config.public.oauth.google
+ return config.public.oauth.github || config.public.oauth.casdoor || config.public.oauth.google || config.public.oauth.aggregate
})
const avatarError = ref(false)
diff --git a/app/utils/oauth.ts b/app/utils/oauth.ts
index 50f2bc4..10b676e 100644
--- a/app/utils/oauth.ts
+++ b/app/utils/oauth.ts
@@ -2,7 +2,8 @@ export const getProviderDisplayName = (provider: string): string => {
const map: Record = {
github: 'GitHub',
casdoor: 'Casdoor',
- google: 'Google'
+ google: 'Google',
+ aggregate: '微信'
}
return map[provider.toLowerCase()] || provider.charAt(0).toUpperCase() + provider.slice(1)
}