hjm 5 years ago
commit f2f1420c86

@ -55,7 +55,7 @@ class GraduationTasksnew extends Component {
for (var list of fileList) { for (var list of fileList) {
listid.push(list.response.id) listid.push(list.response.id)
} }
if (GraduationTasksnewtype === true) { // if (GraduationTasksnewtype === true) {
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) { if (!err) {
if (values.tasktype === undefined) { if (values.tasktype === undefined) {
@ -87,18 +87,20 @@ class GraduationTasksnew extends Component {
attachment_ids: listid, attachment_ids: listid,
} }
).then((response) => { ).then((response) => {
if (response.status === 200) { // if (response.status === 200) {
GraduationTasksnewtype = false; // GraduationTasksnewtype = false;
// this.goback(); // this.goback();
if(response!==undefined){
this.props.history.push("/courses/" + this.props.match.params.coursesId + "/graduation_tasks/" + this.props.match.params.category_id + "/" + response.data.task_id + "/setting"); this.props.history.push("/courses/" + this.props.match.params.coursesId + "/graduation_tasks/" + this.props.match.params.category_id + "/" + response.data.task_id + "/setting");
} }
// }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
} }
}); });
} // }
} }
@ -392,7 +394,7 @@ class GraduationTasksnew extends Component {
> >
{getFieldDecorator('description', { {getFieldDecorator('description', {
rules: [{ rules: [{
required: true, message: '请输入帖子内容', required: true, message: '请输入内容',
}, { }, {
max: 5000, message: '最大限制为5000个字符', max: 5000, message: '最大限制为5000个字符',
}], }],

Loading…
Cancel
Save