1
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -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>
|
||||
|
||||
@@ -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 ─────────────────────────────────────────
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user