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