Browse Source

登录页

master
wenlele 2 years ago
parent
commit
34342ad0f4
  1. 21
      web/client/src/sections/auth/containers/login.js

21
web/client/src/sections/auth/containers/login.js

@ -6,10 +6,11 @@ import SHA1 from 'crypto-js/sha1';
import Hex from 'crypto-js/enc-hex'; import Hex from 'crypto-js/enc-hex';
import { ApiTable } from '$utils' import { ApiTable } from '$utils'
import { Request } from '@peace/utils' import { Request } from '@peace/utils'
import { Button, Input, Form, Row, Col, message, Tabs } from 'antd'; import { Button, Input, Form, Row, Col, message, Tabs, Tooltip } from 'antd';
import { login, LOGIN_ERROR } from '../actions/auth'; import { login, LOGIN_ERROR } from '../actions/auth';
import { ExclamationCircleOutlined } from '@ant-design/icons'; import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Uploads } from '$components' import { Uploads } from '$components'
import { LockOutlined, UserOutlined } from '@ant-design/icons';
import '../style.less'; import '../style.less';
const FormItem = Form.Item; const FormItem = Form.Item;
@ -62,10 +63,6 @@ const Login = props => {
} }
}, [codSending]) }, [codSending])
const doLogin = () => {
}
return ( return (
@ -99,7 +96,6 @@ const Login = props => {
<Form <Form
form={form} form={form}
onFinish={r => { onFinish={r => {
// console.log(r);
form.validateFields().then(r => { form.validateFields().then(r => {
dispatch(login({ username: r.username, password: r.password })); dispatch(login({ username: r.username, password: r.password }));
}) })
@ -112,15 +108,16 @@ const Login = props => {
}} }}
> >
<Form.Item label='' name="username" rules={[{ required: true, message: '请输入用户名' },]}>
<Form.Item label='' name="username" rules={[{ required: true, message: '请输入点位名称' },]}> <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="用户名" />
<Input placeholder="用户名" />
</Form.Item> </Form.Item>
<Form.Item label='' name="password" rules={[{ required: true, message: '请输入点位名称' },]}> <Form.Item label='' name="password" rules={[{ required: true, message: '请输入密码' },]}>
<Input placeholder="密码" /> <Input prefix={<LockOutlined className="site-form-item-icon" />} placeholder="密码" />
</Form.Item> </Form.Item>
<Tooltip title='请联系管理员'>
<a style={{ position: 'relative', left: 348, top: -17 }}>忘记密码</a>
</Tooltip>
<Form.Item <Form.Item
> >
<Button type="primary" htmlType="submit" style={{ width: 410, height: 50 }}> <Button type="primary" htmlType="submit" style={{ width: 410, height: 50 }}>

Loading…
Cancel
Save