forked from nsjcy/frontEnd/nsjcy

liuwh
2020-03-30 8d68b6a1dcdf5008fba6bdac5858d1085a0e63e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
 * 徐祥健<xuxj@hugeinfo.com.cn>
 * 2018年7月16日 19:56
 *
 */
 
 
import React from 'react';
import { Input, Icon, Button } from 'antd';
import logo from '../../asset/image/logo.png'
import './style.scss';
 
 
export default class LoginView extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      userName: 'admin',
      password: 'admin123456@'
    };
  }
  onChangeUserName = (e) => {
    this.setState({ userName: e.target.value });
  }
  onChangePassword = (e) => {
    this.setState({ password: e.target.value });
  }
  render() {
    const { onClick } = this.props;
    return (
      <React.Fragment>
        <div className="login-view-main">
          <div><img src={logo} style={{ width: '200px' }} /></div>
          <div className='login-view-text'>南沙区人民检察院阳光检务后台管理</div>
        </div>
        <div className="login-view-content">
          <div className="login-view-body">
            <div className='login-view-wel'>欢迎登录</div>
            <div className='login-view-from'>
              <Input
                placeholder="请输入用户名"
                prefix={<Icon type="user" style={{ color: '#1790FF' }} />}
                onChange={this.onChangeUserName}
              />
              <Input
                style={{ paddingTop: '30px' }}
                type='password'
                placeholder=" 请输入密码"
                prefix={<Icon type="lock" style={{ color: '#1790FF', paddingTop: '30px' }} />}
                onChange={this.onChangePassword}
              />
            </div>
            <div className='login-view-btn'>
              <Button style={{ width: '345px' }} type="primary" onClick={() => onClick(this.state.userName, this.state.password)}>登录</Button>
            </div>
          </div>
        </div>
      </React.Fragment>
    );
  }
 
}