mirror of
https://github.com/PlayEdu/backend
synced 2025-07-19 11:39:35 +08:00
线上课添加、编辑增加简介字段
This commit is contained in:
parent
092cf2f69e
commit
9fc6e79b3d
@ -29,6 +29,7 @@ export function createCourse() {
|
|||||||
export function storeCourse(
|
export function storeCourse(
|
||||||
title: string,
|
title: string,
|
||||||
thumb: string,
|
thumb: string,
|
||||||
|
shortDesc: string,
|
||||||
isShow: number,
|
isShow: number,
|
||||||
isRequired: number,
|
isRequired: number,
|
||||||
depIds: number[],
|
depIds: number[],
|
||||||
@ -39,6 +40,7 @@ export function storeCourse(
|
|||||||
return client.post("/backend/v1/course/create", {
|
return client.post("/backend/v1/course/create", {
|
||||||
title: title,
|
title: title,
|
||||||
thumb: thumb,
|
thumb: thumb,
|
||||||
|
short_desc: shortDesc,
|
||||||
is_show: isShow,
|
is_show: isShow,
|
||||||
is_required: isRequired,
|
is_required: isRequired,
|
||||||
dep_ids: depIds,
|
dep_ids: depIds,
|
||||||
@ -56,6 +58,7 @@ export function updateCourse(
|
|||||||
id: number,
|
id: number,
|
||||||
title: string,
|
title: string,
|
||||||
thumb: string,
|
thumb: string,
|
||||||
|
shortDesc: string,
|
||||||
isShow: number,
|
isShow: number,
|
||||||
isRequired: number,
|
isRequired: number,
|
||||||
depIds: number[],
|
depIds: number[],
|
||||||
@ -66,6 +69,7 @@ export function updateCourse(
|
|||||||
return client.put(`/backend/v1/course/${id}`, {
|
return client.put(`/backend/v1/course/${id}`, {
|
||||||
title: title,
|
title: title,
|
||||||
thumb: thumb,
|
thumb: thumb,
|
||||||
|
short_desc: shortDesc,
|
||||||
is_show: isShow,
|
is_show: isShow,
|
||||||
is_required: isRequired,
|
is_required: isRequired,
|
||||||
dep_ids: depIds,
|
dep_ids: depIds,
|
||||||
|
@ -62,7 +62,7 @@ export const CourseCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
category_ids: [],
|
category_ids: [],
|
||||||
type: "open",
|
type: "open",
|
||||||
isRequired: 1,
|
isRequired: 1,
|
||||||
desc: "",
|
short_desc: "",
|
||||||
hasChapter: 0,
|
hasChapter: 0,
|
||||||
});
|
});
|
||||||
setThumb(defaultThumb1);
|
setThumb(defaultThumb1);
|
||||||
@ -129,6 +129,7 @@ export const CourseCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
.storeCourse(
|
.storeCourse(
|
||||||
values.title,
|
values.title,
|
||||||
values.thumb,
|
values.thumb,
|
||||||
|
values.short_desc,
|
||||||
1,
|
1,
|
||||||
values.isRequired,
|
values.isRequired,
|
||||||
dep_ids,
|
dep_ids,
|
||||||
@ -496,7 +497,7 @@ export const CourseCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="课程简介" name="desc">
|
<Form.Item label="课程简介" name="short_desc">
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
style={{ width: 424, height: 80 }}
|
style={{ width: 424, height: 80 }}
|
||||||
allowClear
|
allowClear
|
||||||
|
@ -138,7 +138,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
category_ids: categoryIds,
|
category_ids: categoryIds,
|
||||||
isRequired: res.data.course.isRequired,
|
isRequired: res.data.course.isRequired,
|
||||||
type: type,
|
type: type,
|
||||||
desc: "",
|
short_desc: res.data.course.short_desc,
|
||||||
hasChapter: chapterType,
|
hasChapter: chapterType,
|
||||||
});
|
});
|
||||||
setType(type);
|
setType(type);
|
||||||
@ -242,6 +242,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
id,
|
id,
|
||||||
values.title,
|
values.title,
|
||||||
values.thumb,
|
values.thumb,
|
||||||
|
values.short_desc,
|
||||||
1,
|
1,
|
||||||
values.isRequired,
|
values.isRequired,
|
||||||
dep_ids,
|
dep_ids,
|
||||||
@ -609,7 +610,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="课程简介" name="desc">
|
<Form.Item label="课程简介" name="short_desc">
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
style={{ width: 424, height: 80 }}
|
style={{ width: 424, height: 80 }}
|
||||||
allowClear
|
allowClear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user