|
@@ -123,7 +123,7 @@ import { getLessonCourseDetail_gym, getLessonCoursewareDetail_gyt, getLessonCour
|
|
|
import { checkWebCourse_gyt } from "@/api/coursewarePlay.api"
|
|
|
import { httpAjaxErrMsg, httpAjaxLoadingErrMsg } from "@/plugin/httpAjax"
|
|
|
import userStore from "@/store/modules/user"
|
|
|
-import { useRoute } from "vue-router"
|
|
|
+import { useRoute, useRouter } from "vue-router"
|
|
|
import { shallowRef, ref, computed, onUnmounted, onMounted, watch, nextTick } from "vue"
|
|
|
import { ElMessageBox } from "element-plus"
|
|
|
import courseCollapse from "./components/courseCollapse"
|
|
@@ -133,8 +133,10 @@ import useDialogConfirm from "@/hooks/useDialogConfirm"
|
|
|
import { getRecentCourseSchedule_gym } from "@/api/homePage.api"
|
|
|
import { getToken } from "@/libs/auth"
|
|
|
import { URL_TEACH_GYT, URL_TEACH_GYM, URL_TEACH_KLX } from "@/config"
|
|
|
+import { handleFullscreen } from "@/libs/fullscreen"
|
|
|
|
|
|
const route = useRoute()
|
|
|
+const router = useRouter()
|
|
|
const userStoreHook = userStore()
|
|
|
// 批注
|
|
|
const penShow = ref(false)
|
|
@@ -228,7 +230,7 @@ function handlePointList(pointList: any[]) {
|
|
|
// 如果url里面有materialId 代表指定资料播放
|
|
|
if (route.query.materialId) {
|
|
|
const index = flattenCoursewareListData.findIndex((item: any) => {
|
|
|
- return route.query.materialId === item.id + ""
|
|
|
+ return route.query.materialId === item.id + "" && route.query.knowledgePointId === item.knowledgePointId + ""
|
|
|
})
|
|
|
index > -1 && (activeCoursewareIndex.value = index)
|
|
|
}
|
|
@@ -265,7 +267,7 @@ function handleChangeCourseware(index: -1 | 1) {
|
|
|
}
|
|
|
function handleCourseClick(value: any) {
|
|
|
activeCoursewareIndex.value = flattenCoursewareList.value.findIndex((item: any) => {
|
|
|
- return value.id === item.id && value.parentData === item.parentData
|
|
|
+ return value.id === item.id && value.knowledgePointId === item.knowledgePointId
|
|
|
})
|
|
|
}
|
|
|
/* 播放器相关 */
|
|
@@ -292,6 +294,9 @@ function handlePlayVideo({ src, name }: { src: string; name: string }) {
|
|
|
})
|
|
|
showController()
|
|
|
}
|
|
|
+
|
|
|
+// 全屏显示
|
|
|
+handleFullscreen(true, false)
|
|
|
/* 按键事件相关 */
|
|
|
onMounted(() => {
|
|
|
document.addEventListener("keydown", handleKeydown)
|
|
@@ -345,8 +350,9 @@ function hideController() {
|
|
|
}
|
|
|
/* 结束课程 */
|
|
|
function handleGoBack() {
|
|
|
- window.open("about:blank", "_self")
|
|
|
- window.close()
|
|
|
+ // window.open("about:blank", "_self")
|
|
|
+ // window.close()
|
|
|
+ router.go(-1)
|
|
|
}
|
|
|
function handleCoursewareEnd() {
|
|
|
if (route.query.modeId) {
|