mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-10-21 18:59:20 +08:00
feat: 新增微信开放平台登录及绑定按钮
This commit is contained in:
1
src/assets/icons/wechat.svg
Normal file
1
src/assets/icons/wechat.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760706428122" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4539" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M347.729118 353.0242c-16.487119 0-29.776737 13.389539-29.776737 29.776737S331.241998 412.677596 347.729118 412.677596s29.776737-13.389539 29.776737-29.776737-13.289617-29.876659-29.776737-29.876659zM577.749415 511.800156c-13.689305 0-24.880562 11.091335-24.880563 24.880562 0 13.689305 11.091335 24.880562 24.880563 24.880562 13.689305 0 24.880562-11.191257 24.880562-24.880562s-11.191257-24.880562-24.880562-24.880562zM500.909446 412.677596c16.487119 0 29.776737-13.389539 29.776737-29.776737s-13.389539-29.776737-29.776737-29.776737c-16.487119 0-29.776737 13.389539-29.776737 29.776737s13.289617 29.776737 29.776737 29.776737zM698.455113 511.600312c-13.689305 0-24.880562 11.091335-24.880562 24.880562 0 13.689305 11.091335 24.880562 24.880562 24.880562 13.689305 0 24.880562-11.091335 24.880562-24.880562-0.099922-13.689305-11.191257-24.880562-24.880562-24.880562z" fill="#00C800" p-id="4540"></path><path d="M511.601093 0.799375C229.12178 0.799375 0.000781 229.820453 0.000781 512.399688s229.021077 511.600312 511.600312 511.600312 511.600312-229.021077 511.600312-511.600312S794.180328 0.799375 511.601093 0.799375z m-90.229508 634.504294c-27.37861 0-49.361436-5.595628-76.839969-10.991413l-76.640125 38.469945 21.882904-65.948477c-54.957065-38.370023-87.73146-87.831382-87.73146-148.084309 0-104.318501 98.722873-186.554254 219.32865-186.554255 107.815769 0 202.34192 65.648712 221.327088 153.979703-6.994536-0.799375-13.989071-1.298985-21.083529-1.298985-104.118657 0-186.454333 77.739266-186.454332 173.564403 0 15.98751 2.498048 31.275566 6.794692 45.964091-6.794692 0.599532-13.689305 0.899297-20.583919 0.899297z m323.547228 76.839969l16.48712 54.757221-60.153006-32.874317c-21.882904 5.495706-43.965652 10.991413-65.848555 10.991413-104.318501 0-186.554254-71.344262-186.554255-159.175644 0-87.631538 82.135831-159.175644 186.554255-159.175644 98.523029 0 186.254489 71.444184 186.254488 159.175644 0.099922 49.461358-32.774395 93.227166-76.740047 126.301327z" fill="#00C800" p-id="4541"></path></svg>
|
After Width: | Height: | Size: 2.3 KiB |
@@ -35,6 +35,9 @@
|
||||
<a class="item" title="使用 GitHub 账号登录" @click="onOauth('github')">
|
||||
<GiSvgIcon name="github" :size="24" />
|
||||
</a>
|
||||
<a class="item" title="使用微信账号登录" @click="onOauth('wechat_open')">
|
||||
<GiSvgIcon name="wechat" :size="24" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,6 +87,9 @@
|
||||
<a v-if="tenantStore.isTenantConfigured" class="item" title="使用 GitHub 账号登录" @click="onOauth('github')">
|
||||
<GiSvgIcon name="github" :size="24" />
|
||||
</a>
|
||||
<a v-if="tenantStore.isTenantConfigured" class="item" title="使用微信账号登录" @click="onOauth('wechat_open')">
|
||||
<GiSvgIcon name="wechat" :size="24" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<a-card title="第三方账号" bordered class="gradient-card">
|
||||
<div v-for="item in modeList" :key="item.title">
|
||||
<div class="item">
|
||||
<div class="icon-wrapper"><GiSvgIcon :name="item.icon" :size="26" /></div>
|
||||
<GiSvgIcon :name="item.icon" :size="38" />
|
||||
<div class="info">
|
||||
<div class="info-top">
|
||||
<span class="label">{{ item.title }}</span>
|
||||
@@ -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'),
|
||||
},
|
||||
]
|
||||
})
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user