From 8ba02aaaedf50b75edd9e4d0d5cae328ff1a0008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Fri, 30 Jun 2023 16:31:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/index.module.scss | 8 +++----- src/pages/login/index.tsx | 8 +++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pages/login/index.module.scss b/src/pages/login/index.module.scss index 659944e..d8bacd7 100644 --- a/src/pages/login/index.module.scss +++ b/src/pages/login/index.module.scss @@ -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%; diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 5c44b66..4ce6045 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -22,10 +22,13 @@ const LoginPage = () => { const [captchaVal, setCaptchaVal] = useState(""); const [captchaKey, setCaptchaKey] = useState(""); const [captchaLoading, setCaptchaLoading] = useState(true); + const [bodyHeight, setBodyHeight] = useState(0); useEffect(() => { fetchImageCaptcha(); document.title = "登录"; + let value = document.documentElement.clientHeight; + setBodyHeight(value); }, []); const fetchImageCaptcha = () => { @@ -123,7 +126,10 @@ const LoginPage = () => { }; return ( -
+
学员登录