diff --git a/web/src/pages/course/detail/index.tsx b/web/src/pages/course/detail/index.tsx index c59d0a6..3f125ca 100644 --- a/web/src/pages/course/detail/index.tsx +++ b/web/src/pages/course/detail/index.tsx @@ -17,14 +17,13 @@ import VideoJS from '../components/VideoJS'; const { Paragraph } = Typography; const CardList = () => { + + const params = useParams(); + const ids = params.msg.split(',');//chapter_id,course_id,subject_id const [currentLearning, SetCurrentLearning] = useState(); - const [courseId, SetCourseId] = useState(); + const [courseId, SetCourseId] = useState(ids[1]); let time=0; const videoRef = useRef(null); - const params = useParams(); - const ids = params.msg.split(',');//chapter_id,course_id,subject_id - - console.log('courseIdcourseIdcourseIdcourseId',courseId) /** 获取课节 */ @@ -139,7 +138,8 @@ const CardList = () => { @@ -196,13 +196,13 @@ const CardList = () => { - { - const data = videoRef?.current?.currentTime(); + { + const data = videoRef?.current?.currentTime(); console.log('getData', data) - }}>videoRef get + }}>videoRef get - { - const data = videoRef?.current?.currentTime(300); + { + const data = videoRef?.current?.currentTime(300); console.log('setData', data) }}>videoRef set diff --git a/web/src/pages/dashboard/workplace/index.tsx b/web/src/pages/dashboard/workplace/index.tsx index 6bb09fe..4c9f021 100644 --- a/web/src/pages/dashboard/workplace/index.tsx +++ b/web/src/pages/dashboard/workplace/index.tsx @@ -260,26 +260,49 @@ const Workplace: FC = () => { position: 'top-center', }} point={{ size: 5 }} + tooltip={{ + customContent: (title: any, items: any): any => { + console.log('title',title); + console.log('items',items); + return( +
+
{title}
+
学习时长:{items[0]?items[0].data.learning_minutes:''}
+ +
+ + ) + } + }} /> - } - cover={} + { + JSON.stringify(lastLearningList)!=='{}'? + } + cover={} > - - {lastLearningList?.lecture_teacher} - {lastLearningList?.chapter_name} - {lastLearningList?.subject_name} - {lastLearningList?.total_course_minutes}分钟 - - + + {lastLearningList?.lecture_teacher} + {lastLearningList?.chapter_name} + {lastLearningList?.subject_name} + {lastLearningList?.total_course_minutes}分钟 + + + :
暂无数据
+ }