feat: 整合有来第三方认证(阶段性提交)

This commit is contained in:
horizons 2022-09-08 08:00:06 +08:00
parent a859504800
commit 1b52c867f2
2 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,11 @@
<template>
<div class="social-signup-container">
<div class="sign-btn" @click="youlaiHandleClick('youlai')">
<span class="wx-svg-container">
<svg-icon icon-class="wechat" class="icon" size="1.5em" />
</span>
有来认证
</div>
<div class="sign-btn" @click="wechatHandleClick('wechat')">
<span class="wx-svg-container">
<svg-icon icon-class="wechat" class="icon" size="1.5em" />
@ -18,6 +24,19 @@
<script setup lang="ts">
import SvgIcon from '@/components/SvgIcon/index.vue';
/**
* 有来授权
*/
function youlaiHandleClick(thirdpart: string) {
alert('ok');
// this.$store.commit('SET_AUTH_TYPE', thirdpart)
// const appid = 'xxxxx'
// const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
const url =
'http://localhost:9999/oauth2/authorization/gateway-client-authorization-code?redirect_uri=http://localhost:3000/dashboard';
window.open(url, thirdpart);
}
/**
* 微信授权
*/

View File

@ -227,7 +227,9 @@ function handleLogin() {
});
}
//
/**
* 获取验证码
*/
function handleCaptchaGenerate() {
getCaptcha().then(({ data }) => {
const { img, uuid } = data;