audit.jsx 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import React from 'react';
  2. import { Input, Button, Form, Icon, Spin, message, } from 'antd';
  3. import './certify.less';
  4. import ajax from 'jquery/src/ajax/xhr.js'
  5. import $ from 'jquery/src/ajax';
  6. const Content = Form.create()(React.createClass({
  7. getInitialState() {
  8. return {
  9. loading: false
  10. };
  11. },
  12. handleSubmit() {
  13. this.setState({
  14. loading: true
  15. });
  16. $.ajax({
  17. method: "POST",
  18. dataType: "json",
  19. crossDomain: false,
  20. url: globalConfig.context + "/api/user/userNextPro",
  21. data: {
  22. process: 4
  23. }
  24. }).done(function (data) {
  25. if (!data.error.length) {
  26. message.success('保存成功!');
  27. this.props.changeStep(5);
  28. } else {
  29. message.warning(data.error[0].message);
  30. this.setState({
  31. loading: false
  32. });
  33. }
  34. }.bind(this));
  35. },
  36. loadDate(){
  37. this.setState({
  38. loading:true
  39. });
  40. $.ajax({
  41. method: "get",
  42. dataType: "json",
  43. url: globalConfig.context + "/api/user/userPro",
  44. success: function (data) {
  45. if (data.data) {
  46. this.setState({
  47. bankCardNumber: data.data.bankCardNumber,
  48. auditStatus: data.data.auditStatus
  49. });
  50. };
  51. }.bind(this),
  52. }).done(function (data) {
  53. if (data.error && data.error.length) {
  54. message.warning(data.error[0].message);
  55. };
  56. this.setState({
  57. loading:false
  58. });
  59. }.bind(this));
  60. },
  61. componentWillMount() {
  62. this.loadDate();
  63. },
  64. render() {
  65. const FormItem = Form.Item;
  66. const { getFieldDecorator } = this.props.form;
  67. const formItemLayout = {
  68. labelCol: { span: 4 },
  69. wrapperCol: { span: 12 },
  70. };
  71. const _me = this;
  72. return (
  73. <Spin spinning={this.state.loading} className="certify-spin">
  74. <Form horizontal onSubmit={this.handleSubmit} className="certify-form">
  75. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  76. <p className="certify-title">信息提交成功</p>
  77. </FormItem>
  78. <FormItem wrapperCol={{ span: 18, offset: 4 }}>
  79. <span>
  80. 认证系统将会在1-2个工作日内给您的银行卡{this.state.bankCardNumber}转入一笔1元以下的确认金额,
  81. 然后在下方正确填写正确的金额数目。
  82. 若打款成功,认证系统将会通过短信的方式通知您
  83. </span>
  84. </FormItem>
  85. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  86. <Button disabled={this.state.auditStatus == "3" ? false : true} className="set-submit" type="primary" htmlType="submit">输入打款金额</Button>
  87. </FormItem>
  88. </Form >
  89. </Spin >
  90. );
  91. },
  92. }));
  93. export default Content;