播放页面优化

This commit is contained in:
禺狨 2023-07-03 16:02:18 +08:00
parent 9e4ac812ff
commit c5b8cc24e6
3 changed files with 8 additions and 14 deletions

View File

@ -179,11 +179,11 @@ const CoursePlayPage = () => {
window.player.seek(playRef.current); window.player.seek(playRef.current);
return; return;
} }
exitFullscreen();
window.player && window.player.destroy();
setPlayingTime(0); setPlayingTime(0);
setPlayendedStatus(true); setPlayendedStatus(true);
playTimeUpdate(parseInt(window.player.video.currentTime), true); playTimeUpdate(parseInt(window.player.video.currentTime), true);
exitFullscreen();
window.player && window.player.destroy();
}); });
setLoading(false); setLoading(false);
}; };
@ -248,7 +248,9 @@ const CoursePlayPage = () => {
{isLastpage && ( {isLastpage && (
<div <div
className={styles["alert-button"]} className={styles["alert-button"]}
onClick={() => navigate(`/course/${params.courseId}`)} onClick={() => {
navigate(-1);
}}
> >
</div> </div>
@ -257,7 +259,6 @@ const CoursePlayPage = () => {
<div <div
className={styles["alert-button"]} className={styles["alert-button"]}
onClick={() => { onClick={() => {
window.player && window.player.destroy();
setLastSeeValue({}); setLastSeeValue({});
setPlayendedStatus(false); setPlayendedStatus(false);
goNextVideo(); goNextVideo();

View File

@ -87,6 +87,9 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-right: 34px; margin-right: 34px;
&:last-child {
margin-right: 0px;
}
.time { .time {
height: 20px; height: 20px;
font-size: 15px; font-size: 15px;

View File

@ -190,11 +190,6 @@ const MemberPage = () => {
{studyTimeFormat(stats.today_learn_duration)[2] || 0}{" "} {studyTimeFormat(stats.today_learn_duration)[2] || 0}{" "}
</strong> </strong>
<strong>
{" "}
{studyTimeFormat(stats.today_learn_duration)[3] || 0}{" "}
</strong>
</span> </span>
<span className={styles["tit"]}></span> <span className={styles["tit"]}></span>
</div> </div>
@ -222,11 +217,6 @@ const MemberPage = () => {
{studyTimeFormat(stats.learn_duration || 0)[2] || 0}{" "} {studyTimeFormat(stats.learn_duration || 0)[2] || 0}{" "}
</strong> </strong>
<strong>
{" "}
{studyTimeFormat(stats.learn_duration || 0)[3] || 0}{" "}
</strong>
</span> </span>
<span className={styles["tit"]}></span> <span className={styles["tit"]}></span>
</div> </div>