result.jsx 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. >输入的金额正确后,即时审核您填写的身份信息,请耐心等待2秒钟;如审核通过,即认证申请成功</p>
  68. <div className="certify-result-state">
  69. <Icon type="check" />
  70. <p>您已通过了实名认证</p>
  71. <p>建议您下载数字证书,保障您的支付安全。</p>
  72. </div>
  73. </div>;
  74. case 4:
  75. return <div className="certify-result-box">
  76. <p className="certify-title"
  77. style={{ 'textAlign': 'center' }}
  78. >若输入金额错误,则实名认证不通过。可重新申请实名认证。</p>
  79. <div className="certify-result-state">
  80. <Icon type="exclamation-circle" />
  81. <p>您未能通过实名认证审核</p>
  82. <p>可能的原因是:</p>
  83. <p>您提交的认证资料不符合要求,未能通过实名认证;</p>
  84. <p>您输入的金额有误,未能通过实名认证;</p>
  85. <p>您未及时在规定的5天期限内输入金额,未能通过实名认证;</p>
  86. <Button className="set-submit" type="primary" onClick={this.handleSubmit}>重新申请实名认证</Button>
  87. </div>
  88. </div>;
  89. };
  90. })()}
  91. </Spin >
  92. );
  93. },
  94. }));
  95. export default Content;