From d3a618f09ab510de5c4ca772c44f60c218b61964 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 九月 2021 15:12:30 +0800 Subject: [PATCH] 2021-09-18 --- src/views/login/loginform.jsx | 74 +++++++++++++++++++++++++----------- 1 files changed, 51 insertions(+), 23 deletions(-) diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx index 068518f..43cfa46 100644 --- a/src/views/login/loginform.jsx +++ b/src/views/login/loginform.jsx @@ -365,8 +365,9 @@ <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> + {/* <div className="login-way-title">鐢ㄦ埛鐧诲綍</div> */} + {activeKey === 'uname_pwd' ? <div className="form-item-wrap"> + <Form.Item> {getFieldDecorator('username', { rules: [{ required: true, message: this.props.dict['login.username.empty'] }], initialValue: this.state.username || '', @@ -377,8 +378,8 @@ autoComplete="off" />, )} - </Form.Item> : null} - {activeKey === 'uname_pwd' ? <Form.Item> + </Form.Item> + <Form.Item> {getFieldDecorator('password', { initialValue: this.state.password || '', rules: [ @@ -388,8 +389,39 @@ } ] })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} + </Form.Item> + <Form.Item className="minline"> + {getFieldDecorator('remember', { + valuePropName: 'checked', + initialValue: remember, + })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} + </Form.Item> + {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> + {getFieldDecorator('lang', { + initialValue: this.props.lang, + })( + <Select + onChange={(value) => {this.changelang(value)}} + getPopupContainer={() => document.getElementById('login-form')} + > + {this.props.langList.map((item, index) => { + return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> + })} + </Select> + )} </Form.Item> : null} - {activeKey === 'sms_vcode' ? <Form.Item> + <Form.Item className="btn-login"> + <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}> + {this.props.dict['login.submit']} + </Button> + </Form.Item> + {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> + <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a> + <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a> + </Form.Item> : null} + </div> : null} + {activeKey === 'sms_vcode' ? <div className="form-item-wrap"> + <Form.Item> {getFieldDecorator('phone', { rules: [{ required: true, message: this.props.dict['login.phone.empty'] }], initialValue: '', @@ -399,8 +431,8 @@ autoComplete="off" /> )} - </Form.Item> : null} - {activeKey === 'sms_vcode' ? <Form.Item className="vercode"> + </Form.Item> + <Form.Item className="vercode"> {getFieldDecorator('vercode', { initialValue: '', rules: [ @@ -420,14 +452,8 @@ autoComplete="off" /> )} - </Form.Item> : null} - {activeKey === 'uname_pwd' ? <Form.Item className="minline"> - {getFieldDecorator('remember', { - valuePropName: 'checked', - initialValue: remember, - })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} - </Form.Item> : null} - {activeKey !== 'app_scan' && this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> + </Form.Item> + {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> {getFieldDecorator('lang', { initialValue: this.props.lang, })( @@ -441,12 +467,18 @@ </Select> )} </Form.Item> : null} - {['uname_pwd', 'sms_vcode'].includes(activeKey) ? <Form.Item className="btn-login"> + <Form.Item className="btn-login"> <Button type="primary" htmlType="submit" className="login-form-button" disabled={this.props.isDisabled} loading={this.props.isDisabled}> {this.props.dict['login.submit']} </Button> + </Form.Item> + {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> + <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a> + <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a> </Form.Item> : null} - {activeKey === 'app_scan' ? <div className="form-scan-wrap"> + </div> : null} + {activeKey === 'app_scan' ? <div className="form-item-wrap"> + <div className="form-scan-wrap"> <div className="qr-wrap"> {scanId ? <QrCode card={{qrWidth: 500, color: '#000000'}} value={`mkpcscan,${window.GLOB.appkey},${scanId}`}/> : null} {timeout ? <div className="qrcode-out"> @@ -455,12 +487,8 @@ </div> : null} </div> 璇蜂娇鐢ㄥ鎴风鎵竴鎵櫥褰� - </div> : null} - {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> - <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a> - <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a> - </Form.Item> : null} - </div> + </div> + </div> : null} </Form> ) } -- Gitblit v1.8.0