|
@@ -61,6 +61,9 @@ const Group = Form.create()(React.createClass({
|
|
|
getMCode() {
|
|
|
const _me = this;
|
|
|
const form = this.props.form;
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -162,125 +165,127 @@ const Group = Form.create()(React.createClass({
|
|
|
};
|
|
|
return (
|
|
|
<div className="group clearfix">
|
|
|
- <Form className="account-left" horizontal onSubmit={this.handleSubmit}>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="密码"
|
|
|
- extra={<span><Icon type="exclamation-circle" /> 建议字母、数字和符号两种以上组合,6-20个字符</span>}
|
|
|
- hasFeedback >
|
|
|
- {getFieldDecorator('password', {
|
|
|
- rules: [{
|
|
|
- required: true, message: '请输入密码!',
|
|
|
- }, {
|
|
|
- validator: this.checkConfirm,
|
|
|
- }],
|
|
|
- })(
|
|
|
- <Input type="password" onBlur={this.handlePasswordBlur} />
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="确认密码"
|
|
|
- extra={<span><Icon type="exclamation-circle" /> 请再次输入密码</span>}
|
|
|
- hasFeedback
|
|
|
- >
|
|
|
- {getFieldDecorator('confirm', {
|
|
|
- rules: [{
|
|
|
- required: true, message: '请再次输入密码!',
|
|
|
- }, {
|
|
|
- validator: this.checkPassowrd,
|
|
|
- }],
|
|
|
- })(
|
|
|
- <Input type="password" />
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="手机号码"
|
|
|
- hasFeedback
|
|
|
- extra={<span><Icon type="exclamation-circle" /> 请输入正确的手机号码</span>}
|
|
|
- >
|
|
|
- {getFieldDecorator('phone', {
|
|
|
- rules: [{ required: true, message: '请输入手机号码!' }, {
|
|
|
- validator: this.checkPhone,
|
|
|
- }],
|
|
|
- })(
|
|
|
- <Input size="large" />
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="验证码"
|
|
|
- extra={<span className="redFont"><Icon type="exclamation-circle" /> 看不清?点击图片更换验证码</span>}
|
|
|
- >
|
|
|
- <Row gutter={8}>
|
|
|
- <Col span={16}>
|
|
|
- {getFieldDecorator('captcha', {
|
|
|
- rules: [{ required: true, message: '请输入图片中的验证码' }],
|
|
|
- })(
|
|
|
- <Input size="large" />
|
|
|
- )}
|
|
|
- </Col>
|
|
|
- <Col span={8}>
|
|
|
- <div className="acc-getVcode">
|
|
|
- <img id="VCode" src={this.state.vCodeUrl} alt="点击刷新验证码" onClick={this.reloadVCode} />
|
|
|
- </div>
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="手机验证码"
|
|
|
- extra={<span><Icon type="exclamation-circle" /> 点击获取后我们将发送验证码到上面手机号</span>}
|
|
|
- >
|
|
|
- <Row gutter={8}>
|
|
|
- <Col span={16}>
|
|
|
- {getFieldDecorator('phonecaptcha', {
|
|
|
- rules: [{ required: true, message: '请输入手机获取到的验证码' }],
|
|
|
- })(
|
|
|
- <Input size="large" />
|
|
|
- )}
|
|
|
- </Col>
|
|
|
- <Col span={8}>
|
|
|
- <Button size="large" onClick={this.getMCode} disabled={this.state.getCodeButton}>{this.state.mCodeText}</Button>
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="单位名称"
|
|
|
- hasFeedback
|
|
|
- extra={<span><Icon type="exclamation-circle" /> 请填写工商局注册的全称</span>}
|
|
|
- >
|
|
|
- {getFieldDecorator('company', {
|
|
|
- rules: [{ required: true, message: '请填写公司全称!' }],
|
|
|
- })(
|
|
|
- <Input size="large" />
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
- <FormItem
|
|
|
- {...formItemLayout}
|
|
|
- label="联系人"
|
|
|
- hasFeedback
|
|
|
- >
|
|
|
- {getFieldDecorator('user', {
|
|
|
- rules: [{ required: true, message: '请输入联系人姓名!' }],
|
|
|
- })(
|
|
|
- <Input size="large" />
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
- <FormItem {...tailFormItemLayout} style={{ marginBottom: 8 }}>
|
|
|
- {getFieldDecorator('agreement', {
|
|
|
- valuePropName: 'checked',
|
|
|
- })(
|
|
|
- <Checkbox>同意 <a onClick={() => { this.setState({ showDesc: true }); }}> 阿凡提会员服务协议条款</a></Checkbox>
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
- <FormItem {...tailFormItemLayout}>
|
|
|
- <Button type="primary" htmlType="submit" size="large">提 交</Button>
|
|
|
- </FormItem>
|
|
|
- </Form>
|
|
|
- <Modal showDesc={this.state.showDesc} closeModal={this.closeModal} />
|
|
|
+ <Spin spinning={this.state.loading} >
|
|
|
+ <Form className="account-left" horizontal onSubmit={this.handleSubmit}>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="密码"
|
|
|
+ extra={<span><Icon type="exclamation-circle" /> 建议字母、数字和符号两种以上组合,6-20个字符</span>}
|
|
|
+ hasFeedback >
|
|
|
+ {getFieldDecorator('password', {
|
|
|
+ rules: [{
|
|
|
+ required: true, message: '请输入密码!',
|
|
|
+ }, {
|
|
|
+ validator: this.checkConfirm,
|
|
|
+ }],
|
|
|
+ })(
|
|
|
+ <Input type="password" onBlur={this.handlePasswordBlur} />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="确认密码"
|
|
|
+ extra={<span><Icon type="exclamation-circle" /> 请再次输入密码</span>}
|
|
|
+ hasFeedback
|
|
|
+ >
|
|
|
+ {getFieldDecorator('confirm', {
|
|
|
+ rules: [{
|
|
|
+ required: true, message: '请再次输入密码!',
|
|
|
+ }, {
|
|
|
+ validator: this.checkPassowrd,
|
|
|
+ }],
|
|
|
+ })(
|
|
|
+ <Input type="password" />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="手机号码"
|
|
|
+ hasFeedback
|
|
|
+ extra={<span><Icon type="exclamation-circle" /> 请输入正确的手机号码</span>}
|
|
|
+ >
|
|
|
+ {getFieldDecorator('phone', {
|
|
|
+ rules: [{ required: true, message: '请输入手机号码!' }, {
|
|
|
+ validator: this.checkPhone,
|
|
|
+ }],
|
|
|
+ })(
|
|
|
+ <Input size="large" />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="验证码"
|
|
|
+ extra={<span className="redFont"><Icon type="exclamation-circle" /> 看不清?点击图片更换验证码</span>}
|
|
|
+ >
|
|
|
+ <Row gutter={8}>
|
|
|
+ <Col span={16}>
|
|
|
+ {getFieldDecorator('captcha', {
|
|
|
+ rules: [{ required: true, message: '请输入图片中的验证码' }],
|
|
|
+ })(
|
|
|
+ <Input size="large" />
|
|
|
+ )}
|
|
|
+ </Col>
|
|
|
+ <Col span={8}>
|
|
|
+ <div className="acc-getVcode">
|
|
|
+ <img id="VCode" src={this.state.vCodeUrl} alt="点击刷新验证码" onClick={this.reloadVCode} />
|
|
|
+ </div>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="手机验证码"
|
|
|
+ extra={<span><Icon type="exclamation-circle" /> 点击获取后我们将发送验证码到上面手机号</span>}
|
|
|
+ >
|
|
|
+ <Row gutter={8}>
|
|
|
+ <Col span={16}>
|
|
|
+ {getFieldDecorator('phonecaptcha', {
|
|
|
+ rules: [{ required: true, message: '请输入手机获取到的验证码' }],
|
|
|
+ })(
|
|
|
+ <Input size="large" />
|
|
|
+ )}
|
|
|
+ </Col>
|
|
|
+ <Col span={8}>
|
|
|
+ <Button size="large" onClick={this.getMCode} disabled={this.state.getCodeButton}>{this.state.mCodeText}</Button>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="单位名称"
|
|
|
+ hasFeedback
|
|
|
+ extra={<span><Icon type="exclamation-circle" /> 请填写工商局注册的全称</span>}
|
|
|
+ >
|
|
|
+ {getFieldDecorator('company', {
|
|
|
+ rules: [{ required: true, message: '请填写公司全称!' }],
|
|
|
+ })(
|
|
|
+ <Input size="large" />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ label="联系人"
|
|
|
+ hasFeedback
|
|
|
+ >
|
|
|
+ {getFieldDecorator('user', {
|
|
|
+ rules: [{ required: true, message: '请输入联系人姓名!' }],
|
|
|
+ })(
|
|
|
+ <Input size="large" />
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem {...tailFormItemLayout} style={{ marginBottom: 8 }}>
|
|
|
+ {getFieldDecorator('agreement', {
|
|
|
+ valuePropName: 'checked',
|
|
|
+ })(
|
|
|
+ <Checkbox>同意 <a onClick={() => { this.setState({ showDesc: true }); }}> 阿凡提会员服务协议条款</a></Checkbox>
|
|
|
+ )}
|
|
|
+ </FormItem>
|
|
|
+ <FormItem {...tailFormItemLayout}>
|
|
|
+ <Button type="primary" htmlType="submit" size="large">提 交</Button>
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ <Modal showDesc={this.state.showDesc} closeModal={this.closeModal} />
|
|
|
+ </Spin>
|
|
|
</div>
|
|
|
);
|
|
|
},
|