|
@@ -18,7 +18,8 @@ const LoginContent = Form.create()(React.createClass({
|
|
|
passwordDirty: false,
|
|
|
getCodeButton: true,
|
|
|
loading: false,
|
|
|
- mCodeText: '获取验证码'
|
|
|
+ mCodeText: '获取验证码',
|
|
|
+ vCodeUrl: globalConfig.context + '/open/getVCode'
|
|
|
};
|
|
|
},
|
|
|
handleSubmit(e) {
|
|
@@ -48,7 +49,7 @@ const LoginContent = Form.create()(React.createClass({
|
|
|
}, 5000);
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
- document.getElementById('VCode').src = globalConfig.context + '/open/getVCode?t=' + Math.random();
|
|
|
+ this.reloadVCode();
|
|
|
}
|
|
|
}.bind(this)).always(function () {
|
|
|
this.setState({
|
|
@@ -142,8 +143,8 @@ const LoginContent = Form.create()(React.createClass({
|
|
|
}
|
|
|
callback();
|
|
|
},
|
|
|
- reloadVCode(e) {
|
|
|
- e.target.src = globalConfig.context + '/open/getVCode?t=' + Math.random();
|
|
|
+ reloadVCode() {
|
|
|
+ this.state.vCodeUrl = globalConfig.context + '/open/getVCode?t=' + Math.random();
|
|
|
},
|
|
|
render() {
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
@@ -223,7 +224,7 @@ const LoginContent = Form.create()(React.createClass({
|
|
|
</Col>
|
|
|
<Col span={8}>
|
|
|
<div className="acc-getVcode">
|
|
|
- <img id="VCode" src={globalConfig.context + '/open/getVCode'} alt="" onClick={this.reloadVCode} />
|
|
|
+ <img id="VCode" src={this.state.vCodeUrl} alt="点击刷新验证码" onClick={this.reloadVCode} />
|
|
|
</div>
|
|
|
</Col>
|
|
|
</Row>
|