feat: 新版本分支准备
Former-commit-id: 88e7b636d7d5ef642ea03f7fb4a95cf7a261a5f5
This commit is contained in:
@@ -1,99 +0,0 @@
|
|||||||
<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" />
|
|
||||||
</span>
|
|
||||||
WeChat
|
|
||||||
</div>
|
|
||||||
<div class="sign-btn" @click="tencentHandleClick('tencent')">
|
|
||||||
<span class="qq-svg-container">
|
|
||||||
<svg-icon icon-class="qq" class="icon" />
|
|
||||||
</span>
|
|
||||||
QQ
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<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://127.0.0.1:9999/oauth2/authorization/gateway-client-authorization-code?redirect_uri=http://127.0.0.1:3000';
|
|
||||||
// window.open(url, thirdpart);
|
|
||||||
window.location.href = url;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 微信授权
|
|
||||||
*/
|
|
||||||
function wechatHandleClick(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 = 'https://open.weixin.qq.com/connect/qrconnect?appid=' + appid + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_login#wechat_redirect'
|
|
||||||
// openWindow(url, thirdpart, 540, 540)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* QQ授权
|
|
||||||
*/
|
|
||||||
function tencentHandleClick(thirdpart: string) {
|
|
||||||
alert('ok');
|
|
||||||
// this.$store.commit('SET_AUTH_TYPE', thirdpart)
|
|
||||||
// const client_id = 'xxxxx'
|
|
||||||
// const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
|
|
||||||
// const url = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=' + client_id + '&redirect_uri=' + redirect_uri
|
|
||||||
// openWindow(url, thirdpart, 540, 540)
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.social-signup-container {
|
|
||||||
margin: 20px 0;
|
|
||||||
|
|
||||||
.sign-btn {
|
|
||||||
display: inline-block;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 24px;
|
|
||||||
margin-top: 8px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wx-svg-container,
|
|
||||||
.qq-svg-container {
|
|
||||||
display: inline-block;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 1px;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-svg-container {
|
|
||||||
margin-left: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -97,14 +97,6 @@
|
|||||||
>
|
>
|
||||||
<span> {{ $t('login.password') }}: 123456</span>
|
<span> {{ $t('login.password') }}: 123456</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button
|
|
||||||
class="thirdparty-button"
|
|
||||||
type="primary"
|
|
||||||
@click="showDialog = true"
|
|
||||||
>
|
|
||||||
{{ $t('login.thirdPartyLogin') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -112,15 +104,6 @@
|
|||||||
<p>{{ $t('login.copyright') }}</p>
|
<p>{{ $t('login.copyright') }}</p>
|
||||||
<p>{{ $t('login.icp') }}</p>
|
<p>{{ $t('login.icp') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog :title="$t('login.thirdPartyLogin')" v-model="showDialog">
|
|
||||||
Can not be simulated on local, so please combine you own business
|
|
||||||
simulation! ! !
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<SocialSignin />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -132,7 +115,6 @@ import { ElForm, ElInput } from 'element-plus';
|
|||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import LangSelect from '@/components/LangSelect/index.vue';
|
import LangSelect from '@/components/LangSelect/index.vue';
|
||||||
import SvgIcon from '@/components/SvgIcon/index.vue';
|
import SvgIcon from '@/components/SvgIcon/index.vue';
|
||||||
import SocialSignin from './components/SocialSignin.vue';
|
|
||||||
|
|
||||||
// 状态管理依赖
|
// 状态管理依赖
|
||||||
import useStore from '@/store';
|
import useStore from '@/store';
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|||||||
open: true, // 运行自动打开浏览器
|
open: true, // 运行自动打开浏览器
|
||||||
proxy: {
|
proxy: {
|
||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
target: 'http://127.0.0.1:9999',
|
target: 'http://localhost:9999',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path =>
|
rewrite: path =>
|
||||||
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
||||||
|
|||||||
Reference in New Issue
Block a user