index-legacy-ba7c6fff.js 18 KB

1
  1. !function(){function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function t(t){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?e(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(i!==undefined){var a=i.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t,i,a,n,o,r){try{var l=e[o](r),s=l.value}catch(u){return void i(u)}l.done?t(s):Promise.resolve(s).then(a,n)}function n(e){return function(){var t=this,i=arguments;return new Promise((function(n,o){var r=e.apply(t,i);function l(e){a(r,n,o,l,s,"next",e)}function s(e){a(r,n,o,l,s,"throw",e)}l(undefined)}))}}System.register(["./index-legacy-67665670.js","./tcplayer.min-legacy-1753dc5a.js","./index-legacy-9a8d16b0.js","./index-legacy-c74454ce.js","./function-call-legacy-4e947cbd.js"],(function(e,i){"use strict";var a,o,r,l,s,u,d,m,c,v,_,p,g,h,f,b,y,j,w,x,S,C,T,D,P,k,L,O,F,B,E,I,N,M,A;return{setters:[e=>{a=e.d,o=e.I,r=e.H,l=e.o,s=e.j,u=e.a,d=e.T,m=e.aS,c=e.n,v=e.F,_=e.K,p=e.h,g=e.r,h=e.k,f=e.f,b=e.s,y=e.q,j=e.l,w=e.t,x=e.V,S=e.P,C=e.B,T=e.i,D=e.e,P=e.N},e=>{k=e.T,L=e.S,O=e.V,F=e.p,B=e.i},e=>{E=e.S,I=e.a},e=>{N=e.u,M=e.a},e=>{A=e.b}],execute:function(){var z=document.createElement("style");z.textContent="._playContent_1ghmj_1{width:100vw;height:100vh;background-color:#000;overflow:hidden}._coursewarePlay_1ghmj_7{position:relative;height:100vh;margin:0 auto;overflow:hidden}._playModel_1ghmj_13{position:absolute;left:0;top:0;right:0;bottom:0;box-shadow:inset 0 0 4.37333rem #000;pointer-events:none}._headerContainer_1ghmj_22{position:fixed;top:0;left:0;right:0;z-index:1;padding:.26667rem .64rem;display:flex;align-items:center;color:#fff;font-size:.32rem;background:linear-gradient(180deg,rgba(0,0,0,.6),transparent)}._backBtn_1ghmj_35{color:#fff;width:1.06667rem;height:.69333rem;display:flex;justify-content:space-between;align-items:center;z-index:10}._menu_1ghmj_44{flex:1;display:flex;justify-content:center;color:#fff}._tabsContent_1ghmj_50{width:100vw;height:100vh}._tabsContent_1ghmj_50 .van-tabs__wrap{display:none!important}._tabsContent_1ghmj_50 .van-tabs__content{width:100%;height:100%}._loadWrap_1ghmj_61{position:absolute;left:0;top:0;right:0;bottom:0;background:linear-gradient(45deg,#21232a,#111218);display:flex;justify-content:center;align-items:center}._itemDiv_1ghmj_72{position:relative;width:100%;height:100%}._itemDiv_1ghmj_72 video{width:100%;height:100%}._itemDiv_1ghmj_72 img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}._itemDiv_1ghmj_72 ._videoSection_1ghmj_87{position:absolute;top:0;left:0;right:0;bottom:0;z-index:8}._videoModel_1ghmj_95{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._videoModel_1ghmj_95>img{width:1.33333rem;height:1.33333rem}._rightFixedBtns_1ghmj_109{position:fixed;top:50%;transform:translateY(-50%);right:.53333rem}._rightFixedBtns_1ghmj_109 ._point_1ghmj_115{margin-top:.26667rem;border-bottom-left-radius:0;border-bottom-right-radius:0}._rightFixedBtns_1ghmj_109 ._point_1ghmj_115+._fullBtn_1ghmj_120{border-top-left-radius:0;border-top-right-radius:0}._leftFixedBtns_1ghmj_124{position:fixed;top:50%;transform:translateY(-50%);left:.53333rem}._leftFixedBtns_1ghmj_124 ._prePoint_1ghmj_130{margin-bottom:.21333rem}._fullBtn_1ghmj_120{width:1.01333rem;height:1.46667rem;background:rgba(51,51,51,.15);border-radius:.21333rem;display:flex;flex-direction:column;align-items:center;color:#fff;justify-content:space-evenly}._fullBtn_1ghmj_120:active{opacity:.8}._bottomFixedContainer_1ghmj_147{position:absolute;left:0;right:0;bottom:0;z-index:10;background:linear-gradient(0deg,rgba(0,0,0,.5),transparent);transition:transform .5s}._bottomFixedContainer_1ghmj_147 ._time_1ghmj_156{display:flex;color:#fff;font-size:.26667rem;padding:.10667rem .53333rem}._bottomFixedContainer_1ghmj_147 ._slider_1ghmj_162{padding:.21333rem .53333rem;--van-slider-active-background: #00E5D7}._bottomFixedContainer_1ghmj_147 ._slider_1ghmj_162 .van-slider__button{background:#fff}._bottomFixedContainer_1ghmj_147 ._actions_1ghmj_169{display:flex;justify-content:space-between;color:#fff;font-size:.32rem;padding:0 .26667rem .10667rem .53333rem;align-items:center}._bottomFixedContainer_1ghmj_147 ._actions_1ghmj_169 ._actionBtn_1ghmj_177{display:flex}._bottomFixedContainer_1ghmj_147 ._actions_1ghmj_169 ._actionBtn_1ghmj_177>img{width:.64rem;height:.64rem;display:block;padding:.10667rem .26667rem .10667rem .05333rem;box-sizing:content-box}._popup_1ghmj_187{background:rgba(0,0,0,.5)}._overlayClass_1ghmj_190{--van-overlay-background: transparent}.top-enter-active,.top-leave-active{transition:transform .5s}.top-enter-from,.top-leave-to{transform:translateY(-100%)}.left-enter-active,.left-leave-active{transition:all .5s}.left-enter-from,.left-leave-to{left:-1.6rem}.right-enter-active,.right-leave-active{transition:all .5s}.right-enter-from,.right-leave-to{right:-1.6rem}.bottom-enter-active,.bottom-leave-active{transition:transform .5s}.bottom-enter-from,.bottom-leave-to{transform:translateY(100%)}._visiablePopup_1ghmj_225{width:8.4rem;height:4.64rem;background:#FFFFFF;border-radius:.32rem;display:flex;align-items:center;flex-direction:column;justify-content:center}._visiablePopup_1ghmj_225{color:#aaa;font-size:.48rem}._visiablePopup_1ghmj_225 ._title_1ghmj_239{font-weight:600;font-size:.48rem;color:#333;line-height:.66667rem}._visiablePopup_1ghmj_225 ._content_1ghmj_245{padding:.53333rem 0 .66667rem;font-size:.42667rem;color:#666;line-height:.64rem}._visiablePopup_1ghmj_225 ._btnGroup_1ghmj_251{display:flex;padding:0 .4rem;width:100%}._visiablePopup_1ghmj_225 ._btnGroup_1ghmj_251 .van-button:first-child{font-weight:400}._visiablePopup_1ghmj_225 ._btnGroup_1ghmj_251 .van-button{font-size:.42667rem;--van-button-default-height: 1.06667rem}._visiablePopup_1ghmj_225 ._btnGroup_1ghmj_251 .van-button+.van-button{margin-left:.4rem;font-weight:500;color:#fff}\n",document.head.appendChild(z);const R={playContent:"_playContent_1ghmj_1",coursewarePlay:"_coursewarePlay_1ghmj_7",playModel:"_playModel_1ghmj_13",headerContainer:"_headerContainer_1ghmj_22",backBtn:"_backBtn_1ghmj_35",menu:"_menu_1ghmj_44",tabsContent:"_tabsContent_1ghmj_50",loadWrap:"_loadWrap_1ghmj_61",itemDiv:"_itemDiv_1ghmj_72",videoSection:"_videoSection_1ghmj_87",videoModel:"_videoModel_1ghmj_95",rightFixedBtns:"_rightFixedBtns_1ghmj_109",point:"_point_1ghmj_115",fullBtn:"_fullBtn_1ghmj_120",leftFixedBtns:"_leftFixedBtns_1ghmj_124",prePoint:"_prePoint_1ghmj_130",bottomFixedContainer:"_bottomFixedContainer_1ghmj_147",time:"_time_1ghmj_156",slider:"_slider_1ghmj_162",actions:"_actions_1ghmj_169",actionBtn:"_actionBtn_1ghmj_177",popup:"_popup_1ghmj_187",overlayClass:"_overlayClass_1ghmj_190",visiablePopup:"_visiablePopup_1ghmj_225",title:"_title_1ghmj_239",content:"_content_1ghmj_245",btnGroup:"_btnGroup_1ghmj_251"},U=""+new URL("icon-play-e9875d7d.svg",i.meta.url).href,q=""+new URL("icon-pause-7c9eee52.svg",i.meta.url).href,G=a({name:"video-class",props:{item:{type:Object,"default":()=>({})},isMember:{type:Boolean,"default":!0},modal:{type:Boolean,"default":!0}},emits:["loadedmetadata","togglePlay","ended","reset","error","close","changeModal","pause","seeked","seeking","waiting","timeupdate"],setup(e,{emit:t}){const{item:i,modal:a}=o(e),n=r(),p="video"+Date.now()+Math.floor(100*Math.random()),g=()=>{n.value&&(_((()=>{var e;null===(e=n.value)||void 0===e||e.pause()})),n.value.poster(i.value.coverImg),n.value.src(i.value.content),n.value.loop(i.value.loop),n.value.autoplay(i.value.autoplay),n.value.one("loadedmetadata",(()=>{var e,a,o,r;const l=n.value;i.value.duration=l.duration(),i.value.videoEle=l,i.value.loaded=!0,t("loadedmetadata",n.value),i.value.muted=!1,null!==(e=n.value)&&void 0!==e&&e.muted(!1),null!==(a=n.value)&&void 0!==a&&a.volume(1),i.value.autoplay&&n.value?null===(o=n.value)||void 0===o||o.play():(null!==(r=n.value)&&void 0!==r&&r.pause(),setTimeout((()=>{var e;null===(e=n.value)||void 0===e||e.pause()}),100))})),n.value.on("timeupdate",(()=>{if(!i.value.loaded)return;const e=n.value;i.value.currentTime=e.currentTime(),t("timeupdate")})),n.value.on("ended",(()=>{t("ended",i.value)})),n.value.on("pause",(()=>{var e;i.value.paused=!0,null!==(e=n.value)&&void 0!==e&&e.pause(),setTimeout((()=>{var e;null===(e=n.value)||void 0===e||e.pause()}),100),t("pause")})),n.value.on("play",(()=>{var e,t,a;i.value.paused=!1,i.value.muted&&(i.value.muted=!1,null!==(e=n.value)&&void 0!==e&&e.muted(!1),null!==(t=n.value)&&void 0!==t&&t.volume(1),null===(a=n.value)||void 0===a||a.pause())})),n.value.on("seeked",(()=>{t("seeked")})),n.value.on("seeking",(()=>{t("seeking")})),n.value.on("waiting",(()=>{t("waiting")})),n.value.on("error",(()=>{t("error")})))};return l((()=>{n.value=k(p,{appID:"",controls:!1,loop:i.value.loop,muted:!1}),g()})),s((()=>e.item),(()=>{n.value.autoplay(i.value.autoplay),g()})),()=>u(v,null,[u("div",{"class":R.itemDiv,onClick:()=>{clearTimeout(i.value.timer),t("changeModal",!a.value)}},[u("video",{id:p,style:{height:"100%",width:"100%"},playsinline:"false",preload:"auto","class":"player","data-vid":i.value.id,src:i.value.content},[u("source",{src:i.value.content,type:"video/mp4"},null)]),u("div",{"class":R.videoSection},null)]),u(d,{name:"bottom"},{"default":()=>[a.value&&!i.value.muted&&u("div",{"class":R.bottomFixedContainer},[u("div",{"class":R.time},[u("span",null,[m(i.value.currentTime)]),c("/"),u("span",null,[m(i.value.duration)])]),u("div",{"class":R.slider},[i.value.duration&&u(L,{buttonSize:16,modelValue:i.value.currentTime,min:0,max:i.value.duration},null)]),u("div",{"class":R.actions},[u("div",{"class":R.actionBtn},[i.value.paused?u("img",{src:U,onClick:()=>{var e;clearTimeout(i.value.timer),null!==(e=i.value.videoEle)&&void 0!==e&&e.play(),i.value.paused=!1,i.value.timer=setTimeout((()=>{t("changeModal",!1)}),4e3)}},null):u("img",{src:q,onClick:()=>{var e;clearTimeout(i.value.timer),null!==(e=i.value.videoEle)&&void 0!==e&&e.pause(),i.value.paused=!0}},null)])])])]})])}});e("default",a({name:"exercise-after-class",setup(){const e=p(),i=g({width:"100vw"}),a=(e=0)=>{(()=>{const e=Math.min(screen.width,screen.height)*(16/9);e>Math.max(screen.width,screen.height)?i.width="100vw":i.width=e+"px"})(),w({api:"setRequestedOrientation",content:{orientation:e}}),w({api:"setStatusBarVisibility",content:{isVisibility:e}})};a(),h((()=>{a(1)}));const o=f(),m=o.query,k=r(),L=g({disableScreenRecordingFlag:"0",visiableStatus:!1,visiableConfirmText:"下一题",isLastIndex:!1,itemIndex:0,isMember:!1,videoData:null,trainings:[],expireTimeFlag:!1,trainingTimes:0,itemList:[],showHead:!0,loading:!0,recordLoading:!1,isPlayBaseStatus:!0,isPlayAll:!0}),z=g({nowTime:0,model:!0,timer:null,item:null}),U=function(){var e=n((function*(e){try{const t=yield D.post(b.platformApi+"/studentCourseHomework/findStudentHomeworkCourseware",{hideLoading:!0,data:{courseScheduleId:m.courseScheduleId,type:m.type}});if(Array.isArray(null==t?void 0:t.data)){const i=(null==t?void 0:t.data)||[];return i.forEach((t=>{t.times>t.trainingTimes&&(L.isPlayAll=!1),t.id+""==(e||o.query.materialId)&&(J.tabName=t.musicScoreName)})),i}}catch(e){}return[]}));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=n((function*(e,i){Array.isArray(e)&&(L.trainings=e.map((e=>t(t({},e),{},{currentTime:0,duration:100,paused:!0,loop:!1,videoEle:null,timer:null,muted:"UNLOCK"!==e.useStatus,autoplay:"UNLOCK"===e.useStatus}))),L.itemList=L.trainings.filter((e=>e.id==(i||o.query.materialId))),L.videoData=L.itemList[0],"1"===L.disableScreenRecordingFlag&&Y())}));return function(t,i){return e.apply(this,arguments)}}(),V=r(),H=N(1e3,{controls:!0});H.pause();let K=null;const W=(e,t)=>{var i,a;t?null===(i=e.videoEle)||void 0===i||i.play():null===(a=e.videoEle)||void 0===a||a.pause()},Y=function(){var e=n((function*(){const e=yield P({api:"getDeviceStatus",content:{type:"video"}}),{status:t}=(null==e?void 0:e.content)||{};"1"==t&&(L.itemList.forEach((e=>e.autoPlay=!1)),Q(),(e=>{const t=null===(e=L.videoData)||void 0===e?void 0:e.videoEle;t&&(K=setInterval((()=>{t.paused()||(t.pause(),clearInterval(K)),t.pause()}),100)),setTimeout((()=>{clearInterval(K)}),3e3)})(),L.visiableStatus=!1,A({title:"温馨提示",message:"课件内容请勿录屏",beforeClose:()=>new Promise((e=>{P({api:"getDeviceStatus",content:{type:"video"}}).then((t=>{const i=t.content;"1"==(null==i?void 0:i.status)?(W(L.videoData,!1),e(!1)):(W(L.videoData,!0),e(!0)),X()}))}))}))}));return function(){return e.apply(this,arguments)}}();l(n((function*(){var e;yield n((function*(){try{const e=yield D.get(b.platformApi+"/sysConfig/queryByParamName",{params:{paramName:"disable_screen_recording_flag"}});L.disableScreenRecordingFlag=e.data.paranValue||""}catch(e){}}))();const t=yield U();if(q(t),"STUDENT"===b.platformType&&"LOCK"===(null===(e=L.videoData)||void 0===e?void 0:e.useStatus))return y(L.videoData.lessonCoursewareId,"LESSON","exercise"),void _((()=>{w({api:"courseLoading",content:{show:!1,type:"fullscreen"}})}));X(),L.visiableStatus&&(L.itemList[0].muted=!0,L.itemList[0].autoplay=!1),"1"===L.disableScreenRecordingFlag&&(j("setVideoPlayer",(e=>{var t;"pause"==(null==e||null===(t=e.content)||void 0===t?void 0:t.status)&&Y()})),w({api:"limitScreenRecord",content:{type:1}})),"STUDENT"===b.platformType&&(V.value=M(n((function*(){yield n((function*(){try{if("STUDENT"===b.platformType){const e=H.counter.value;if(e<=0)return;H.counter.value=0,yield D.post(`${b.platformApi}/studentCoursewarePlayRecord/save`,{data:{playTime:e}})}}catch(e){}}))()})),5e3))})));const $=r(),J=g({firstIndex:0,open:!1,activeIndex:-1,tabActive:"",tabName:"",itemActive:"",itemName:""}),Q=()=>{L.itemList.forEach((e=>{var t;null===(t=e.videoEle)||void 0===t||t.pause()}))},X=()=>{var e,t,i;if(0!=(null==L||null===(e=L.videoData)||void 0===e?void 0:e.trainingTimes)&&(null==L||null===(t=L.videoData)||void 0===t?void 0:t.trainingTimes)>=(null===(i=L.videoData)||void 0===i?void 0:i.times)){let e=!1,t=0,i=-1,a=!0;L.trainings.forEach(((e,t)=>{e.times>e.trainingTimes&&-1===i&&(i=t),e.times>e.trainingTimes&&(a=!1)})),t=-1!=i?i-1:-1,e=a,L.visiableConfirmText=e?"完成":"下一题",L.visiableStatus=!0,L.itemIndex=t,L.isLastIndex=e}},Z=()=>{if(L.isLastIndex)w({api:"goBack"});else{L.itemList=[],L.videoData={};const e=L.trainings[L.itemIndex+1];e.musicScoreName&&(J.tabName=e.musicScoreName),L.itemList=[e],L.videoData=e,"LOCK"===L.videoData.useStatus?y(L.videoData.lessonCoursewareId,"LESSON","exercise"):X()}L.visiableStatus=!1},ee=()=>{L.visiableStatus=!1};return s(e,(e=>{Q(),"visible"==e&&(w({api:"setRequestedOrientation",content:{orientation:0}},(()=>{})),n((function*(){var e;if(b.vipShow)return;const t=yield U(L.videoData.id);if(q(t,L.videoData.id),"STUDENT"===b.platformType&&"LOCK"===(null===(e=L.videoData)||void 0===e?void 0:e.useStatus))return y(L.videoData.lessonCoursewareId,"LESSON","exercise"),void _((()=>{w({api:"courseLoading",content:{show:!1,type:"fullscreen"}})}));X(),L.visiableStatus&&(L.itemList[0].muted=!0,L.itemList[0].autoplay=!1)}))())})),()=>{let e;return u("div",{"class":R.playContent},[u("div",{"class":R.coursewarePlay,style:{width:i.width}},[u(E,{style:{height:"100%"},ref:$,showIndicators:!1,loop:!1,vertical:!0,lazyRender:!0,touchable:!1,duration:0},(t=e=L.itemList.map((e=>u(I,null,{"default":()=>[u(v,null,[u(G,{item:e,isMember:L.isMember,modal:z.model,onSeeked:()=>{H.isActive.value&&H.pause()},onSeeking:()=>{H.isActive.value&&H.pause()},onWaiting:()=>{H.isActive.value&&H.pause()},onTimeupdate:()=>{const t=e.videoEle;!H.isActive.value&&(null==t?void 0:t.currentTime())>0&&(null==t||!t.paused())&&H.resume()},onPause:()=>{clearTimeout(z.timer),z.model=!0,H.pause()},onEnded:()=>n((function*(){var e;if(L.recordLoading||L.expireTimeFlag)return;L.recordLoading=!0;const t={id:(null===(e=L.videoData)||void 0===e?void 0:e.id)||""};try{yield D.get(b.platformApi+"/studentCourseHomework/addStudentHomeworkRecord",{params:t,hideLoading:!0})}catch(t){}L.recordLoading=!1;try{const e=yield U();if(Array.isArray(e)){const t=e.find((e=>{var t;return e.id==(null===(t=L.videoData)||void 0===t?void 0:t.id)}));t&&(L.videoData.trainingTimes=t.trainingTimes,X())}}catch(t){}}))(),onChangeModal:e=>{z.model=e}},null),e.muted&&u("div",{"class":R.loadWrap},[u(O,{animationData:F},null)])])]}))),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!T(t)?e:{"default":()=>[e]})),u(d,{name:"top"},{"default":()=>{var e,t;return[z.model&&u("div",{"class":R.headerContainer,ref:k},[u("div",{"class":R.backBtn,onClick:()=>{w({api:"back"})}},[u(x,{name:B},null),c("返回")]),u("div",{"class":R.menu},[J.tabName]),u("div",{"class":R.nums},[c("练习次数:"),(null===(e=L.videoData)||void 0===e?void 0:e.trainingTimes)||0,c("/"),(null===(t=L.videoData)||void 0===t?void 0:t.times)||0])])]}})]),u(S,{show:L.visiableStatus,"onUpdate:show":e=>L.visiableStatus=e,"class":R.visiablePopup,closeOnClickOverlay:!1},{"default":()=>[u("div",{"class":R.title},[c("温馨提示")]),u("p",{"class":R.content},[c("您已完成该练习~")]),u("div",{"class":R.btnGroup},[u(C,{round:!0,block:!0,onClick:ee},{"default":()=>[c("继续")]}),u(C,{color:"#01C1B5",round:!0,block:!0,onClick:Z},{"default":()=>[L.visiableConfirmText]})])]})]);var t}}}))}}}))}();