|
@@ -11,7 +11,7 @@ import {
|
|
|
computed,
|
|
|
onBeforeUnmount
|
|
|
} 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,9 +20,9 @@ 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'
|
|
@@ -68,7 +68,7 @@ export default defineComponent({
|
|
|
}
|
|
|
const handleInit = (type = 0) => {
|
|
|
//设置容器16:9
|
|
|
- setContainer()
|
|
|
+ // setContainer()
|
|
|
// 横屏
|
|
|
postMessage(
|
|
|
{
|
|
@@ -965,59 +965,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}
|
|
@@ -1118,59 +1069,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 +1124,43 @@ 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()}>
|
|
|
+ <div class={[styles.btnsWrap, styles.prePoint]}>
|
|
|
+ <div class={styles.fullBtn} onClick={() => (popupData.open = true)}>
|
|
|
+ <img src={iconCourseType} />
|
|
|
+ </div>
|
|
|
+ <div class={styles.fullBtn} onClick={() => (popupData.open = true)}>
|
|
|
+ <img src={iconMenu} />
|
|
|
+ {/* <span>知识点</span> */}
|
|
|
+ </div>
|
|
|
{popupData.activeIndex != 0 && (
|
|
|
- <div class={[styles.btnsWrap, styles.prePoint]}>
|
|
|
+
|
|
|
<div
|
|
|
class={styles.fullBtn}
|
|
|
onClick={() => {
|
|
|
- // useThrottleFn(() => {
|
|
|
- // handlePreAndNext('up')
|
|
|
- // }, 300)
|
|
|
- // onChangeSwiper('up')
|
|
|
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}
|
|
|
onClick={() => {
|
|
|
- // console.log('click down')
|
|
|
- // useThrottleFn(() => {
|
|
|
- // console.log('click down pass')
|
|
|
- // handlePreAndNext('down')
|
|
|
- // }, 300)
|
|
|
- // onChangeSwiper('down')
|
|
|
handlePreAndNext('down')
|
|
|
-
|
|
|
}}
|
|
|
>
|
|
|
- <span style={{ textAlign: 'center' }}>下一个</span>
|
|
|
+ {/* <span style={{ textAlign: 'center' }}>下一个</span> */}
|
|
|
<img src={iconDown} />
|
|
|
</div>
|
|
|
- </div>
|
|
|
)}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
)}
|
|
|
</Transition>
|
|
@@ -1320,10 +1174,17 @@ export default defineComponent({
|
|
|
>
|
|
|
<div class={styles.backBtn} onClick={() => goback()}>
|
|
|
<Icon name={iconBack} />
|
|
|
- 返回
|
|
|
+ <div class={styles.titleSection}>
|
|
|
+ <div class={styles.title}>{popupData.tabName}</div>
|
|
|
+ <div class={styles.titleContent}>
|
|
|
+ <p>第3条练习6-15小节-演奏-练习</p>
|
|
|
+ <span>阶段目标</span>
|
|
|
+ <span>检查事项</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
{data.isCourse && <PlayRecordTime ref={playRef} list={data.knowledgePointList} />}
|
|
|
- <div
|
|
|
+ {/* <div
|
|
|
class={styles.menu}
|
|
|
onClick={() => {
|
|
|
const _effectIndex = effectIndex.value + 1
|
|
@@ -1332,9 +1193,9 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
{popupData.tabName}
|
|
|
- </div>
|
|
|
+ </div> */}
|
|
|
|
|
|
- {state.platformType == 'TEACHER' && (
|
|
|
+ {state.platformType !== 'TEACHER' && (
|
|
|
<div
|
|
|
class={styles.headRight}
|
|
|
onClick={(e: Event) => {
|
|
@@ -1342,10 +1203,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 +1229,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
<img src={iconPen} />
|
|
|
- </div>
|
|
|
+ </div> */}
|
|
|
{/* <div class={styles.rightBtn} onClick={() => (popupData.toolOpen = true)}>
|
|
|
<img src={iconMore} />
|
|
|
</div> */}
|