This commit is contained in:
2026-06-29 11:26:14 +08:00
parent 43d12894c1
commit 9dd1bcdefc
11 changed files with 40 additions and 31 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -28,8 +28,8 @@
}
})();
</script>
<script type="module" crossorigin src="/assets/index-BHOoZIhk.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-xCZbcxht.css">
<script type="module" crossorigin src="/assets/index-DsdPVJNu.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DGXGZx3k.css">
</head>
<body>
<div id="root"></div>
+2 -2
View File
@@ -174,8 +174,8 @@ export async function verifyCaptcha(captchaId: string, x: number): Promise<strin
return res.token;
}
// ── Site Info ─────────────────────────────────────────────
export async function getSiteInfo(): Promise<{ siteName: string; siteLogo: string; userAgreementUrl: string; privacyPolicyUrl: string }> {
if (USE_MOCK) return { siteName: 'VideoGen.AI', siteLogo: '', userAgreementUrl: '', privacyPolicyUrl: '' };
export async function getSiteInfo(): Promise<{ siteName: string; siteLogo: string; userAgreementPrivacyUrl: string; siteCopyright: string }> {
if (USE_MOCK) return { siteName: 'VideoGen.AI', siteLogo: '', userAgreementPrivacyUrl: '', siteCopyright: '© 2024 民众智创 版权所有' };
return api.get('/auth/site-info', false);
}
// ── Video Engines ─────────────────────────────────────────
+9
View File
@@ -180,12 +180,21 @@
.login-right-section {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 1;
padding: 16px 16px 32px;
}
.login-copyright {
margin-top: 16px;
text-align: center;
color: rgba(255,255,255,0.7);
font-size: 12px;
letter-spacing: 0.5px;
}
@media (min-width: 900px) {
.login-right-section {
padding: 40px 24px;
+12 -12
View File
@@ -44,8 +44,8 @@ const LoginPage: React.FC = () => {
const initialInfo = getInitialSiteInfo();
const [siteName, setSiteName] = useState(initialInfo.siteName);
const [siteLogo, setSiteLogo] = useState(initialInfo.siteLogo);
const [agreementUrl, setAgreementUrl] = useState('');
const [policyUrl, setPolicyUrl] = useState('');
const [agreementPrivacyUrl, setAgreementPrivacyUrl] = useState('');
const [siteCopyright, setSiteCopyright] = useState('© 2024 民众智创 版权所有');
const navigate = useNavigate();
const { login } = useAuthStore();
@@ -57,14 +57,14 @@ const LoginPage: React.FC = () => {
getSiteInfo().then(info => {
setSiteName(info.siteName);
setSiteLogo(info.siteLogo);
setAgreementUrl(info.userAgreementUrl);
setPolicyUrl(info.privacyPolicyUrl);
setAgreementPrivacyUrl(info.userAgreementPrivacyUrl);
setSiteCopyright(info.siteCopyright || '© 2024 民众智创 版权所有');
}).catch(() => {});
}, []);
const checkAgreed = (): boolean => {
if (!agreed) {
message.warning('请先阅读并同意用户协议隐私政策');
message.warning('请先阅读并同意用户协议隐私政策');
return false;
}
return true;
@@ -440,14 +440,9 @@ const LoginPage: React.FC = () => {
<span className="login-agreement-text">
<span
onClick={e => { e.stopPropagation(); openPdf(agreementUrl); }}
onClick={e => { e.stopPropagation(); openPdf(agreementPrivacyUrl); }}
className="login-link"
></span>
<span
onClick={e => { e.stopPropagation(); openPdf(policyUrl); }}
className="login-link"
></span>
></span>
</span>
</Checkbox>
</div>
@@ -486,6 +481,11 @@ const LoginPage: React.FC = () => {
)}
</div>
</Card>
{siteCopyright && (
<div className="login-copyright">
{siteCopyright}
</div>
)}
</div>
</div>
);