diff --git a/code/VideoAccess-VCMP/web/client/assets/images/background/loginBackground.gif b/code/VideoAccess-VCMP/web/client/assets/images/background/loginBackground.gif new file mode 100644 index 0000000..46f9f99 Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/images/background/loginBackground.gif differ diff --git a/code/VideoAccess-VCMP/web/client/assets/images/background/loginBackground.png b/code/VideoAccess-VCMP/web/client/assets/images/background/loginBackground.png deleted file mode 100644 index 39946d7..0000000 Binary files a/code/VideoAccess-VCMP/web/client/assets/images/background/loginBackground.png and /dev/null differ diff --git a/code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx b/code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx index bb976f3..01da4b8 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/auth/containers/login.jsx @@ -8,99 +8,110 @@ import { IconLock, IconUser } from '@douyinfe/semi-icons'; import '../style.less' const Login = props => { - const { dispatch, user, error, actions, apiRoot, isRequesting } = props - const form = useRef(); + const { dispatch, user, error, actions, apiRoot, isRequesting } = props + const form = useRef(); - useEffect(() => { - if (error) { - Toast.error(error); - form.current.setValue('password', '') - } - }, [error]) + useEffect(() => { + if (error) { + Toast.error(error); + form.current.setValue('password', '') + } + }, [error]) - useEffect(() => { - if (user && user.authorized) { - const iotAuth = document.getElementById('iotAuth').contentWindow; - iotAuth.postMessage({ action: 'login', user: user }, '*'); - dispatch(push('/equipmentWarehouse/nvr')); - localStorage.setItem('vcmp_selected_sider', JSON.stringify(['nvr'])) - localStorage.setItem('vcmp_open_sider', JSON.stringify(['equipmentWarehouse'])) - } - }, [user]) + useEffect(() => { + if (user && user.authorized) { + const iotAuth = document.getElementById('iotAuth').contentWindow; + iotAuth.postMessage({ action: 'login', user: user }, '*'); + dispatch(push('/equipmentWarehouse/nvr')); + localStorage.setItem('vcmp_selected_sider', JSON.stringify(['nvr'])) + localStorage.setItem('vcmp_open_sider', JSON.stringify(['equipmentWarehouse'])) + } + }, [user]) - return ( -
-