feat: 整合有来第三方认证(阶段性提交)
Former-commit-id: 1b52c867f26a3344928f1805a329cb37ab71c647
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="social-signup-container">
|
<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')">
|
<div class="sign-btn" @click="wechatHandleClick('wechat')">
|
||||||
<span class="wx-svg-container">
|
<span class="wx-svg-container">
|
||||||
<svg-icon icon-class="wechat" class="icon" size="1.5em" />
|
<svg-icon icon-class="wechat" class="icon" size="1.5em" />
|
||||||
@@ -18,6 +24,19 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import SvgIcon from '@/components/SvgIcon/index.vue';
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信授权
|
* 微信授权
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -227,7 +227,9 @@ function handleLogin() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取验证码
|
/**
|
||||||
|
* 获取验证码
|
||||||
|
*/
|
||||||
function handleCaptchaGenerate() {
|
function handleCaptchaGenerate() {
|
||||||
getCaptcha().then(({ data }) => {
|
getCaptcha().then(({ data }) => {
|
||||||
const { img, uuid } = data;
|
const { img, uuid } = data;
|
||||||
|
|||||||
Reference in New Issue
Block a user