|
@@ -341,10 +341,9 @@ export default defineComponent({
|
|
|
handleSwipeChange(resourceIndex);
|
|
|
}, 0);
|
|
|
|
|
|
-
|
|
|
//检测是否录屏
|
|
|
if (data.disableScreenRecordingFlag === '1') {
|
|
|
- handleLimitScreenRecord()
|
|
|
+ handleLimitScreenRecord();
|
|
|
}
|
|
|
|
|
|
setTimeout(() => {
|
|
@@ -368,79 +367,86 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- let timers: any = null
|
|
|
+ let timers: any = null;
|
|
|
const checkVideoPlay = (activeItem: any) => {
|
|
|
- const activeVideoRef = activeItem.type === 'VIDEO' ? activeItem.videoEle : activeItem.audioEle
|
|
|
+ const activeVideoRef =
|
|
|
+ activeItem.type === 'VIDEO' ? activeItem.videoEle : activeItem.audioEle;
|
|
|
if (activeVideoRef) {
|
|
|
timers = setInterval(() => {
|
|
|
- const paused = activeItem.type === 'VIDEO' ? activeVideoRef.paused() : activeVideoRef.paused
|
|
|
+ const paused =
|
|
|
+ activeItem.type === 'VIDEO'
|
|
|
+ ? activeVideoRef.paused()
|
|
|
+ : activeVideoRef.paused;
|
|
|
if (!paused) {
|
|
|
- activeVideoRef.pause()
|
|
|
- clearInterval(timers)
|
|
|
+ activeVideoRef.pause();
|
|
|
+ clearInterval(timers);
|
|
|
}
|
|
|
- activeVideoRef.pause()
|
|
|
- }, 100)
|
|
|
+ activeVideoRef.pause();
|
|
|
+ }, 100);
|
|
|
}
|
|
|
|
|
|
setTimeout(() => {
|
|
|
- clearInterval(timers)
|
|
|
- }, 3000)
|
|
|
- }
|
|
|
+ clearInterval(timers);
|
|
|
+ }, 3000);
|
|
|
+ };
|
|
|
//录屏时间触发
|
|
|
const handleLimitScreenRecord = async () => {
|
|
|
const result = await promisefiyPostMessage({
|
|
|
api: 'getDeviceStatus',
|
|
|
content: { type: 'video' }
|
|
|
- })
|
|
|
- const { status } = result?.content || {}
|
|
|
+ });
|
|
|
+ const { status } = result?.content || {};
|
|
|
if (status == '1') {
|
|
|
- data.itemList.forEach((item: any) => (item.autoPlay = false))
|
|
|
- handleStop()
|
|
|
+ data.itemList.forEach((item: any) => (item.autoPlay = false));
|
|
|
+ handleStop();
|
|
|
|
|
|
- const activeItem = data.itemList[popupData.activeIndex]
|
|
|
+ const activeItem = data.itemList[popupData.activeIndex];
|
|
|
if (activeItem.type === 'VIDEO' || activeItem.type === 'SONG') {
|
|
|
// 处理事件 - 事件事件后加载的
|
|
|
- checkVideoPlay(activeItem)
|
|
|
+ checkVideoPlay(activeItem);
|
|
|
}
|
|
|
|
|
|
showDialog({
|
|
|
title: '温馨提示',
|
|
|
message: '课件内容请勿录屏',
|
|
|
beforeClose: () => {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
promisefiyPostMessage({
|
|
|
api: 'getDeviceStatus',
|
|
|
content: { type: 'video' }
|
|
|
}).then((res: any) => {
|
|
|
- const content = res.content
|
|
|
+ const content = res.content;
|
|
|
if (content?.status == '1') {
|
|
|
- resolve(false)
|
|
|
+ resolve(false);
|
|
|
} else {
|
|
|
- data.itemList.forEach((item: any) => (item.autoPlay = true))
|
|
|
- resolve(true)
|
|
|
+ data.itemList.forEach((item: any) => (item.autoPlay = true));
|
|
|
+ resolve(true);
|
|
|
}
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
// 获取支付渠道
|
|
|
const sysParamConfig = async () => {
|
|
|
try {
|
|
|
- const res = await request.get('/edu-app/sysParamConfig/queryByParamName', {
|
|
|
- params: {
|
|
|
- paramName: 'disable_screen_recording_flag'
|
|
|
+ const res = await request.get(
|
|
|
+ '/edu-app/sysParamConfig/queryByParamName',
|
|
|
+ {
|
|
|
+ params: {
|
|
|
+ paramName: 'disable_screen_recording_flag'
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
- data.disableScreenRecordingFlag = res.data.paramValue || ''
|
|
|
+ );
|
|
|
+ data.disableScreenRecordingFlag = res.data.paramValue || '';
|
|
|
} catch {
|
|
|
//
|
|
|
}
|
|
|
- }
|
|
|
+ };
|
|
|
onMounted(async () => {
|
|
|
- await sysParamConfig()
|
|
|
+ await sysParamConfig();
|
|
|
// needVipLock
|
|
|
const schoolInfos = state.user.data?.schoolInfos;
|
|
|
const schoolLock =
|
|
@@ -466,18 +472,18 @@ export default defineComponent({
|
|
|
|
|
|
if (data.disableScreenRecordingFlag === '1') {
|
|
|
//禁止录屏 ios
|
|
|
- listenerMessage('setVideoPlayer', (result) => {
|
|
|
+ listenerMessage('setVideoPlayer', result => {
|
|
|
if (result?.content?.status == 'pause') {
|
|
|
- handleLimitScreenRecord()
|
|
|
+ handleLimitScreenRecord();
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
// 安卓
|
|
|
postMessage({
|
|
|
api: 'limitScreenRecord',
|
|
|
content: {
|
|
|
type: 1
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -613,7 +619,7 @@ export default defineComponent({
|
|
|
activeItem.videoEle?.pause();
|
|
|
}
|
|
|
if (activeItem.type === 'SONG' && activeItem.audioEle) {
|
|
|
- console.log(1111, '---------')
|
|
|
+ console.log(1111, '---------');
|
|
|
activeItem.audioEle?.pause();
|
|
|
}
|
|
|
// 停止曲谱的播放
|
|
@@ -1087,29 +1093,6 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- watch(
|
|
|
- () => pageVisibility.value,
|
|
|
- async (val: any) => {
|
|
|
- // 为了处理从没有会员,到购买会员返回时状态变化
|
|
|
- if (val === 'visible') {
|
|
|
- const userCash = await request.get('/edu-app/user/getUserInfo', {
|
|
|
- initRequest: true // 初始化接口
|
|
|
- });
|
|
|
- setLogin(userCash.data);
|
|
|
- const schoolInfos = userCash.data?.schoolInfos;
|
|
|
- const schoolLock =
|
|
|
- schoolInfos && schoolInfos.length > 0
|
|
|
- ? schoolInfos[0].needVipLock
|
|
|
- : true;
|
|
|
- if (!state?.user?.data.vipMember && schoolLock) {
|
|
|
- showMember.value = true;
|
|
|
- } else {
|
|
|
- showMember.value = false;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
return () => (
|
|
|
<div id="playContent" class={styles.playContent}>
|
|
|
<div
|
|
@@ -1240,8 +1223,8 @@ export default defineComponent({
|
|
|
showModel={activeData.model}
|
|
|
isEmtry={isEmtry}
|
|
|
onLoadedmetadata={(audioEle: any) => {
|
|
|
- console.log(audioEle, 'audioEle', m)
|
|
|
- m.audioEle = audioEle;
|
|
|
+ console.log(audioEle, 'audioEle', m);
|
|
|
+ m.audioEle = audioEle;
|
|
|
}}
|
|
|
onEnded={() => {
|
|
|
const _index = popupData.activeIndex + 1;
|
|
@@ -1317,7 +1300,7 @@ export default defineComponent({
|
|
|
type={'wiki'}
|
|
|
id={m.bizId}
|
|
|
show={popupData.activeIndex === mIndex}
|
|
|
- ref={(el) => m.domEle = el}
|
|
|
+ ref={el => (m.domEle = el)}
|
|
|
/>
|
|
|
)}
|
|
|
{m.type === 'INSTRUMENT' && (
|
|
@@ -1325,7 +1308,7 @@ export default defineComponent({
|
|
|
type={'instrument'}
|
|
|
id={m.bizId}
|
|
|
show={popupData.activeIndex === mIndex}
|
|
|
- ref={(el) => m.domEle = el}
|
|
|
+ ref={el => (m.domEle = el)}
|
|
|
/>
|
|
|
)}
|
|
|
{m.type === 'MUSICIAN' && (
|
|
@@ -1333,7 +1316,7 @@ export default defineComponent({
|
|
|
type={'musician'}
|
|
|
id={m.bizId}
|
|
|
show={popupData.activeIndex === mIndex}
|
|
|
- ref={(el) => m.domEle = el}
|
|
|
+ ref={el => (m.domEle = el)}
|
|
|
/>
|
|
|
)}
|
|
|
{m.type === 'LISTEN' && (
|
|
@@ -1489,12 +1472,12 @@ export default defineComponent({
|
|
|
}}
|
|
|
onSelect={item => loadNewCourseware(item)}></SelectCoursewarePop>
|
|
|
)}
|
|
|
- {showMember.value && (
|
|
|
+ {/* {showMember.value && (
|
|
|
<SelectCoursewareMember
|
|
|
onClose={() => {
|
|
|
showSelectCourseware.value = false;
|
|
|
}}></SelectCoursewareMember>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
</div>
|
|
|
);
|
|
|
}
|