123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- import React from 'react';
- import { Input, Button, Form, Icon, Spin, message, } from 'antd';
- import './certify.less';
- import ajax from 'jquery/src/ajax/xhr.js'
- import $ from 'jquery/src/ajax';
- const Content = Form.create()(React.createClass({
- getData() {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- url: globalConfig.context + "/api/user/userPro",
- success: function (data) {
- if (data.data) {
- this.setState({
- username: data.data.username,
- idNumber: data.data.idNumber,
- contactMobile: data.data.contactMobile,
- bankName: data.data.bankName,
- bankAccount: data.data.bankAccount,
- bankCardNumber: data.data.bankCardNumber,
- positiveIdUrl: data.data.positiveIdUrl,
- oppositeIdUrl: data.data.oppositeIdUrl
- });
- };
- }.bind(this),
- }).done(function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- }.bind(this)).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- getInitialState() {
- return {
- loading: false
- };
- },
- handleSubmit() {
- this.setState({
- loading: true
- });
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/user/userNextPro",
- data: {
- process: 3
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('保存成功!');
- this.props.changeStep(4);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- componentWillMount() {
- this.getData();
- },
- changeStep() {
- this.props.changeStep(1);
- },
- render() {
- const FormItem = Form.Item;
- const { getFieldDecorator } = this.props.form;
- const formItemLayout = {
- labelCol: { span: 4 },
- wrapperCol: { span: 12 },
- };
- const _me = this;
- return (
- <Spin spinning={this.state.loading} className="certify-spin">
- <Form horizontal className="certify-form">
- <FormItem wrapperCol={{ span: 12, offset: 4 }}>
- <p className="certify-title">请确认个人信息</p>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="真实姓名"
- >
- <span>{this.state.username}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="身份证号码"
- >
- <span>{this.state.idNumber}</span>
- </FormItem>
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="身份证图片"
- >
- <div className="idcard-img clearfix">
- <div>
- <div className="idcard-imgbox">
- <img src={globalConfig.context + '/open/writeImage?path=' + this.state.positiveIdUrl} alt="点击查看大图"
- onClick={(e) => { window.open(e.target.src) }} />
- </div>
- </div>
- <div>
- <div className="idcard-imgbox">
- <img src={globalConfig.context + '/open/writeImage?path=' + this.state.oppositeIdUrl} alt="点击查看大图"
- onClick={(e) => { window.open(e.target.src) }} />
- </div>
- </div>
- </div>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="联系方式"
- >
- <span>{this.state.contactMobile}</span>
- </FormItem>
- <FormItem wrapperCol={{ span: 12, offset: 4 }}>
- <p className="certify-title">请确认银行卡信息</p>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="银行开户名"
- >
- <span>{this.state.bankName}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户银行"
- >
- <span>{this.state.bankAccount}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="银行卡号"
- >
- <span>{this.state.bankCardNumber}</span>
- </FormItem>
- <FormItem wrapperCol={{ span: 18, offset: 4 }}>
- <span style={{ 'color': '#ea0862' }}>
- <Icon type="exclamation-circle" />
- 提醒:银行卡号、身份证号码,认证成功之前,最多只能申请认证3次,
- 认证成功后,不能再申请认证。
- </span>
- </FormItem>
- <FormItem wrapperCol={{ span: 12, offset: 4 }}>
- <Button className="set-submit" type="primary" onClick={_me.handleSubmit}>下一步</Button>
- <Button className="exit" type="ghost" onClick={_me.changeStep}>返回修改</Button>
- </FormItem>
- </Form >
- </Spin >
- );
- },
- }));
- export default Content;
|