立即完善

dev_forum
hjm 6 years ago
parent ec1c757f37
commit 95a035e535

@ -97,9 +97,10 @@ export function CNotificationHOC(options = {}) {
confirm = (object) => {
const { title, content, onOk, onCancel } = object;
const { title, content, onOk, onCancel, okText } = object;
this.onCancel = onCancel
this.onOk = onOk
this.okText = okText || ''
this.setState({ title, content, dialogOpen: true })
}
onDialogOkBtnClick = () => {
@ -131,6 +132,7 @@ export function CNotificationHOC(options = {}) {
modalsBottomval={""}
modalCancel={this.handleDialogClose}
modalSave={this.onDialogOkBtnClick}
okText={this.okText}
>
</Modals>
<WrappedComponent {...this.props}

@ -33,7 +33,7 @@ render() {
:
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.props.modalSave}>确定</a>
<a className="task-btn task-btn-orange" onClick={this.props.modalSave}>{this.props.okText || '确定'}</a>
</div>
}
</div>

@ -14,6 +14,20 @@ class AccountCertification extends Component {
}
}
checkBasicInfo = (index) => {
if (this.props.basicInfo.base_info_completed == true) {
this.showRealNameCertificationModal(index)
} else {
this.props.confirm({
okText: `立即完善`,
content: `请先完善基本信息`,
onOk: () => {
this.props.history.push('/account/profile/edit')
}
})
}
}
showRealNameCertificationModal = (index) => {
this.setState({
certification:index,
@ -67,7 +81,7 @@ class AccountCertification extends Component {
<div className="status">
{
basicInfo && basicInfo.authentication =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.showRealNameCertificationModal(1)} >立即认证</WordsBtn>:
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.checkBasicInfo(1)} >立即认证</WordsBtn>:
basicInfo && basicInfo.authentication =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>:
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span>
}
@ -80,7 +94,7 @@ class AccountCertification extends Component {
<div className="status">
{
basicInfo && basicInfo.professional_certification =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.showRealNameCertificationModal(2)} >立即认证</WordsBtn>:
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.checkBasicInfo(2)} >立即认证</WordsBtn>:
basicInfo && basicInfo.professional_certification =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>:
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span>
}

Loading…
Cancel
Save