king
2021-12-22 bd1dfc9e6c9b9f8076ca2783ce598e0936b4c664
src/views/login/loginform.jsx
@@ -1,6 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Icon, Input, Button, Checkbox, Select, Modal, message } from 'antd'
import { Form, Input, Button, Checkbox, Select, Modal, message } from 'antd'
import { UserOutlined, LockOutlined, QrcodeOutlined, RedoOutlined } from '@ant-design/icons'
import md5 from 'md5'
import moment from 'moment'
@@ -368,7 +369,7 @@
    return (
      <Form className="login-form" id="login-form" onSubmit={this.handleSubmit}>
        <div className="login-way-title">{wayLabels[activeKey]}</div>
        {hasScan && activeKey !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab('app_scan')}><Icon type="qrcode" /></div> : null}
        {hasScan && activeKey !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab('app_scan')}><QrcodeOutlined /></div> : null}
        {activeKey === 'uname_pwd' ? <div className="form-item-wrap">
          <Form.Item>
            {getFieldDecorator('username', {
@@ -376,7 +377,7 @@
              initialValue: this.state.username || '',
            })(
              <Input
                prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
                prefix={<UserOutlined style={{ color: 'rgba(0,0,0,.25)' }} />}
                placeholder={this.props.dict['login.username']}
                autoComplete="off"
              />,
@@ -391,7 +392,7 @@
                  message: this.props.dict['login.password.empty'],
                }
              ]
            })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
            })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)}
          </Form.Item>
          <Form.Item className="minline">
            {getFieldDecorator('remember', {
@@ -485,7 +486,7 @@
            <div className="qr-wrap">
              {scanId ? <QrCode card={{qrWidth: 500, color: '#000000'}} value={`mkpcscan,${window.GLOB.appkey},${scanId}`}/> : null}
              {timeout ? <div className="qrcode-out">
                <Icon onClick={this.reCode} type="redo" />
                <RedoOutlined onClick={this.reCode} />
                二维码已失效。
              </div> : null}
            </div>