diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js index 1d772e0f3..f27df7101 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js @@ -93,11 +93,11 @@ class CompetitionContentspdfpeopledata extends Component { } - getdata = () => { + getdata = (id) => { this.setState({ certification: 3 }) - let url = `/users/accounts/${this.props.current_user.login}.json`; + let url = `/users/accounts/${id}.json`; axios.get(url).then((result) => { if (result.data) { if (result.data && result.data.base_info_completed == false) { diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js index 17220aa4e..3826405d6 100644 --- a/public/react/src/modules/user/modal/RealNameCertificationModal.js +++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js @@ -266,7 +266,14 @@ class RealNameCertificationModal extends Component{ let { certification } = this.props; if(certification == 1){ // 实名认证 - let url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json` + let url=""; + if( basicInfo===undefined){ + url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json`; + + }else { + url = `/users/accounts/${basicInfo && basicInfo.id}/authentication_apply.json`; + } + axios.post((url),{ name:this.state.realName || basicInfo.name, gender:parseInt(values.sex), @@ -293,7 +300,12 @@ class RealNameCertificationModal extends Component{ }else{ // 职业认证 // console.log(values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2); - let url = `/users/accounts/${current_user && current_user.login}/professional_auth_apply.json` + let url=""; + if( basicInfo===undefined){ + url = `/users/accounts/${current_user && current_user.login}/professional_auth_apply.json`; + }else { + url = `/users/accounts/${basicInfo && basicInfo.id}/authentication_apply.json`; + } axios.post((url),{ school_id:this.state.school_id, department_id:this.state.department_id, @@ -331,7 +343,7 @@ class RealNameCertificationModal extends Component{ const { course_lists, checkBoxValues } = this.state this.onSendOk() } - + handleChange2 = (info) => { if (info.file.status === 'uploading') { this.setState({ loading: true }); @@ -693,7 +705,7 @@ class RealNameCertificationModal extends Component{ :