| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Icon, Input, Button, Checkbox, Select, Modal, Tabs, message } from 'antd' |
| | | import { Form, Icon, Input, Button, Checkbox, Select, Modal, message } from 'antd' |
| | | import md5 from 'md5' |
| | | import moment from 'moment' |
| | | |
| | |
| | | import './index.scss' |
| | | |
| | | const { warning } = Modal |
| | | const { TabPane } = Tabs |
| | | let LoginVerCodeTimer = null |
| | | |
| | | class LoginTabForm extends Component { |
| | |
| | | param.LText = md5(`${_phone}mingke${window.GLOB.appkey}${param.timestamp}`) |
| | | param.secretkey = md5(`${param.LText}mingke${param.timestamp}`) |
| | | |
| | | param.userid = sessionStorage.getItem('visitorUserID') || '' |
| | | param.LoginUID = sessionStorage.getItem('visitorLoginUID') || '' |
| | | |
| | | this.setState({ |
| | | verdisabled: true, |
| | | delay: 60 |
| | |
| | | const { activeKey, verdisabled, delay, loginWays, remember } = this.state |
| | | |
| | | return ( |
| | | <Form className={`login-form login-form-${loginWays.length}`} id="login-form" onSubmit={this.handleSubmit}> |
| | | <Tabs type="card" activeKey={activeKey} onChange={this.onChangeTab}> |
| | | {loginWays.map(item => (<TabPane tab={item.label} key={item.type}></TabPane>))} |
| | | </Tabs> |
| | | <Form className="login-form" id="login-form" onSubmit={this.handleSubmit}> |
| | | <div className={'login-way-wrap ' + (loginWays.length === 1 ? 'simple' : '')}> |
| | | {loginWays.map(item => ( |
| | | <div className={'login-way' + (activeKey === item.type ? ' active' : '')} onClick={() => this.onChangeTab(item.type)} key={item.type}>{item.label}</div> |
| | | ))} |
| | | </div> |
| | | <div className="form-item-wrap"> |
| | | {activeKey === 'uname_pwd' ? <Form.Item> |
| | | {getFieldDecorator('username', { |
| | |
| | | /> |
| | | )} |
| | | </Form.Item> : null} |
| | | {activeKey === 'sms_vcode' ? <Form.Item> |
| | | {activeKey === 'sms_vcode' ? <Form.Item className="vercode"> |
| | | {getFieldDecorator('vercode', { |
| | | initialValue: '', |
| | | rules: [ |
| | |
| | | {this.props.dict['login.submit']} |
| | | </Button> |
| | | </Form.Item> : null} |
| | | {options.sysType === 'cloud' ? <Form.Item className="register-line"> |
| | | {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> |
| | | <a href="http://minkesoft.com/#/signup" target="_blank" rel="noopener noreferrer" className="register">注册</a> |
| | | <a href="http://minkesoft.com/#/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">忘记密码?</a> |
| | | </Form.Item> : null} |