update 优化 !pr370 完成三方登录授权功能
| | |
| | | return request({ |
| | | url: '/auth/social-login/' + source, |
| | | method: 'get', |
| | | headers: { |
| | | isToken: true |
| | | }, |
| | | params: data |
| | | }); |
| | | } |
| | |
| | | export function authBinding(source: string) { |
| | | return request({ |
| | | url: '/auth/binding/' + source, |
| | | method: 'get', |
| | | headers: { |
| | | isToken: true |
| | | } |
| | | method: 'get' |
| | | }); |
| | | } |
| | | |
| | |
| | | export function authUnlock(authId: string) { |
| | | return request({ |
| | | url: '/auth/unlock/' + authId, |
| | | method: 'delete', |
| | | headers: { |
| | | isToken: true |
| | | } |
| | | method: 'delete' |
| | | }); |
| | | } |
| | | //获取授权列表 |
| | | export function getAuthList() { |
| | | return request({ |
| | | url: '/system/social/list', |
| | | method: 'get', |
| | | headers: { |
| | | isToken: true |
| | | } |
| | | method: 'get' |
| | | }); |
| | | } |
| | |
| | | { |
| | | path: '/social-login', |
| | | hidden: true, |
| | | component: () => import('@/layout/components/socialLogin/index.vue') |
| | | component: () => import('@/layout/components/SocialLogin/index.vue') |
| | | }, |
| | | { |
| | | path: '/login', |
| | |
| | | </el-form-item> |
| | | <div style="display: flex;justify-content: flex-end;flex-direction: row;"> |
| | | <el-button circle> |
| | | <svg-icon icon-class="qq" @click="doSocialLogin('QQ')" /> |
| | | <svg-icon icon-class="qq" @click="doSocialLogin('qq')" /> |
| | | </el-button> |
| | | <el-button circle> |
| | | <svg-icon icon-class="wechat" @click="doSocialLogin('Wechat')" /> |
| | | <svg-icon icon-class="wechat" @click="doSocialLogin('wechat')" /> |
| | | </el-button> |
| | | <el-button circle> |
| | | <svg-icon icon-class="gitee" @click="doSocialLogin('gitee')" /> |
| | |
| | | <span class="app-name">Github</span> |
| | | </a> |
| | | |
| | | <a class="third-app" href="#" title="功能开发中..."> |
| | | <a class="third-app" href="#" @click="authUrl('wechar');" title="使用 微信 账号授权登录"> |
| | | <div class="git-other-login-icon"> |
| | | <svg-icon icon-class="wechat" /> |
| | | </div> |
| | | <span class="app-name">WeiXin</span> |
| | | </a> |
| | | |
| | | <a class="third-app" href="#" title="功能开发中..."> |
| | | <a class="third-app" href="#" @click="authUrl('qq');" title="使用 QQ 账号授权登录"> |
| | | <div class="git-other-login-icon"> |
| | | <svg-icon icon-class="qq" /> |
| | | </div> |