From 7fe3cc767c327825be9692a14e5a9552f7eef2b9 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Fri, 12 Jun 2026 23:09:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(login):=20=E7=A7=81=E6=9C=89=E5=8C=96?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=97=B6=E9=9A=90=E8=97=8F=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 通过 /api/private/deployment/status 判断部署模式,PRIVATE 模式下不渲染注册链接。 Co-Authored-By: Claude Sonnet 4.6 --- tenant-platform/src/views/auth/LoginView.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tenant-platform/src/views/auth/LoginView.vue b/tenant-platform/src/views/auth/LoginView.vue index 2fa04e5..440b551 100644 --- a/tenant-platform/src/views/auth/LoginView.vue +++ b/tenant-platform/src/views/auth/LoginView.vue @@ -25,7 +25,7 @@ @@ -39,6 +39,7 @@ import { ElMessage } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus' import { authApi } from '@/api/auth' import { useAuthStore } from '@/stores/auth' +import { getDeploymentStatus } from '@/api/system' const router = useRouter() const auth = useAuthStore() @@ -47,6 +48,7 @@ const formRef = ref() const loading = ref(false) const captchaKey = ref('') const captchaImage = ref('') +const isPrivate = ref(false) const form = reactive({ account: '', password: '', captchaCode: '' }) const rules: FormRules = { @@ -81,7 +83,13 @@ async function handleLogin() { } } -onMounted(loadCaptcha) +onMounted(async () => { + loadCaptcha() + try { + const status = await getDeploymentStatus() + isPrivate.value = status.mode === 'PRIVATE' + } catch {} +})