|
@@ -9,9 +9,10 @@ import {
|
|
|
watch,
|
|
|
Transition,
|
|
|
computed,
|
|
|
- onBeforeUnmount
|
|
|
+ onBeforeUnmount,
|
|
|
+ shallowRef
|
|
|
} from 'vue'
|
|
|
-import iconBack from './image/back.svg'
|
|
|
+import iconBack from './image/back.png'
|
|
|
import styles from './index.module.less'
|
|
|
import 'plyr/dist/plyr.css'
|
|
|
import request from '@/helpers/request'
|
|
@@ -20,15 +21,15 @@ import { useRoute } from 'vue-router'
|
|
|
import { listenerMessage, postMessage, promisefiyPostMessage } from '@/helpers/native-message'
|
|
|
import qs from 'query-string'
|
|
|
import MusicScore from './component/musicScore'
|
|
|
-import iconDian from './image/icon-dian.svg'
|
|
|
-import iconPoint from './image/icon-point.svg'
|
|
|
-import { iconUp, iconDown, iconPen, iconTouping, iconMenu } from './image/icons.json'
|
|
|
+// import iconDian from './image/icon-dian.svg'
|
|
|
+// import iconPoint from './image/icon-point.svg'
|
|
|
+import { iconUp, iconDown, iconPen, iconTouping, iconMenu, iconCourseType } from './image/icons.json'
|
|
|
import Points from './component/points'
|
|
|
import { browser } from '@/helpers/utils'
|
|
|
import { Vue3Lottie } from 'vue3-lottie'
|
|
|
import playLoadData from './datas/data.json'
|
|
|
import { usePageVisibility } from '@vant/use'
|
|
|
-import { useInterval, useIntervalFn } from '@vueuse/core'
|
|
|
+import { useInterval, useIntervalFn, useNetwork } from '@vueuse/core'
|
|
|
import PlayRecordTime from './playRecordTime'
|
|
|
import { handleCheckVip } from '../hook/useFee'
|
|
|
import OGuide from '@/components/o-guide'
|
|
@@ -37,11 +38,16 @@ import Pen from './component/tools/pen'
|
|
|
import VideoItem from './component/video-item'
|
|
|
import deepClone from '@/helpers/deep-clone'
|
|
|
import VideoPlay from './component/video-play'
|
|
|
+import CoursewareType from './component/courseware-type'
|
|
|
+import CoursewareTips from './component/courseware-tips'
|
|
|
+import GlobalTools from '@/components/globalTools'
|
|
|
+import { isPlay, penShow, toolOpen, whitePenShow } from '@/components/globalTools/globalTools'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'CoursewarePlay',
|
|
|
setup() {
|
|
|
const pageVisibility = usePageVisibility()
|
|
|
+ const { isOnline } = useNetwork()
|
|
|
/** 页面显示和隐藏 */
|
|
|
watch(
|
|
|
() => pageVisibility.value,
|
|
@@ -68,7 +74,7 @@ export default defineComponent({
|
|
|
}
|
|
|
const handleInit = (type = 0) => {
|
|
|
//设置容器16:9
|
|
|
- setContainer()
|
|
|
+ // setContainer()
|
|
|
// 横屏
|
|
|
postMessage(
|
|
|
{
|
|
@@ -111,7 +117,9 @@ export default defineComponent({
|
|
|
|
|
|
const route = useRoute()
|
|
|
const headeRef = ref()
|
|
|
+ const isCurrentCoursewareMenu = shallowRef(true) // 是否为当前选的课程类型
|
|
|
const data = reactive({
|
|
|
+ currentId: route.query.id as any,
|
|
|
detail: null as any,
|
|
|
knowledgePointList: [] as any,
|
|
|
itemList: [] as any,
|
|
@@ -120,7 +128,7 @@ export default defineComponent({
|
|
|
isCourse: false,
|
|
|
isRecordPlay: false,
|
|
|
videoRefs: {},
|
|
|
-
|
|
|
+ refLevelList: [] as any,
|
|
|
videoState: 'init' as 'init' | 'play',
|
|
|
videoItemRef: null as any,
|
|
|
animationState: 'start' as 'start' | 'end',
|
|
@@ -272,15 +280,17 @@ export default defineComponent({
|
|
|
}, 500)
|
|
|
})
|
|
|
}
|
|
|
- const getDetail = async () => {
|
|
|
+ const getDetail = async (id?: any) => {
|
|
|
try {
|
|
|
const res: any = await request.get(
|
|
|
- state.platformApi + `/lessonCoursewareDetail/detail/${route.query.id}`,
|
|
|
+ state.platformApi + `/lessonCoursewareDetail/detail/${id || route.query.id}`,
|
|
|
{
|
|
|
hideLoading: true
|
|
|
}
|
|
|
)
|
|
|
- data.detail = res.data
|
|
|
+ const result = res.data || {}
|
|
|
+ result.lessonTargetDesc = result.lessonTargetDesc ? result.lessonTargetDesc.replace(/\n/g, "<br />") : ""
|
|
|
+ data.detail = result;
|
|
|
if (res?.data?.lockFlag) {
|
|
|
postMessage({
|
|
|
api: 'courseLoading',
|
|
@@ -336,11 +346,24 @@ export default defineComponent({
|
|
|
})
|
|
|
getItemList()
|
|
|
}
|
|
|
+ return true
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const onTitleTip = (type: "phaseGoals" | "checkItem", text: string) => {
|
|
|
+ handleStop()
|
|
|
+ popupData.pointOpen = true
|
|
|
+ popupData.pointContent = text
|
|
|
+ if(type === "checkItem") {
|
|
|
+ popupData.pointTitle = '检查事项'
|
|
|
+ } else if(type === "phaseGoals") {
|
|
|
+ popupData.pointTitle = '阶段目标'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// ifram事件处理
|
|
|
const iframeHandle = (ev: MessageEvent) => {
|
|
|
if (ev.data?.api === 'headerTogge') {
|
|
@@ -443,12 +466,31 @@ export default defineComponent({
|
|
|
//
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ const getRefLevel = async (id?: any) => {
|
|
|
+ try {
|
|
|
+ const res = await request.post(state.platformApi + '/lessonCoursewareDetail/refLevel', {
|
|
|
+ data: {
|
|
|
+ lessonCoursewareDetailId: id || route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ data.refLevelList = res.data || []
|
|
|
+ return true
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
await sysParamConfig()
|
|
|
|
|
|
if (state.platformType === 'STUDENT') {
|
|
|
await getLookVideoData()
|
|
|
}
|
|
|
+ // 只有老师有 课程类型 切换
|
|
|
+ if(state.platformType === "TEACHER") {
|
|
|
+ await getRefLevel()
|
|
|
+ }
|
|
|
await getDetail()
|
|
|
const hasFree = String(data.detail?.accessScope) === '0'
|
|
|
if (!hasFree) {
|
|
@@ -507,6 +549,10 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const popupData = reactive({
|
|
|
+ pointOpen: false,
|
|
|
+ pointContent: "",
|
|
|
+ pointTitle: "",
|
|
|
+ coursewareOpen: false,
|
|
|
open: false,
|
|
|
activeIndex: 0,
|
|
|
playIndex: 0,
|
|
@@ -855,6 +901,28 @@ export default defineComponent({
|
|
|
}
|
|
|
)
|
|
|
|
|
|
+ // 白板的批注打开时暂停播放
|
|
|
+ watch(
|
|
|
+ () => [whitePenShow.value, penShow.value],
|
|
|
+ () => {
|
|
|
+ if (whitePenShow.value || penShow.value) {
|
|
|
+ handleStop()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ // 是否收起
|
|
|
+ watch(
|
|
|
+ () => activeData.model,
|
|
|
+ () => {
|
|
|
+ if (activeData.model) {
|
|
|
+ isPlay.value = false
|
|
|
+ } else {
|
|
|
+ isPlay.value = true
|
|
|
+ toolOpen.value = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+
|
|
|
/**
|
|
|
* 初始化视频时长
|
|
|
* @param newVal 播放状态
|
|
@@ -965,59 +1033,10 @@ export default defineComponent({
|
|
|
zIndex: 15,
|
|
|
opacity: 1
|
|
|
}
|
|
|
- : { opacity: 0, zIndex: -1, pointerEvents: "none" }
|
|
|
+ : { opacity: 0, zIndex: -1, pointerEvents: 'none' }
|
|
|
}
|
|
|
class={styles.itemDiv}
|
|
|
>
|
|
|
- {/* <VideoItem
|
|
|
- ref={(el: any) => (data.videoItemRef = el)}
|
|
|
- item={activeVideoItem.value}
|
|
|
- activeModel={activeData.model}
|
|
|
- onClose={setModelOpen}
|
|
|
- onPlay={() => {
|
|
|
- data.videoState = 'play'
|
|
|
-
|
|
|
- // 设置视频时长
|
|
|
- const videoTime = data.videoItemRef.getPlyrRef().duration || 0
|
|
|
- data.itemList[popupData.activeIndex].videoTime = Math.floor(videoTime)
|
|
|
- }}
|
|
|
- onPause={() => {
|
|
|
- clearTimeout(activeData.timer)
|
|
|
- activeData.model = true
|
|
|
- videoIntervalRef.pause()
|
|
|
- }}
|
|
|
- onEnded={async () => {
|
|
|
- const _index = popupData.activeIndex + 1
|
|
|
- if (_index < data.itemList.length) {
|
|
|
- handleSwipeChange(_index)
|
|
|
- } else {
|
|
|
- // 说明是最后一个
|
|
|
- intervalFnRef.value.pause()
|
|
|
- // 同步数据时先进行有效时间进行保存
|
|
|
- initVideoCount(false, true)
|
|
|
- await updateStat()
|
|
|
- }
|
|
|
- }}
|
|
|
- onSeeked={() => {
|
|
|
- videoIntervalRef.isActive.value && videoIntervalRef.pause()
|
|
|
- }}
|
|
|
- onSeeking={() => {
|
|
|
- videoIntervalRef.isActive.value && videoIntervalRef.pause()
|
|
|
- }}
|
|
|
- onWaiting={() => {
|
|
|
- videoIntervalRef.isActive.value && videoIntervalRef.pause()
|
|
|
- }}
|
|
|
- onTimeupdate={() => {
|
|
|
- const activeVideoRef = data.videoItemRef?.getPlyrRef()
|
|
|
- if (
|
|
|
- !videoIntervalRef.isActive.value &&
|
|
|
- activeVideoRef?.currentTime > 0 &&
|
|
|
- activeVideoRef?.playing
|
|
|
- ) {
|
|
|
- videoIntervalRef.resume()
|
|
|
- }
|
|
|
- }}
|
|
|
- /> */}
|
|
|
<VideoPlay
|
|
|
ref={(el: any) => (data.videoItemRef = el)}
|
|
|
item={activeVideoItem.value}
|
|
@@ -1026,6 +1045,9 @@ export default defineComponent({
|
|
|
onPlay={() => {
|
|
|
data.videoState = 'play'
|
|
|
data.animationState = 'end'
|
|
|
+ if(whitePenShow.value || penShow.value || popupData.coursewareOpen || popupData.open || popupData.guideOpen || popupData.pointOpen) {
|
|
|
+ handleStop()
|
|
|
+ }
|
|
|
}}
|
|
|
onLoadedmetadata={(videoItem: any) => {
|
|
|
data.videoState = 'play'
|
|
@@ -1036,7 +1058,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
onPause={() => {
|
|
|
clearTimeout(activeData.timer)
|
|
|
- activeData.model = true
|
|
|
+ // activeData.model = true
|
|
|
videoIntervalRef.pause()
|
|
|
}}
|
|
|
onSeeked={() => {
|
|
@@ -1118,59 +1140,6 @@ export default defineComponent({
|
|
|
: {}
|
|
|
}
|
|
|
>
|
|
|
- {/* {m.type === 'VIDEO' && (
|
|
|
- <>
|
|
|
- <VideoPlay
|
|
|
- ref={(v: any) => (data.videoRefs[mIndex] = v)}
|
|
|
- item={m}
|
|
|
- isActive={activeEle}
|
|
|
- isEmtry={isEmtry}
|
|
|
- onPrepare={(val) => {
|
|
|
- m.isprepare = val
|
|
|
- }}
|
|
|
- onLoadedmetadata={(videoItem: any) => {
|
|
|
- m.videoEle = videoItem
|
|
|
- if (!m.isprepare) {
|
|
|
- m.isprepare = true
|
|
|
- }
|
|
|
- }}
|
|
|
- onTogglePlay={(paused: boolean) => {
|
|
|
- // console.log('播放切换', paused)
|
|
|
- if (!m.isprepare) {
|
|
|
- m.isprepare = true
|
|
|
- }
|
|
|
- m.autoPlay = false
|
|
|
- if (paused || popupData.open || popupData.guideOpen) {
|
|
|
- clearTimeout(activeData.timer)
|
|
|
- } else {
|
|
|
- setModelOpen()
|
|
|
- }
|
|
|
- }}
|
|
|
- onEnded={() => {
|
|
|
- const _index = popupData.activeIndex + 1
|
|
|
- if (_index < data.itemList.length) {
|
|
|
- handleSwipeChange(_index)
|
|
|
- }
|
|
|
- }}
|
|
|
- onReset={() => {
|
|
|
- if (!m.videoEle?.paused) {
|
|
|
- setModelOpen()
|
|
|
- }
|
|
|
- }}
|
|
|
- onError={() => {
|
|
|
- // 视屏异常
|
|
|
- m.error = true
|
|
|
- }}
|
|
|
- />
|
|
|
- <Transition name="van-fade">
|
|
|
- {!m.isprepare && (
|
|
|
- <div class={styles.loadWrap}>
|
|
|
- <Vue3Lottie animationData={playLoadData}></Vue3Lottie>
|
|
|
- </div>
|
|
|
- )}
|
|
|
- </Transition>
|
|
|
- </>
|
|
|
- )} */}
|
|
|
<Transition name="van-fade">
|
|
|
{m.type === 'VIDEO' &&
|
|
|
data.animationState !== 'end' &&
|
|
@@ -1226,87 +1195,37 @@ export default defineComponent({
|
|
|
)
|
|
|
})}
|
|
|
</div>
|
|
|
- <Transition name="right">
|
|
|
- {activeData.model && (
|
|
|
- <div
|
|
|
- class={styles.rightFixedBtns}
|
|
|
- onClick={(e: Event) => {
|
|
|
- e.stopPropagation()
|
|
|
- clearTimeout(activeData.timer)
|
|
|
- }}
|
|
|
- >
|
|
|
- <div class={styles.btnsWrap}>
|
|
|
- <div
|
|
|
- class={[styles.fullBtn, styles.point]}
|
|
|
- onClick={() => (popupData.open = true)}
|
|
|
- >
|
|
|
- <img src={iconMenu} />
|
|
|
- <span>知识点</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class={[styles.btnsWrap, styles.btnsBottom]}>
|
|
|
- {/* <div class={styles.fullBtn} onClick={() => (popupData.guideOpen = true)}>
|
|
|
- <img src={iconTouping} />
|
|
|
- <span>投屏</span>
|
|
|
- </div> */}
|
|
|
- {data.isCourse && (
|
|
|
- <>
|
|
|
- <div class={styles.fullBtn} onClick={() => gotoRollCall('student_roll_call')}>
|
|
|
- <img src={iconDian} />
|
|
|
- <span>点名</span>
|
|
|
- </div>
|
|
|
- <div class={styles.fullBtn} onClick={() => gotoRollCall('sign_out')}>
|
|
|
- <img src={iconPoint} />
|
|
|
- <span>签退</span>
|
|
|
- </div>
|
|
|
- </>
|
|
|
- )}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- )}
|
|
|
- </Transition>
|
|
|
|
|
|
<Transition name="left">
|
|
|
{activeData.model && (
|
|
|
<div class={styles.leftFixedBtns} onClick={(e: Event) => e.stopPropagation()}>
|
|
|
- {popupData.activeIndex != 0 && (
|
|
|
- <div class={[styles.btnsWrap, styles.prePoint]}>
|
|
|
+ <div class={[styles.btnsWrap, styles.prePoint]}>
|
|
|
+ <div class={styles.fullBtn} onClick={() => (popupData.coursewareOpen = true)}>
|
|
|
+ <img src={iconCourseType} />
|
|
|
+ </div>
|
|
|
+ <div class={styles.fullBtn} onClick={() => (popupData.open = true)}>
|
|
|
+ <img src={iconMenu} />
|
|
|
+ {/* <span>知识点</span> */}
|
|
|
+ </div>
|
|
|
<div
|
|
|
- class={styles.fullBtn}
|
|
|
+ class={[styles.fullBtn, !(popupData.activeIndex != 0) && styles.disabled]}
|
|
|
onClick={() => {
|
|
|
- // useThrottleFn(() => {
|
|
|
- // handlePreAndNext('up')
|
|
|
- // }, 300)
|
|
|
- // onChangeSwiper('up')
|
|
|
- handlePreAndNext('up')
|
|
|
+ if(popupData.activeIndex != 0) handlePreAndNext('up')
|
|
|
}}
|
|
|
>
|
|
|
<img src={iconUp} />
|
|
|
- <span style={{ textAlign: 'center' }}>上一个</span>
|
|
|
+ {/* <span style={{ textAlign: 'center' }}>上一个</span> */}
|
|
|
</div>
|
|
|
- </div>
|
|
|
- )}
|
|
|
- {popupData.activeIndex != data.itemList.length - 1 && (
|
|
|
- <div class={styles.btnsWrap}>
|
|
|
<div
|
|
|
- class={styles.fullBtn}
|
|
|
+ class={[styles.fullBtn, !(popupData.activeIndex != data.itemList.length - 1) && styles.disabled]}
|
|
|
onClick={() => {
|
|
|
- // console.log('click down')
|
|
|
- // useThrottleFn(() => {
|
|
|
- // console.log('click down pass')
|
|
|
- // handlePreAndNext('down')
|
|
|
- // }, 300)
|
|
|
- // onChangeSwiper('down')
|
|
|
- handlePreAndNext('down')
|
|
|
-
|
|
|
+ if(popupData.activeIndex != data.itemList.length - 1) handlePreAndNext('down')
|
|
|
}}
|
|
|
>
|
|
|
- <span style={{ textAlign: 'center' }}>下一个</span>
|
|
|
+ {/* <span style={{ textAlign: 'center' }}>下一个</span> */}
|
|
|
<img src={iconDown} />
|
|
|
</div>
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
)}
|
|
|
</Transition>
|
|
@@ -1318,12 +1237,19 @@ export default defineComponent({
|
|
|
class={styles.headerContainer}
|
|
|
ref={headeRef}
|
|
|
>
|
|
|
- <div class={styles.backBtn} onClick={() => goback()}>
|
|
|
- <Icon name={iconBack} />
|
|
|
- 返回
|
|
|
+ <div class={styles.backBtn}>
|
|
|
+ <Icon name={iconBack} onClick={() => goback()} />
|
|
|
+ <div class={styles.titleSection}>
|
|
|
+ <div class={styles.title} onClick={() => goback()}>{popupData.tabName}</div>
|
|
|
+ <div class={styles.titleContent}>
|
|
|
+ <p onClick={() => goback()}>{data.itemList[popupData.activeIndex]?.name}</p>
|
|
|
+ {data.detail?.lessonTargetDesc ? <span onClick={() => onTitleTip('phaseGoals', data.detail?.lessonTargetDesc)}>阶段目标</span>: ""}
|
|
|
+ {data.itemList[popupData.activeIndex]?.checkItem ? <span onClick={() => onTitleTip('checkItem', data.itemList[popupData.activeIndex]?.checkItem)}>检查事项</span> : ""}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- {data.isCourse && <PlayRecordTime ref={playRef} list={data.knowledgePointList} />}
|
|
|
- <div
|
|
|
+ {data.isCourse && <PlayRecordTime ref={playRef} isCurrentCoursewareMenu={isCurrentCoursewareMenu.value} list={data.knowledgePointList} />}
|
|
|
+ {/* <div
|
|
|
class={styles.menu}
|
|
|
onClick={() => {
|
|
|
const _effectIndex = effectIndex.value + 1
|
|
@@ -1332,9 +1258,9 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
{popupData.tabName}
|
|
|
- </div>
|
|
|
+ </div> */}
|
|
|
|
|
|
- {state.platformType == 'TEACHER' && (
|
|
|
+ {state.platformType === 'TEACHER' && (
|
|
|
<div
|
|
|
class={styles.headRight}
|
|
|
onClick={(e: Event) => {
|
|
@@ -1342,10 +1268,22 @@ export default defineComponent({
|
|
|
clearTimeout(activeData.timer)
|
|
|
}}
|
|
|
>
|
|
|
+ {data.isCourse && (
|
|
|
+ <>
|
|
|
+ <div class={styles.pointBtn} onClick={() => gotoRollCall('student_roll_call')}>
|
|
|
+ {/* <img src={iconDian} /> */}
|
|
|
+ <span>点名</span>
|
|
|
+ </div>
|
|
|
+ <div class={styles.pointBtn} onClick={() => gotoRollCall('sign_out')}>
|
|
|
+ {/* <img src={iconPoint} /> */}
|
|
|
+ <span>签退</span>
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ )}
|
|
|
<div class={styles.rightBtn} onClick={() => (popupData.guideOpen = true)}>
|
|
|
<img src={iconTouping} />
|
|
|
</div>
|
|
|
- <div
|
|
|
+ {/* <div
|
|
|
class={styles.rightBtn}
|
|
|
onClick={() => {
|
|
|
openStudyTool({
|
|
@@ -1356,7 +1294,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
<img src={iconPen} />
|
|
|
- </div>
|
|
|
+ </div> */}
|
|
|
{/* <div class={styles.rightBtn} onClick={() => (popupData.toolOpen = true)}>
|
|
|
<img src={iconMore} />
|
|
|
</div> */}
|
|
@@ -1366,7 +1304,7 @@ export default defineComponent({
|
|
|
|
|
|
{/* 更多弹窗 */}
|
|
|
<Popup
|
|
|
- class={styles.popupMore}
|
|
|
+ class={[styles.popupMore, styles.popupCoursewarePlay]}
|
|
|
overlayClass={styles.overlayClass}
|
|
|
position="right"
|
|
|
round
|
|
@@ -1377,8 +1315,7 @@ export default defineComponent({
|
|
|
</Popup>
|
|
|
|
|
|
<Popup
|
|
|
- class={styles.popup}
|
|
|
- style={{ background: 'rgba(0,0,0, 0.75)' }}
|
|
|
+ class={[styles.popup, styles.popupCoursewarePlay]}
|
|
|
overlayClass={styles.overlayClass}
|
|
|
position="right"
|
|
|
round
|
|
@@ -1398,7 +1335,40 @@ export default defineComponent({
|
|
|
</Popup>
|
|
|
|
|
|
<Popup
|
|
|
- class={styles.popup}
|
|
|
+ class={[styles.popup, styles.popupCoursewarePlay]}
|
|
|
+ overlayClass={styles.overlayClass}
|
|
|
+ position="right"
|
|
|
+ round
|
|
|
+ v-model:show={popupData.coursewareOpen}
|
|
|
+ onClose={handleClosePopup}>
|
|
|
+ {/* 课件类型 */}
|
|
|
+ <CoursewareType list={data.refLevelList} onConfirm={async (item: any) => {
|
|
|
+ // 判断是否为当前课程类型
|
|
|
+ if(data.currentId === item.id) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
+ const n = await getDetail(item.id);
|
|
|
+ const s = await getRefLevel(item.id);
|
|
|
+ if(n && s) {
|
|
|
+ data.currentId = item.id;
|
|
|
+ isCurrentCoursewareMenu.value = item.id === route.query.id ? true : false
|
|
|
+ popupData.coursewareOpen = false;
|
|
|
+ popupData.activeIndex = 0;
|
|
|
+ nextTick(() => {
|
|
|
+ popupData.open = true
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if(!isOnline.value) {
|
|
|
+ showToast('网络异常')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }} />
|
|
|
+ </Popup>
|
|
|
+
|
|
|
+ <Popup
|
|
|
+ class={[styles.popup, styles.popupCoursewarePlay]}
|
|
|
overlayClass={styles.overlayClass}
|
|
|
position="right"
|
|
|
round
|
|
@@ -1408,9 +1378,18 @@ export default defineComponent({
|
|
|
<OGuide />
|
|
|
</Popup>
|
|
|
|
|
|
- {studyData.penShow && (
|
|
|
- <Pen show={studyData.type === 'pen'} close={() => closeStudyTool()} />
|
|
|
- )}
|
|
|
+ <Popup
|
|
|
+ class={[styles.popup, styles.popupPoint]}
|
|
|
+ round
|
|
|
+ style={{ background: 'transparent !important' }}
|
|
|
+ v-model:show={popupData.pointOpen}
|
|
|
+ onClose={handleClosePopup}>
|
|
|
+ <CoursewareTips onClose={() => {
|
|
|
+ popupData.pointOpen = false
|
|
|
+ }} content={popupData.pointContent} titleName={popupData.pointTitle} />
|
|
|
+ </Popup>
|
|
|
+
|
|
|
+ <GlobalTools />
|
|
|
</div>
|
|
|
)
|
|
|
}
|