This commit is contained in:
2026-06-16 17:09:24 +08:00
parent 3b5477cc2a
commit 75a7724f8d
2 changed files with 135 additions and 24 deletions
+19 -2
View File
@@ -25,10 +25,27 @@ const LoginPage: React.FC = () => {
const [sliderKey, setSliderKey] = useState(0);
const [showResend, setShowResend] = useState(false);
const [loginShowResend, setLoginShowResend] = useState(false);
const [siteName, setSiteName] = useState('VideoGen.AI');
const [siteLogo, setSiteLogo] = useState('');
const getInitialSiteInfo = () => {
try {
const cached = localStorage.getItem('siteInfo');
if (cached) {
const info = JSON.parse(cached);
return {
siteName: info.siteName || 'VideoGen.AI',
siteLogo: info.siteLogo || '',
};
}
} catch { }
return { siteName: 'VideoGen.AI', siteLogo: '' };
};
const initialInfo = getInitialSiteInfo();
const [siteName, setSiteName] = useState(initialInfo.siteName);
const [siteLogo, setSiteLogo] = useState(initialInfo.siteLogo);
const [agreementUrl, setAgreementUrl] = useState('');
const [policyUrl, setPolicyUrl] = useState('');
const navigate = useNavigate();
const { login } = useAuthStore();
const [pwdForm] = Form.useForm();