From 29d3963356d0f0f7a8f2f16361bba457a6d5b783 Mon Sep 17 00:00:00 2001 From: maojindao55 Date: Tue, 15 Jul 2025 17:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eicp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/config.js | 3 ++- src/pages/login/comonents/PhoneLogin.tsx | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/public/config.js b/public/config.js index 3961c92..76939e6 100644 --- a/public/config.js +++ b/public/config.js @@ -2,5 +2,6 @@ // 部署时可以直接修改这个文件来改变配置,无需重新编译 window.APP_CONFIG = { // 权限验证开关:'1' 开启,'0' 关闭 - AUTH_ACCESS: "0", + AUTH_ACCESS: "1", + ICP_NUMBER: "", }; \ No newline at end of file diff --git a/src/pages/login/comonents/PhoneLogin.tsx b/src/pages/login/comonents/PhoneLogin.tsx index c39c93a..4cea270 100644 --- a/src/pages/login/comonents/PhoneLogin.tsx +++ b/src/pages/login/comonents/PhoneLogin.tsx @@ -14,6 +14,9 @@ const PhoneLogin: React.FC = ({ handleLoginSuccess }) => { const [countdown, setCountdown] = useState(0); const [isLoading, setIsLoading] = useState(false); + // 获取备案号配置 + const icpNumber = (window as any).APP_CONFIG?.ICP_NUMBER; + // 发送验证码 const handleSendCode = async () => { if (!phone || !/^1[3-9]\d{9}$/.test(phone)) { @@ -144,6 +147,13 @@ const PhoneLogin: React.FC = ({ handleLoginSuccess }) => { ) : '登录'} + + {/* 备案号显示 */} + {icpNumber && ( +
+ {icpNumber} +
+ )} );