result.jsx 3.6 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: "get",
  18. dataType: "json",
  19. crossDomain: false,
  20. url: globalConfig.context + "/api/user/identFailed",
  21. data: {
  22. }
  23. }).done(function (data) {
  24. if (!data.error.length) {
  25. message.success('已提交重新审核!');
  26. this.props.changeStep(1);
  27. } else {
  28. message.warning(data.error[0].message);
  29. }
  30. }.bind(this)).always(function () {
  31. this.setState({
  32. loading: false
  33. });
  34. }.bind(this));
  35. },
  36. componentWillMount() {
  37. $.ajax({
  38. method: "get",
  39. dataType: "json",
  40. url: globalConfig.context + "/api/user/orgProcess",
  41. success: function (data) {
  42. if (data.data) {
  43. this.setState({
  44. auditStatus: data.data.auditStatus
  45. });
  46. };
  47. }.bind(this),
  48. }).done(function (data) {
  49. if (data.error.length) {
  50. message.warning(data.error[0].message);
  51. };
  52. this.setState({
  53. loading:false
  54. });
  55. }.bind(this));
  56. },
  57. render() {
  58. const _me = this;
  59. return (
  60. <Spin spinning={this.state.loading} className="certify-spin">
  61. {(() => {
  62. switch (this.state.auditStatus) {
  63. case '5':
  64. return <div className="certify-result-box">
  65. <p className="certify-title"
  66. style={{ 'textAlign': 'center' }}
  67. >审核通过,认证申请成功</p>
  68. <div className="certify-result-state">
  69. <Icon type="check-circle-o" />
  70. <p>您已通过了实名认证</p>
  71. </div>
  72. </div>;
  73. case '4':
  74. return <div className="certify-result-box">
  75. <p className="certify-title"
  76. style={{ 'textAlign': 'center' }}
  77. >实名认证未通过。您可以可重新申请实名认证。</p>
  78. <div className="certify-result-state">
  79. <Icon type="close-circle-o" />
  80. <p>您未能通过实名认证审核</p>
  81. <p>可能的原因是:</p>
  82. <p>您提交的认证资料不符合要求,未能通过实名认证;</p>
  83. <p>您输入的银行账户信息有误,未能通过实名认证;</p>
  84. <Button className="set-submit" type="primary" onClick={this.handleSubmit}>重新申请实名认证</Button>
  85. </div>
  86. </div>;
  87. };
  88. })()}
  89. </Spin >
  90. );
  91. },
  92. }));
  93. export default Content;