import React from 'react'; import { Icon, message } from 'antd'; import './certify.less'; import ajax from 'jquery/src/ajax/xhr.js' import $ from 'jquery/src/ajax'; import Personal from './personal.jsx'; import Bank from './bank.jsx'; import Confirm from './confirm.jsx'; import Audit from './audit.jsx'; import Money from './money.jsx'; import Result from './result.jsx'; const Content = React.createClass({ stepNumSwith(num) { switch (num) { case 1: this.setState({ step0Class: 'step-done', step1Class: 'step-doing', step2Class: 'step-none', step3Class: 'step-none', step4Class: 'step-none', step5Class: 'step-none', step6Class: 'step-none' }); break; case 2: this.setState({ step0Class: 'step-off', step1Class: 'step-done', step2Class: 'step-doing', step3Class: 'step-none', step4Class: 'step-none', step5Class: 'step-none', step6Class: 'step-none' }); break; case 3: this.setState({ step0Class: 'step-off', step1Class: 'step-off', step2Class: 'step-done', step3Class: 'step-doing', step4Class: 'step-none', step5Class: 'step-none', step6Class: 'step-none' }); break; case 4: this.setState({ step0Class: 'step-off', step1Class: 'step-off', step2Class: 'step-off', step3Class: 'step-done', step4Class: 'step-doing', step5Class: 'step-none', step6Class: 'step-none' }); break; case 5: this.setState({ step0Class: 'step-off', step1Class: 'step-off', step2Class: 'step-off', step3Class: 'step-off', step4Class: 'step-done', step5Class: 'step-doing', step6Class: 'step-none' }); break; case 6: this.setState({ step0Class: 'step-off', step1Class: 'step-off', step2Class: 'step-off', step3Class: 'step-off', //step4Class: 'step-off', step4Class: 'step-done', step5Class: 'step-done', step6Class: 'step-doing' }); break; }; }, getData() { $.ajax({ method: "get", dataType: "json", url: globalConfig.context + "/api/user/orgProcess", success: function (data) { if (data.data && data.data.process) { this.state.stepNum = data.data.process + 1 } else { this.state.stepNum = 1 }; this.stepNumSwith(this.state.stepNum); }.bind(this), }).done(function (data) { if (data.error.length) { message.warning(data.error[0].message); } }.bind(this)); }, getInitialState() { return { loading: false, }; }, componentWillMount() { this.getData(); }, changeStep(i) { this.state.stepNum = i; this.stepNumSwith(i) }, render() { return (
企业实名认证流程
{this.state.stepNum > 1 ? : 1}

填写

企业信息

{this.state.stepNum > 2 ? : 2}

填写

银行卡信息

{this.state.stepNum > 3 ? : 3}
确认信息
{this.state.stepNum > 4 ? : 4}
信息审核
{this.state.stepNum > 5 ? : 5}

填写打入

卡内金额

{this.state.stepNum > 6 ? : 5}
认证结果
{(() => { switch (this.state.stepNum) { case 1: return ; case 2: return ; case 3: return ; case 4: return ; case 99: return ; case 6: return ; }; })()}
) } }); export default Content;