认证上传附件

issues25489
caishi 5 years ago
parent 533539c729
commit f56d073415

@ -44,6 +44,7 @@ class RealNameCertificationModal extends Component{
this.state={
identity:"teacher",
departmentsName:undefined,
fileID:undefined,
filterSchoolList:undefined,
filterDepartments :undefined,
school:undefined,
@ -269,7 +270,8 @@ class RealNameCertificationModal extends Component{
axios.post((url),{
name:values.name || basicInfo.name,
gender:parseInt(values.sex),
id_number:values.credentials
id_number:values.credentials,
attachment_ids:[this.state.fileID]
}).then((result)=>{
if(result){
this.props.showNotification("申请已提交,请等待审核!");
@ -295,7 +297,8 @@ class RealNameCertificationModal extends Component{
school_id:this.state.school_id,
department_id:this.state.department_id,
identity:this.state.identity,
extra: values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2
extra: values.job == "student" ? values.student_No : values.job == "teacher" ? values.job1 : values.job2,
attachment_ids:[this.state.fileID]
}).then((result)=>{
if(result){
this.props.showNotification("申请已提交,请等待审核!");
@ -327,20 +330,7 @@ class RealNameCertificationModal extends Component{
const { course_lists, checkBoxValues } = this.state
this.onSendOk()
}
handleChange = (info) => {
if (info.file.status === 'uploading') {
this.setState({ loading: true });
return;
}
if (info.file.status === 'done') {
// Get this url from response in real world.
getBase64(info.file.originFileObj, imageUrl => this.setState({
imageUrl,
loading: false,
}));
}
}
handleChange2 = (info) => {
if (info.file.status === 'uploading') {
this.setState({ loading: true });
@ -348,9 +338,11 @@ class RealNameCertificationModal extends Component{
}
if (info.file.status === 'done') {
// Get this url from response in real world.
console.log(info.file.response);
getBase64(info.file.originFileObj, imageUrl2 => this.setState({
imageUrl2,
loading: false,
fileID:info.file.response && info.file.response.id
}));
}
}

Loading…
Cancel
Save