feat: oauth登录(页面 不包含逻辑)

This commit is contained in:
dap
2024-08-09 09:00:07 +08:00
parent bc46c65c7f
commit 1589292bbb
4 changed files with 42 additions and 11 deletions

View File

@@ -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>