|
|
@@ -1,7 +1,7 @@
|
|
|
//课程详情页面
|
|
|
-import { useParams } from "react-router-dom";
|
|
|
+import { Link, useParams } from "react-router-dom";
|
|
|
import { useEffect, useState } from "react";
|
|
|
-import { Divider, message } from "antd";
|
|
|
+import { Breadcrumb, Divider, message } from "antd";
|
|
|
|
|
|
import CourseShow from "../../../components/library/course/CourseShow";
|
|
|
import CourseIntro from "../../../components/library/course/CourseIntro";
|
|
|
@@ -11,15 +11,16 @@ import { IUser } from "../../../components/auth/User";
|
|
|
import { get } from "../../../request";
|
|
|
import { ICourseResponse } from "../../../components/api/Course";
|
|
|
|
|
|
-interface ICourse {
|
|
|
+export interface ICourse {
|
|
|
id: string; //课程ID
|
|
|
title: string; //标题
|
|
|
subtitle?: string; //副标题
|
|
|
teacher?: IUser; //UserID
|
|
|
- privacy: number; //公开性-公开/内部
|
|
|
- createdAt: string; //创建时间
|
|
|
+ privacy?: number; //公开性-公开/内部
|
|
|
+ createdAt?: string; //创建时间
|
|
|
updatedAt?: string; //修改时间
|
|
|
anthologyId?: string; //文集ID
|
|
|
+ channelId?: string;
|
|
|
startAt?: string; //课程开始时间
|
|
|
endAt?: string; //课程结束时间
|
|
|
intro?: string; //简介
|
|
|
@@ -42,6 +43,7 @@ const Widget = () => {
|
|
|
createdAt: json.data.created_at,
|
|
|
updatedAt: json.data.updated_at,
|
|
|
anthologyId: json.data.anthology_id,
|
|
|
+ channelId: json.data.channel_id,
|
|
|
startAt: json.data.start_at,
|
|
|
endAt: json.data.end_at,
|
|
|
intro: json.data.content,
|
|
|
@@ -59,7 +61,10 @@ const Widget = () => {
|
|
|
<Divider />
|
|
|
<CourseIntro {...courseInfo} />
|
|
|
<Divider />
|
|
|
- <TextBook anthologyId={courseInfo?.anthologyId} />
|
|
|
+ <TextBook
|
|
|
+ anthologyId={courseInfo?.anthologyId}
|
|
|
+ courseId={courseInfo?.id}
|
|
|
+ />
|
|
|
</div>
|
|
|
);
|
|
|
};
|