feat: oauth登录(页面 不包含逻辑)
This commit is contained in:
@@ -3,6 +3,7 @@ import { onMounted, ref } from 'vue';
|
||||
|
||||
import { AuthenticationLogin } from '@vben/common-ui';
|
||||
|
||||
import { message } from 'ant-design-vue';
|
||||
import { omit } from 'lodash-es';
|
||||
|
||||
import { tenantList, type TenantResp } from '#/api';
|
||||
@@ -73,6 +74,18 @@ async function handleAccountLogin(values: LoginForm) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleOauthLogin(provider: string) {
|
||||
switch (provider) {
|
||||
case 'gitee': {
|
||||
message.success('todo gitee login');
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
message.warn('暂不支持该登录方式');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -80,12 +93,14 @@ async function handleAccountLogin(values: LoginForm) {
|
||||
ref="loginRef"
|
||||
:captcha-base64="captchaInfo.img"
|
||||
:loading="authStore.loginLoading"
|
||||
:show-register="false"
|
||||
:tenant-options="tenantInfo.voList"
|
||||
:use-captcha="captchaInfo.captchaEnabled"
|
||||
:use-tenant="tenantInfo.tenantEnabled"
|
||||
password-placeholder="密码"
|
||||
username-placeholder="用户名"
|
||||
@captcha-click="loadCaptcha"
|
||||
@oauth-login="handleOauthLogin"
|
||||
@submit="handleAccountLogin"
|
||||
/>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user