From cb6e716ce20f54f302abe538bf86b85fb171c329 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 10 Sep 2024 21:04:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E6=B3=A8=E5=86=8C=E7=9A=84=E9=80=BB=E8=BE=91=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login/components/RegisterForm.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue index 8ede9445..334887da 100644 --- a/src/views/Login/components/RegisterForm.vue +++ b/src/views/Login/components/RegisterForm.vue @@ -105,7 +105,7 @@ import { usePermissionStore } from '@/store/modules/permission' import * as LoginApi from '@/api/login' import { LoginStateEnum, useLoginState } from './useLogin' -defineOptions({ name: 'LoginForm' }) +defineOptions({ name: 'RegisterForm' }) const { t } = useI18n() const iconHouse = useIcon({ icon: 'ep:house' }) @@ -159,7 +159,7 @@ const registerData = reactive({ captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, registerForm: { - tenantName: '', + tenantName: import.meta.env.VITE_APP_DEFAULT_LOGIN_TENANT || '', nickname: '', tenantId: 0, username: '', @@ -169,7 +169,8 @@ const registerData = reactive({ } }) -async function handleRegister(params) { +// 提交注册 +const handleRegister = async (params: any) => { loading.value = true try { if (registerData.tenantEnable) { @@ -181,11 +182,6 @@ async function handleRegister(params) { registerData.registerForm.captchaVerification = params.captchaVerification } - console.log( - 'registerData.registerForm.captchaVerification====', - registerData.registerForm.captchaVerification - ) - const res = await LoginApi.register(registerData.registerForm) if (!res) { return @@ -225,6 +221,7 @@ const getCode = async () => { verify.value.show() } } + // 获取租户 ID const getTenantId = async () => { if (registerData.tenantEnable === 'true') {