| | |
| | | |
| | | import { omit } from 'lodash-es'; |
| | | |
| | | import { tenantList, type TenantResp } from '#/api'; |
| | | import { authBinding, tenantList, type TenantResp } from '#/api'; |
| | | import { captchaImage, type CaptchaResponse } from '#/api/core/captcha'; |
| | | import { useAuthStore } from '#/store'; |
| | | |
| | |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | await Promise.all([loadCaptcha(), loadTenant()]); |
| | | // 启动单点登录注释掉下边这一行,否则放开 |
| | | // await Promise.all([loadCaptcha(), loadTenant()]); |
| | | // 启动单点登录放开下边两行注释,否则注释掉 |
| | | const href = await authBinding('keycloak', '000000'); |
| | | window.location.href = href; |
| | | }); |
| | | |
| | | const formSchema = computed((): VbenFormSchema[] => { |
| | |
| | | class: 'focus:border-primary', |
| | | placeholder: $t('authentication.usernameTip'), |
| | | }, |
| | | defaultValue: 'admin', |
| | | defaultValue: 'test', |
| | | fieldName: 'username', |
| | | label: $t('authentication.username'), |
| | | rules: z.string().min(1, { message: $t('authentication.usernameTip') }), |
| | |
| | | class: 'focus:border-primary', |
| | | placeholder: $t('authentication.password'), |
| | | }, |
| | | defaultValue: 'admin123', |
| | | defaultValue: '123456', |
| | | fieldName: 'password', |
| | | label: $t('authentication.password'), |
| | | rules: z.string().min(5, { message: $t('authentication.passwordTip') }), |