mirror of
https://github.com/PlayEdu/backend
synced 2025-06-29 09:12:49 +08:00
有章节课时编辑添加课时逻辑优化
This commit is contained in:
parent
b5d66b4a06
commit
425033f672
@ -84,16 +84,11 @@ export const CourseAttachmentUpdate: React.FC<PropInterface> = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
courseAttachment
|
courseAttachment.storeCourseAttachmentMulti(id, hours).then((res: any) => {
|
||||||
.storeCourseAttachmentMulti(id, hours)
|
console.log("ok");
|
||||||
.then((res: any) => {
|
setAttachmentVisible(false);
|
||||||
console.log("ok");
|
getDetail();
|
||||||
setAttachmentVisible(false);
|
});
|
||||||
getDetail();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
message.error(err.message);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const delAttachments = (hid: number) => {
|
const delAttachments = (hid: number) => {
|
||||||
|
@ -120,16 +120,11 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
message.error("请选择视频");
|
message.error("请选择视频");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
courseHour
|
courseHour.storeCourseHourMulti(id, hours).then((res: any) => {
|
||||||
.storeCourseHourMulti(id, hours)
|
console.log("ok");
|
||||||
.then((res: any) => {
|
setVideoVisible(false);
|
||||||
console.log("ok");
|
getDetail();
|
||||||
setVideoVisible(false);
|
});
|
||||||
getDetail();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
message.error(err.message);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectChapterData = (arr: any, videos: any) => {
|
const selectChapterData = (arr: any, videos: any) => {
|
||||||
@ -153,16 +148,11 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
message.error("请选择视频");
|
message.error("请选择视频");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
courseHour
|
courseHour.storeCourseHourMulti(id, hours).then((res: any) => {
|
||||||
.storeCourseHourMulti(id, hours)
|
console.log("ok");
|
||||||
.then((res: any) => {
|
setVideoVisible(false);
|
||||||
console.log("ok");
|
getDetail();
|
||||||
setVideoVisible(false);
|
});
|
||||||
getDetail();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
message.error(err.message);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const delHour = (hid: number) => {
|
const delHour = (hid: number) => {
|
||||||
@ -245,9 +235,6 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
console.log("ok");
|
console.log("ok");
|
||||||
getDetail();
|
getDetail();
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
message.error(err.message);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
courseChapter
|
courseChapter
|
||||||
@ -255,9 +242,6 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
console.log("ok");
|
console.log("ok");
|
||||||
getDetail();
|
getDetail();
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
message.error(err.message);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -279,9 +263,6 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
console.log("ok");
|
console.log("ok");
|
||||||
getDetail();
|
getDetail();
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
message.error(err.message);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user