mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-28 20:42:51 +08:00
课程学习pingAPI请求
This commit is contained in:
parent
b45c7932ce
commit
7afb99751f
@ -17,6 +17,11 @@ export function record(courseId: number, hourId: number, duration: number) {
|
||||
});
|
||||
}
|
||||
|
||||
//观看ping
|
||||
export function playPing(courseId: number, hourId: number) {
|
||||
return client.get(`/api/v1/course/${courseId}/hour/${hourId}/ping`, {});
|
||||
}
|
||||
|
||||
//最近学习课程
|
||||
export function latestLearn() {
|
||||
return client.get(`/api/v1/user/latest-learn`, {});
|
||||
|
@ -74,6 +74,7 @@ export const VideoModel: React.FC<PropInterface> = ({
|
||||
if (duration - myRef.current >= 10 || isEnd === true) {
|
||||
setPlayDuration(duration);
|
||||
course.record(cid, id, duration).then((res: any) => {});
|
||||
course.playPing(cid, id).then((res: any) => {});
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user