diff --git a/public/react/src/modules/courses/common/CNotificationHOC.js b/public/react/src/modules/courses/common/CNotificationHOC.js index 6be60db3f..a74620764 100644 --- a/public/react/src/modules/courses/common/CNotificationHOC.js +++ b/public/react/src/modules/courses/common/CNotificationHOC.js @@ -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} > 取消 - 确定 + {this.props.okText || '确定'} } diff --git a/public/react/src/modules/user/account/AccountCertification.js b/public/react/src/modules/user/account/AccountCertification.js index c809fadd5..455967398 100644 --- a/public/react/src/modules/user/account/AccountCertification.js +++ b/public/react/src/modules/user/account/AccountCertification.js @@ -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 {
{ basicInfo && basicInfo.authentication =="uncertified" ? - this.showRealNameCertificationModal(1)} >立即认证: + this.checkBasicInfo(1)} >立即认证: basicInfo && basicInfo.authentication =="applying" ? 待审核: 已认证 } @@ -80,7 +94,7 @@ class AccountCertification extends Component {
{ basicInfo && basicInfo.professional_certification =="uncertified" ? - this.showRealNameCertificationModal(2)} >立即认证: + this.checkBasicInfo(2)} >立即认证: basicInfo && basicInfo.professional_certification =="applying" ? 待审核: 已认证 }