mirror of
https://github.com/PlayEdu/backend
synced 2025-06-18 07:06:57 +08:00
线上课编辑优化
This commit is contained in:
parent
6eb8cb5c60
commit
40cb7ac0ab
@ -110,7 +110,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
}
|
}
|
||||||
let box2 = res.data.category_ids;
|
let box2 = res.data.category_ids;
|
||||||
let categoryIds: any[] = [];
|
let categoryIds: any[] = [];
|
||||||
if (box2.length > 1) {
|
if (box2.length > 0) {
|
||||||
for (let i = 0; i < box2.length; i++) {
|
for (let i = 0; i < box2.length; i++) {
|
||||||
let item = checkChild(cats, box2[i]);
|
let item = checkChild(cats, box2[i]);
|
||||||
let arr: any[] = [];
|
let arr: any[] = [];
|
||||||
@ -222,14 +222,17 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
dep_ids.push(values.dep_ids[i][values.dep_ids[i].length - 1]);
|
dep_ids.push(values.dep_ids[i][values.dep_ids[i].length - 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let category_ids: any[] = [];
|
let category_ids: any[] = [];
|
||||||
for (let j = 0; j < values.category_ids.length; j++) {
|
for (let j = 0; j < values.category_ids.length; j++) {
|
||||||
category_ids.push(
|
category_ids.push(
|
||||||
values.category_ids[j][values.category_ids[j].length - 1]
|
values.category_ids[j][values.category_ids[j].length - 1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
course
|
course
|
||||||
.storeCourse(
|
.updateCourse(
|
||||||
|
id,
|
||||||
values.title,
|
values.title,
|
||||||
values.thumb,
|
values.thumb,
|
||||||
1,
|
1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user