mirror of
https://github.com/PlayEdu/backend
synced 2025-07-23 10:29:34 +08:00
线上课编辑优化
This commit is contained in:
parent
40cb7ac0ab
commit
486deb36f0
@ -88,6 +88,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
||||
course.course(id).then((res: any) => {
|
||||
let box = res.data.dep_ids;
|
||||
let depIds: any[] = [];
|
||||
let type = res.data.dep_ids.length > 0 ? "elective" : "open";
|
||||
if (box.length > 1) {
|
||||
for (let i = 0; i < box.length; i++) {
|
||||
let item = checkChild(deps, box[i]);
|
||||
@ -136,10 +137,11 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
||||
thumb: res.data.course.thumb,
|
||||
dep_ids: depIds,
|
||||
category_ids: categoryIds,
|
||||
type: "open",
|
||||
type: type,
|
||||
desc: "",
|
||||
hasChapter: chapterType,
|
||||
});
|
||||
setType(type);
|
||||
setThumb(res.data.course.thumb);
|
||||
setChapterType(chapterType);
|
||||
if (chapterType === 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user