mirror of
https://github.com/PlayEdu/backend
synced 2025-06-29 02:32:51 +08:00
编辑线上课增加上架时间属性
This commit is contained in:
parent
d4c8032b2d
commit
34ab5aa282
@ -97,7 +97,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
short_desc: res.data.course.short_desc,
|
short_desc: res.data.course.short_desc,
|
||||||
hasChapter: chapterType,
|
hasChapter: chapterType,
|
||||||
published_at: res.data.published_at
|
published_at: res.data.published_at
|
||||||
? dayjs(res.data.published_at, "YYYY-MM-DD HH:mm")
|
? dayjs(res.data.published_at, "YYYY-MM-DD HH:mm:ss")
|
||||||
: "",
|
: "",
|
||||||
});
|
});
|
||||||
setType(type);
|
setType(type);
|
||||||
@ -152,9 +152,6 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
if (type === "elective") {
|
if (type === "elective") {
|
||||||
dep_ids = values.dep_ids;
|
dep_ids = values.dep_ids;
|
||||||
}
|
}
|
||||||
values.published_at = moment(new Date(values.published_at)).format(
|
|
||||||
"YYYY-MM-DD HH:mm"
|
|
||||||
);
|
|
||||||
course
|
course
|
||||||
.updateCourse(
|
.updateCourse(
|
||||||
id,
|
id,
|
||||||
@ -401,7 +398,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
rules={[{ required: true, message: "请选择上架时间!" }]}
|
rules={[{ required: true, message: "请选择上架时间!" }]}
|
||||||
>
|
>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
format="YYYY-MM-DD HH:mm"
|
format="YYYY-MM-DD HH:mm:ss"
|
||||||
style={{ width: 240 }}
|
style={{ width: 240 }}
|
||||||
showTime
|
showTime
|
||||||
placeholder="请选择上架时间"
|
placeholder="请选择上架时间"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user