diff --git a/src/assets/icons/wechat.svg b/src/assets/icons/wechat.svg new file mode 100644 index 0000000..25fe3d9 --- /dev/null +++ b/src/assets/icons/wechat.svg @@ -0,0 +1 @@ + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 3430645..c98cb6a 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -35,6 +35,9 @@ + + + @@ -84,6 +87,9 @@ + + + diff --git a/src/views/user/profile/Social.vue b/src/views/user/profile/Social.vue index 440109a..e2433ea 100644 --- a/src/views/user/profile/Social.vue +++ b/src/views/user/profile/Social.vue @@ -2,7 +2,7 @@
-
+
{{ item.title }} @@ -73,6 +73,14 @@ const initData = () => { jumpMode: 'link', status: socialList.value.includes('GITHUB'), }, + { + title: '绑定微信', + icon: 'wechat', + subtitle: `${socialList.value.includes('WECHAT_OPEN') ? '' : '绑定后,'}可通过微信进行登录`, + type: 'wechat_open', + jumpMode: 'link', + status: socialList.value.includes('WECHAT_OPEN'), + }, ] }) } diff --git a/src/views/user/type.ts b/src/views/user/type.ts index 4068225..ec9dc73 100644 --- a/src/views/user/type.ts +++ b/src/views/user/type.ts @@ -3,7 +3,7 @@ export interface ModeItem { icon: string subtitle: string value?: string - type: 'phone' | 'email' | 'gitee' | 'github' + type: 'phone' | 'email' | 'wechat_open' | 'gitee' | 'github' jumpMode?: 'link' | 'modal' status: boolean statusString: string