From 96d2ebd341ab6f7627fb55d7e649d4b33f848036 Mon Sep 17 00:00:00 2001 From: cuijiawang Date: Thu, 18 Sep 2025 18:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0isPhoneRegisterOn=20=20client?= =?UTF-8?q?Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common/login.ts | 3 +++ src/views/login/components/register.vue | 12 ++++++++++-- src/views/login/index.vue | 8 +++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/api/common/login.ts b/src/api/common/login.ts index 2fc502e..f3e5c17 100644 --- a/src/api/common/login.ts +++ b/src/api/common/login.ts @@ -11,6 +11,9 @@ export type CaptchaDTO = { export type ConfigDTO = { /** 验证码开关 */ isCaptchaOn: boolean; + /** 手机号注册开关 */ + isPhoneRegisterOn: boolean; + clientId: string; /** 系统字典配置(下拉选项之类的) */ dictionary: Map>; }; diff --git a/src/views/login/components/register.vue b/src/views/login/components/register.vue index 659c7fe..2116c1f 100644 --- a/src/views/login/components/register.vue +++ b/src/views/login/components/register.vue @@ -14,6 +14,14 @@ defineProps({ currentPage: { type: Number, default: 3 + }, + isPhoneRegisterOn: { + type: Boolean, + default: false + }, + clientId: { + type: String, + default: "" } }); @@ -103,7 +111,7 @@ function onBack() { - + - +
{ captchaCode: ruleForm.captchaCode, captchaCodeKey: ruleForm.captchaCodeKey, grantType: "password", - clientId: "1" + clientId: clientId.value }) .then(({ data }) => { // 登录成功后 将token存储到sessionStorage中 @@ -135,6 +137,8 @@ watch(isRememberMe, newVal => { onBeforeMount(async () => { await CommonAPI.getConfig().then(res => { isCaptchaOn.value = res.data.isCaptchaOn; + isPhoneRegisterOn.value = res.data.isPhoneRegisterOn; + clientId.value = res.data.clientId; useUserStoreHook().SET_DICTIONARY(res.data.dictionary); }); @@ -314,6 +318,8 @@ onBeforeUnmount(() => {