登录页面优化

This commit is contained in:
禺狨 2023-06-30 16:31:00 +08:00
parent 6bc0e443be
commit 8ba02aaaed
2 changed files with 10 additions and 6 deletions

View File

@ -1,10 +1,8 @@
.login-content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: 0;
position: fixed;
width: 100%;
background-image: url("../../assets//images/login/bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
.top-content {
width: 100%;

View File

@ -22,10 +22,13 @@ const LoginPage = () => {
const [captchaVal, setCaptchaVal] = useState<string>("");
const [captchaKey, setCaptchaKey] = useState<string>("");
const [captchaLoading, setCaptchaLoading] = useState(true);
const [bodyHeight, setBodyHeight] = useState<number>(0);
useEffect(() => {
fetchImageCaptcha();
document.title = "登录";
let value = document.documentElement.clientHeight;
setBodyHeight(value);
}, []);
const fetchImageCaptcha = () => {
@ -123,7 +126,10 @@ const LoginPage = () => {
};
return (
<div className={styles["login-content"]}>
<div
className={styles["login-content"]}
style={{ height: bodyHeight + "px" }}
>
<div className={styles["top-content"]}>
<div className={styles["title"]}></div>
<Image src={banner} width={150} height={150} />