|
@@ -30,6 +30,7 @@ import { listenerMessage, postMessage, promisefiyPostMessage } from '@/helpers/n
|
|
|
import MusicScore from './component/musicScore'
|
|
|
import iconMenu from './image/icon-menu.svg'
|
|
|
import iconDian from './image/icon-dian.svg'
|
|
|
+import iconTouping from './image/icon-touping.svg'
|
|
|
import iconPoint from './image/icon-point.svg'
|
|
|
import iconLoop from './image/icon-loop.svg'
|
|
|
import iconLoopActive from './image/icon-loop-active.svg'
|
|
@@ -52,6 +53,7 @@ import 'swiper/less/effect-fade'
|
|
|
import 'swiper/less/effect-flip'
|
|
|
import 'swiper/less/effect-creative'
|
|
|
import { handleCheckVip } from '../hook/useFee'
|
|
|
+import OGuide from '@/components/o-guide'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'CoursewarePlay',
|
|
@@ -302,8 +304,7 @@ export default defineComponent({
|
|
|
const swiperDom = ref()
|
|
|
onMounted(() => {
|
|
|
const hasVip = handleCheckVip()
|
|
|
- console.error("🚀 ~ hasVip", hasVip)
|
|
|
- if (!hasVip) return;
|
|
|
+ if (!hasVip) return
|
|
|
getDetail()
|
|
|
getCourseSchedule()
|
|
|
window.addEventListener('message', iframeHandle)
|
|
@@ -329,7 +330,8 @@ export default defineComponent({
|
|
|
tabActive: '',
|
|
|
tabName: '',
|
|
|
itemActive: '',
|
|
|
- itemName: ''
|
|
|
+ itemName: '',
|
|
|
+ guideOpen: false
|
|
|
})
|
|
|
|
|
|
/**停止所有的播放 */
|
|
@@ -459,13 +461,6 @@ export default defineComponent({
|
|
|
// console.log(m)
|
|
|
if (popupData.activeIndex != data.itemList.length - 1) {
|
|
|
swiperDom.value.slideNext(800)
|
|
|
-
|
|
|
- // setTimeout(() => {
|
|
|
- // swipeRef.value?.next()
|
|
|
- // ;(document.querySelector('.swiper-button-next') as any)?.click()
|
|
|
- // swiperDom.value.navigation.nextEl.click()
|
|
|
- // swiperDom.value.slideNext(800)
|
|
|
- // }, 300)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -551,24 +546,8 @@ export default defineComponent({
|
|
|
const handlePreAndNext = (type: string) => {
|
|
|
setTimeout(() => {
|
|
|
if (type === 'up') {
|
|
|
- // swiperRef.value?.allowSlidePrev()
|
|
|
-
|
|
|
- // ;(document.querySelector('.swiper-button-prev') as any)?.click()
|
|
|
- // swiperDom.value.navigation.prevEl.click()
|
|
|
swiperDom.value.slidePrev(800)
|
|
|
} else {
|
|
|
- // swiperRef.value?.allowSlideNext()
|
|
|
-
|
|
|
- // ;(document.querySelector('.swiper-button-next') as any)?.click()
|
|
|
- // swiperDom.value.navigation.nextEl.click()
|
|
|
- // const nextKonwledgeId = data.itemList[popupData.activeIndex + 1].knowledgePointId
|
|
|
- // console.log(nextKonwledgeId === popupData.tabActive)
|
|
|
- // if (nextKonwledgeId === popupData.tabActive) {
|
|
|
- // swiperType.value = effects[2]
|
|
|
- // } else {
|
|
|
- // swiperType.value = effects[3]
|
|
|
- // }
|
|
|
-
|
|
|
swiperDom.value.slideNext(800)
|
|
|
}
|
|
|
}, 400)
|
|
@@ -577,16 +556,6 @@ export default defineComponent({
|
|
|
return () => (
|
|
|
<div class={styles.playContent}>
|
|
|
<div class={styles.coursewarePlay} style={{ width: parentContainer.width }}>
|
|
|
- {/* <swiper :modules="modules" :pagination="{ clickable: true }">
|
|
|
- <swiper-slide>Slide 1</swiper-slide>
|
|
|
- <swiper-slide>Slide 2</swiper-slide>
|
|
|
- <swiper-slide>Slide 3</swiper-slide>
|
|
|
- </swiper> */}
|
|
|
-
|
|
|
- {/*
|
|
|
- 知识点 翻
|
|
|
- 素材滑
|
|
|
- */}
|
|
|
<Swiper
|
|
|
style={{ height: '100%' }}
|
|
|
effect="creative"
|
|
@@ -596,11 +565,9 @@ export default defineComponent({
|
|
|
navigation
|
|
|
allowTouchMove={false}
|
|
|
onSwiper={(swiper: any) => {
|
|
|
- // console.log(swiper, 'index')
|
|
|
swiperDom.value = swiper
|
|
|
}}
|
|
|
onSlideChange={(swiper: any) => {
|
|
|
- // console.log(swiper, 'index')
|
|
|
handleSwipeChange(swiper.activeIndex)
|
|
|
}}
|
|
|
>
|
|
@@ -608,8 +575,6 @@ export default defineComponent({
|
|
|
return (
|
|
|
<SwiperSlide class={styles.swipeItem}>
|
|
|
<div
|
|
|
- // class={[styles.itemDiv]}
|
|
|
-
|
|
|
class={[styles.itemDiv]}
|
|
|
onClick={() => {
|
|
|
clearTimeout(activeData.timer)
|
|
@@ -631,7 +596,6 @@ export default defineComponent({
|
|
|
playsinline="false"
|
|
|
muted={m.muted}
|
|
|
preload="auto"
|
|
|
- // class="player"
|
|
|
data-vid={m.id}
|
|
|
src={m.content}
|
|
|
loop={m.loop}
|
|
@@ -763,20 +727,6 @@ export default defineComponent({
|
|
|
)
|
|
|
})}
|
|
|
</Swiper>
|
|
|
- {/* <Swipe
|
|
|
- style={{ height: '100%' }}
|
|
|
- ref={swipeRef}
|
|
|
- showIndicators={false}
|
|
|
- loop={false}
|
|
|
- duration={0}
|
|
|
- // vertical
|
|
|
- lazyRender={true}
|
|
|
- touchable={false}
|
|
|
- initialSwipe={popupData.firstIndex}
|
|
|
- onChange={handleSwipeChange}
|
|
|
- >
|
|
|
-
|
|
|
- </Swipe> */}
|
|
|
<div
|
|
|
style={{ transform: activeData.model ? '' : 'translateY(-100%)' }}
|
|
|
id="coursePlayHeader"
|
|
@@ -793,31 +743,37 @@ export default defineComponent({
|
|
|
<Transition name="right">
|
|
|
{activeData.model && (
|
|
|
<div class={styles.rightFixedBtns}>
|
|
|
- <div
|
|
|
- class={styles.fullBtn}
|
|
|
- onClick={() => {
|
|
|
- clearTimeout(activeData.timer)
|
|
|
- popupData.open = true
|
|
|
- }}
|
|
|
- >
|
|
|
- <img src={iconMenu} />
|
|
|
- <span>知识点</span>
|
|
|
+ <div class={styles.btnsWrap}>
|
|
|
+ <div
|
|
|
+ class={[styles.fullBtn, styles.point]}
|
|
|
+ onClick={() => {
|
|
|
+ clearTimeout(activeData.timer)
|
|
|
+ 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>
|
|
|
- {data.isCourse && (
|
|
|
- <>
|
|
|
- <div
|
|
|
- class={[styles.fullBtn, styles.point]}
|
|
|
- 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>
|
|
|
)}
|
|
|
</Transition>
|
|
@@ -869,6 +825,16 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
</Popup>
|
|
|
+
|
|
|
+ <Popup
|
|
|
+ class={styles.popup}
|
|
|
+ overlayClass={styles.overlayClass}
|
|
|
+ position="right"
|
|
|
+ round
|
|
|
+ v-model:show={popupData.guideOpen}
|
|
|
+ >
|
|
|
+ <OGuide />
|
|
|
+ </Popup>
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|