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({ bankAccount: data.data.bankAccount, bankCardNumber: data.data.bankCardNumber, auditStatus: data.data.auditStatus }); }; }.bind(this), }).done(function (data) { if (data.error.length) { message.warning(data.error[0].message); } }.bind(this)).always(function () { this.setState({ loading: false }); }.bind(this)); }, getInitialState() { return { loading: false }; }, handleSubmit(e) { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { this.setState({ loading: true }); $.ajax({ method: "POST", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/user/userNextPro", data: { amountMoney: values.amountMoney, process: 5 }, success: function (data) { if (!data.error.length) { message.success('审核成功!'); this.props.changeStep(6); } else { if (isNaN(Number(data.error[0].message))) { message.warning(data.error[0].message); this.setState({ loading: false }); } else { switch (Number(data.error[0].message)) { case 1: message.warning("超过打款日期五日,无法确认提交!"); this.props.changeStep(6); break; case 2: message.warning("输入错误金额次数过多!"); this.props.changeStep(6); break; } }; }; }.bind(this), }); } }); }, componentWillMount() { this.getData(); }, render() { const FormItem = Form.Item; const { getFieldDecorator } = this.props.form; const formItemLayout = { labelCol: { span: 4 }, wrapperCol: { span: 12 }, }; const _me = this; return (

输入打款金额

请在下方输入{this.state.bankAccount}银行卡{this.state.bankCardNumber}收到的认证打款, 务必在收到打款5日内完成,否则将无法完成 {this.state.bankAccount} {this.state.bankCardNumber} 仅有3次输入机会,如3次输入有误,需重新认证} > {getFieldDecorator('amountMoney', { rules: [{ required: true, message: '请输入金额!' }] })( )}
); }, })); export default Content;