|
|
@ -4,7 +4,7 @@ import { connect } from 'react-redux'; |
|
|
|
import { push } from 'react-router-redux'; |
|
|
|
import { Form, Button, Toast } from '@douyinfe/semi-ui'; |
|
|
|
import { login, LOGIN_SUCCESS } from '../actions/auth'; |
|
|
|
import { IconLock,IconUser } from '@douyinfe/semi-icons'; |
|
|
|
import { IconLock, IconUser } from '@douyinfe/semi-icons'; |
|
|
|
import '../style.less' |
|
|
|
|
|
|
|
const Login = props => { |
|
|
@ -21,13 +21,15 @@ const Login = props => { |
|
|
|
useEffect(() => { |
|
|
|
if (user && user.authorized) { |
|
|
|
dispatch(push('/equipmentWarehouse/nvr')); |
|
|
|
localStorage.setItem('vcmp_selected_sider', JSON.stringify(['nvr'])) |
|
|
|
localStorage.setItem('vcmp_open_sider', JSON.stringify(['equipmentWarehouse'])) |
|
|
|
} |
|
|
|
}, [user]) |
|
|
|
|
|
|
|
return ( |
|
|
|
<div style={{ |
|
|
|
height: '100vh', |
|
|
|
backgroundImage:"url('/assets/images/background/loginBackground.png')", |
|
|
|
backgroundImage: "url('/assets/images/background/loginBackground.png')", |
|
|
|
backgroundSize: 'cover', |
|
|
|
backgroundRepeat: 'no-repeat', |
|
|
|
position: 'relative', |
|
|
@ -36,15 +38,15 @@ const Login = props => { |
|
|
|
width: 446, |
|
|
|
height: 348, |
|
|
|
padding: '45px 60px', |
|
|
|
backgroundImage:"url('/assets/images/background/loginbg.png')", |
|
|
|
backgroundImage: "url('/assets/images/background/loginbg.png')", |
|
|
|
backgroundSize: '100% 100%', |
|
|
|
backgroundRepeat: 'no-repeat', |
|
|
|
position: 'absolute', |
|
|
|
top: '33.89%', |
|
|
|
right: '16.43%', |
|
|
|
}}> |
|
|
|
<div style={{width:113,height:24,marginTop:3,marginLeft:5}}> |
|
|
|
<img src="/assets/images/background/user_login.png" alt="" style={{width:'100%',height:'100%'}}/> |
|
|
|
<div style={{ width: 113, height: 24, marginTop: 3, marginLeft: 5 }}> |
|
|
|
<img src="/assets/images/background/user_login.png" alt="" style={{ width: '100%', height: '100%' }} /> |
|
|
|
</div> |
|
|
|
<Form |
|
|
|
onSubmit={values => { |
|
|
@ -61,8 +63,8 @@ const Login = props => { |
|
|
|
noLabel={true} |
|
|
|
label='用户名' |
|
|
|
placeholder='请输入账号' |
|
|
|
prefix={<IconUser style={{color:'#1859C1',marginRight:14,marginLeft:8}}/>} |
|
|
|
style={{background:'rgba(24, 89, 193, 0.08)',height:40,marginTop:26}} |
|
|
|
prefix={<IconUser style={{ color: '#1859C1', marginRight: 14, marginLeft: 8 }} />} |
|
|
|
style={{ background: 'rgba(24, 89, 193, 0.08)', height: 40, marginTop: 26 }} |
|
|
|
/> |
|
|
|
<Form.Input |
|
|
|
field='password' |
|
|
@ -71,10 +73,10 @@ const Login = props => { |
|
|
|
autoComplete="" |
|
|
|
placeholder='请输入密码' |
|
|
|
label='密码' |
|
|
|
prefix={<IconLock style={{color:'#1859C1',marginRight:14,marginLeft:8}}/>} |
|
|
|
style={{background:'rgba(24, 89, 193, 0.08)',height:40}} |
|
|
|
prefix={<IconLock style={{ color: '#1859C1', marginRight: 14, marginLeft: 8 }} />} |
|
|
|
style={{ background: 'rgba(24, 89, 193, 0.08)', height: 40 }} |
|
|
|
/> |
|
|
|
<Button htmlType='submit' block theme="solid" style={{marginTop:17,height:40,backgroundColor:'#1859C1'}}>立即登录</Button> |
|
|
|
<Button htmlType='submit' block theme="solid" style={{ marginTop: 17, height: 40, backgroundColor: '#1859C1' }}>立即登录</Button> |
|
|
|
</Form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|