audit.jsx 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. }
  31. }.bind(this)).always(function () {
  32. this.setState({
  33. loading: false
  34. });
  35. }.bind(this));
  36. },
  37. componentWillMount() {
  38. $.ajax({
  39. method: "get",
  40. dataType: "json",
  41. url: globalConfig.context + "/api/user/userPro",
  42. success: function (data) {
  43. if (data.data) {
  44. this.setState({
  45. bankCardNumber : data.data.bankCardNumber
  46. });
  47. } else {
  48. message.warning(data.error[0].message);
  49. };
  50. }.bind(this),
  51. });
  52. },
  53. render() {
  54. const FormItem = Form.Item;
  55. const { getFieldDecorator } = this.props.form;
  56. const formItemLayout = {
  57. labelCol: { span: 4 },
  58. wrapperCol: { span: 12 },
  59. };
  60. const _me = this;
  61. return (
  62. <Spin spinning={this.state.loading} className="certify-spin">
  63. <Form horizontal onSubmit={this.handleSubmit} className="certify-form">
  64. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  65. <p className="certify-title">信息提交成功</p>
  66. </FormItem>
  67. <FormItem wrapperCol={{ span: 18, offset: 4 }}>
  68. <span>
  69. 认证系统将会在1-2个工作日内给您的银行卡{this.state.bankCardNumber}转入一笔1元以下的确认金额,
  70. 然后在下方正确填写正确的金额数目。
  71. 若打款成功,认证系统将会通过短信的方式通知您
  72. </span>
  73. </FormItem>
  74. <FormItem wrapperCol={{ span: 12, offset: 4 }}>
  75. <Button className="set-submit" type="primary" htmlType="submit">输入打款金额</Button>
  76. </FormItem>
  77. </Form >
  78. </Spin >
  79. );
  80. },
  81. }));
  82. export default Content;