新增icp

This commit is contained in:
maojindao55
2025-07-15 17:28:04 +08:00
parent 37be9687e8
commit 29d3963356
2 changed files with 12 additions and 1 deletions

View File

@@ -2,5 +2,6 @@
// 部署时可以直接修改这个文件来改变配置,无需重新编译
window.APP_CONFIG = {
// 权限验证开关:'1' 开启,'0' 关闭
AUTH_ACCESS: "0",
AUTH_ACCESS: "1",
ICP_NUMBER: "",
};

View File

@@ -14,6 +14,9 @@ const PhoneLogin: React.FC<PhoneLoginProps> = ({ 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<PhoneLoginProps> = ({ handleLoginSuccess }) => {
) : '登录'}
</Button>
</form>
{/* 备案号显示 */}
{icpNumber && (
<div className="text-center mt-8 text-xs text-gray-400">
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">{icpNumber}</a>
</div>
)}
</div>
</div>
);