index-legacy.c90d626f.js 17 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function r(e,t,n,a,i,r,o){try{var l=e[r](o),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).then(a,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function l(e){r(o,a,i,l,u,"next",e)}function u(e){r(o,a,i,l,u,"throw",e)}l(void 0)}))}}var l=document.createElement("style");l.innerHTML="._playContent_1a0ep_1{width:100vw;height:100vh;background-color:#000;overflow:hidden}._coursewarePlay_1a0ep_7{position:relative;height:100vh;margin:0 auto;overflow:hidden}._playModel_1a0ep_13{position:absolute;left:0;top:0;right:0;bottom:0;box-shadow:inset 0 0 4.37333rem #000;pointer-events:none}._headerContainer_1a0ep_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_1a0ep_35{color:#fff;width:1.06667rem;height:.69333rem;display:flex;justify-content:space-between;align-items:center;z-index:10}._btnGroup_1a0ep_44{position:absolute;top:50%;right:.32rem;z-index:10;transform:translateY(-50%)}._btnGroup_1a0ep_44 ._btnItem_1a0ep_51{background:rgba(0,0,0,.3);border-radius:.16rem;width:1.12rem;height:1.33333rem;font-size:.32rem;color:#fff;text-shadow:0 0 .05333rem rgba(0,0,0,.13);display:flex;align-items:center;flex-direction:column;justify-content:center;cursor:pointer}._btnGroup_1a0ep_44 ._btnImg_1a0ep_65{width:.64rem;height:.64rem;margin-bottom:.05333rem}._menu_1a0ep_70{flex:1;display:flex;justify-content:center;color:#fff}._tabsContent_1a0ep_76{width:100vw;height:100vh}._tabsContent_1a0ep_76 .van-tabs__wrap{display:none!important}._tabsContent_1a0ep_76 .van-tabs__content{width:100%;height:100%}._loadWrap_1a0ep_87{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_1a0ep_98{position:relative;width:100%;height:100%}._itemDiv_1a0ep_98 video{width:100%;height:100%}._itemDiv_1a0ep_98 img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}._itemDiv_1a0ep_98 ._videoSection_1a0ep_113{position:absolute;top:0;left:0;right:0;bottom:0;z-index:8}._videoModel_1a0ep_121{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._videoModel_1a0ep_121>img{width:1.33333rem;height:1.33333rem}._rightFixedBtns_1a0ep_135{position:fixed;top:50%;transform:translateY(-50%);right:.53333rem}._rightFixedBtns_1a0ep_135 ._point_1a0ep_141{margin-top:.26667rem;border-bottom-left-radius:0;border-bottom-right-radius:0}._rightFixedBtns_1a0ep_135 ._point_1a0ep_141+._fullBtn_1a0ep_146{border-top-left-radius:0;border-top-right-radius:0}._leftFixedBtns_1a0ep_150{position:fixed;top:50%;transform:translateY(-50%);left:.53333rem}._leftFixedBtns_1a0ep_150 ._prePoint_1a0ep_156{margin-bottom:.21333rem}._fullBtn_1a0ep_146{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_1a0ep_146:active{opacity:.8}._bottomFixedContainer_1a0ep_173{position:absolute;left:0;right:0;bottom:0;z-index:10;background:linear-gradient(0deg,rgba(0,0,0,.5),transparent);padding:0 .8rem}._bottomFixedContainer_1a0ep_173 ._time_1a0ep_182{display:flex;justify-content:space-between;color:#fff;font-size:.26667rem;padding:.10667rem 0}._bottomFixedContainer_1a0ep_173 ._slider_1a0ep_189{padding:.26667rem 0}._bottomFixedContainer_1a0ep_173 ._actions_1a0ep_192{display:flex;justify-content:space-between;color:#fff;font-size:.32rem;align-items:center}._bottomFixedContainer_1a0ep_173 ._actions_1a0ep_192 ._actionBtn_1a0ep_199{display:flex}._bottomFixedContainer_1a0ep_173 ._actions_1a0ep_192 ._actionBtn_1a0ep_199>img{width:.69333rem;height:.69333rem;display:block;padding:.21333rem .21333rem .37333rem}._popup_1a0ep_208{background:rgba(0,0,0,.5)}._overlayClass_1a0ep_211{--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%)}\n",document.head.appendChild(l),System.register(["./index-legacy.5f9666b4.js","./plyr-legacy.2bfabaee.js","./tcplayer.min-legacy.beb798ba.js","./useFee-legacy.492e6481.js","./tcplayer.v4.8.0.min-legacy.cbe420be.js","./index-legacy.2ec6381c.js","./index-legacy.8f20f3d1.js"],(function(e){"use strict";var n,i,r,l,u,c,s,d,p,m,v,f,_,g,b,h,y,x,w,T,I,C,j,O,k,B,S,D,P,A,E,F,L,M;return{setters:[function(e){n=e.d,i=e.bL,r=e.R,l=e.$,u=e.Z,c=e.c,s=e.be,d=e.bg,p=e.F,m=e._,v=e.b0,f=e.r,_=e.b7,g=e.ah,b=e.ag,h=e.f,y=e.e,x=e.V,w=e.a5,T=e.q,I=e.al,C=e.m,j=e.g,O=e.bh,k=e.bd},function(){},function(e){B=e.i,S=e.a,D=e.p,P=e.b},function(e){A=e.h},function(e){E=e.T},function(e){F=e.S},function(e){L=e.S,M=e.a}],execute:function(){var N={playContent:"_playContent_1a0ep_1",coursewarePlay:"_coursewarePlay_1a0ep_7",playModel:"_playModel_1a0ep_13",headerContainer:"_headerContainer_1a0ep_22",backBtn:"_backBtn_1a0ep_35",btnGroup:"_btnGroup_1a0ep_44",btnItem:"_btnItem_1a0ep_51",btnImg:"_btnImg_1a0ep_65",menu:"_menu_1a0ep_70",tabsContent:"_tabsContent_1a0ep_76",loadWrap:"_loadWrap_1a0ep_87",itemDiv:"_itemDiv_1a0ep_98",videoSection:"_videoSection_1a0ep_113",videoModel:"_videoModel_1a0ep_121",rightFixedBtns:"_rightFixedBtns_1a0ep_135",point:"_point_1a0ep_141",fullBtn:"_fullBtn_1a0ep_146",leftFixedBtns:"_leftFixedBtns_1a0ep_150",prePoint:"_prePoint_1a0ep_156",bottomFixedContainer:"_bottomFixedContainer_1a0ep_173",time:"_time_1a0ep_182",slider:"_slider_1a0ep_189",actions:"_actions_1a0ep_192",actionBtn:"_actionBtn_1a0ep_199",popup:"_popup_1a0ep_208",overlayClass:"_overlayClass_1a0ep_211"},R=n({name:"video-class",props:{item:{type:Object,default:function(){return{}}},modal:{type:Boolean,default:!0}},emits:["loadedmetadata","togglePlay","ended","reset","error","close","changeModal"],setup:function(e,t){var n=t.emit,a=i(e),o=a.item,v=a.modal,f=r(),_="video"+Date.now()+Math.floor(100*Math.random()),g=function(){f.value&&(m((function(){var e;null===(e=f.value)||void 0===e||e.pause()})),console.log(e.item,o.value),f.value.poster(e.item.coverImg),f.value.src(e.item.content),f.value.loop(e.item.loop),f.value.autoplay(e.item.autoplay),f.value.one("loadedmetadata",(function(e){var t;o.value.autoplay&&f.value&&(null===(t=f.value)||void 0===t||t.play());var a=f.value;o.value.duration=a.duration(),o.value.videoEle=a,o.value.loaded=!0,n("loadedmetadata",f.value)})),f.value.on("timeupdate",(function(){if(o.value.loaded){var e=f.value;o.value.currentTime=e.currentTime()}})),f.value.on("ended",(function(){n("ended",o.value)})),f.value.on("pause",(function(){var e;console.log("暂停"),o.value.paused=!0,null===(e=o.value.videoEle)||void 0===e||e.pause()})),f.value.on("play",(function(){var e,t,n;(o.value.paused=!1,o.value.muted)&&(o.value.muted=!1,null===(e=o.value.videoEle)||void 0===e||e.muted(!1),null===(t=o.value.videoEle)||void 0===t||t.volume(1),null===(n=o.value.videoEle)||void 0===n||n.pause())})),f.value.on("error",(function(){n("error")})))};return l((function(){f.value=E(_,{appID:"",controls:!1,loop:o.value.loop,muted:!1}),g()})),u((function(){return e.item}),(function(){g()})),function(){return c(p,null,[c("div",{class:N.itemDiv,onClick:function(){clearTimeout(o.value.timer),n("changeModal",!v.value)}},[c("video",{id:_,style:{height:"100%",width:"100%"},playsinline:"false",preload:"auto",class:"player",poster:"./assets/icon-videobg.2414ec8d.png","data-vid":o.value.id,src:o.value.content,loop:o.value.loop,autoplay:o.value.autoplay,muted:o.value.muted},[c("source",{src:o.value.content,type:"video/mp4"},null)]),c("div",{class:N.videoSection},null)]),c(s,{name:"bottom"},{default:function(){return[v.value&&!o.value.muted&&c("div",{class:N.bottomFixedContainer},[c("div",{class:N.time},[c("span",null,[d(o.value.currentTime)]),c("span",null,[d(o.value.duration)])]),c("div",{class:N.slider},[o.value.duration&&c(F,{buttonSize:16,modelValue:o.value.currentTime,min:0,max:o.value.duration},null)]),c("div",{class:N.actions},[c("div",{class:N.actionBtn},[o.value.paused?c("img",{src:B,onClick:function(){var e;clearTimeout(o.value.timer),null===(e=o.value.videoEle)||void 0===e||e.play(),o.value.paused=!1,o.value.timer=setTimeout((function(){n("changeModal",!1)}),4e3)}},null):c("img",{src:S,onClick:function(){var e;clearTimeout(o.value.timer),null===(e=o.value.videoEle)||void 0===e||e.pause(),o.value.paused=!0}},null)])])])]}})])}}});var z="VIDEO",G="SONG";e("default",n({name:"exercise-after-class",setup:function(){var e=v(),n=f({width:"100vw"}),i=function(){var e=Math.min(screen.width,screen.height)*(16/9);e>Math.max(screen.width,screen.height)?n.width="100vw":n.width=e+"px"},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;i(),y({api:"setRequestedOrientation",content:{orientation:e}}),y({api:"setStatusBarVisibility",content:{isVisibility:e}})};d(),_((function(){d(1)}));var m=g();b();var B=m.query,S=h(),E=r(),F=f({videoData:null,trainings:[],trainingTimes:0,itemList:[],showHead:!0,loading:!0,recordLoading:!1,isPlayBaseStatus:!0,isPlayAll:!0}),V=f({nowTime:0,model:!0,timer:null,item:null}),q=function(){var e=o(regeneratorRuntime.mark((function e(){var t,n,i,r,o,l,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,C.post(j.platformApi+"/studentLessonTraining/trainingRecord/".concat(B.courseScheduleId,"?userId=").concat(null===(t=j.user)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.id),{hideLoading:!0});case 3:if(r=e.sent,!Array.isArray(null==r||null===(i=r.data)||void 0===i?void 0:i.trainings)){e.next=10;break}return l=(null==r||null===(o=r.data)||void 0===o?void 0:o.trainings)||[],u=[],l.forEach((function(e){u.push.apply(u,a(e.studentLessonTrainingDetails||[]))})),u.forEach((function(e){var t={};try{t=JSON.parse(e.trainingContent)}catch(n){t=""}t.practiceTimes!==e.trainingTimes+""&&(F.isPlayAll=!1),e.materialId==m.query.materialId&&(J.tabName=e.knowledgePointName)})),e.abrupt("return",u);case 10:e.next=14;break;case 12:e.prev=12,e.t0=e.catch(0);case 14:return e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=o(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Array.isArray(n)&&(F.trainings=n.map((function(e){try{e.trainingContent=JSON.parse(e.trainingContent)}catch(n){e.trainingContent=""}return t(t({},e),{},{currentTime:0,duration:100,paused:!0,loop:!1,videoEle:null,timer:null,muted:!0,autoplay:!0})})),F.itemList=F.trainings.filter((function(e){return e.materialId==m.query.materialId})),F.videoData=F.itemList[0],Z());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();l(o(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q();case 2:(t=e.sent).forEach((function(e){var t={};try{t=JSON.parse(e.trainingContent)}catch(n){t=""}t.practiceTimes!==e.trainingTimes+""&&(F.isPlayBaseStatus=!1)})),W(t),A();case 6:case"end":return e.stop()}}),e)}))));var Y=function(){y({api:"back"})},H=r(),J=f({firstIndex:0,open:!1,activeIndex:-1,tabActive:"",tabName:"",itemActive:"",itemName:""}),$=function(){var e=o(regeneratorRuntime.mark((function e(t){var n,a,i,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!F.recordLoading){e.next=2;break}return e.abrupt("return");case 2:return console.log("记录观看次数"),F.recordLoading=!0,a=m.query,i={materialType:"VIDEO",record:{sourceTime:t.duration,clientType:j.platformType,feature:"LESSON_TRAINING",deviceType:S.android?"ANDROID":S.isApp?"IOS":"WEB"},courseScheduleId:a.courseScheduleId,lessonTrainingId:a.lessonTrainingId,materialId:(null===(n=F.videoData)||void 0===n?void 0:n.materialId)||""},e.prev=6,e.next=9,C.post(j.platformApi+"/studentLessonTraining/lessonTrainingRecord",{data:i,hideLoading:!0});case 9:e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:return F.recordLoading=!1,e.prev=15,e.next=18,q();case 18:r=e.sent,Array.isArray(r)&&(o=r.find((function(e){var t;return e.materialId==(null===(t=F.videoData)||void 0===t?void 0:t.materialId)})))&&(F.videoData.trainingTimes=o.trainingTimes,Z()),e.next=24;break;case 22:e.prev=22,e.t1=e.catch(15);case 24:case"end":return e.stop()}}),e,null,[[6,12],[15,22]])})));return function(t){return e.apply(this,arguments)}}(),U=function(){F.itemList.forEach((function(e){var t;null===(t=e.videoEle)||void 0===t||t.pause()}))},Z=function e(){var t,n,a,i;if(0!=(null==F||null===(t=F.videoData)||void 0===t?void 0:t.trainingTimes)&&(null==F||null===(n=F.videoData)||void 0===n?void 0:n.trainingTimes)+""===(null===(a=F.videoData)||void 0===a||null===(i=a.trainingContent)||void 0===i?void 0:i.practiceTimes)){var r=!1,o=0;if(F.isPlayBaseStatus)o=F.trainings.findIndex((function(e){var t;return e.materialId==(null===(t=F.videoData)||void 0===t?void 0:t.materialId)})),r=o===F.trainings.length-1;else{var l=-1,u=!0;F.trainings.forEach((function(e,t){e.trainingContent.practiceTimes!==e.trainingTimes+""&&-1===l&&(l=t),e.trainingContent.practiceTimes!==e.trainingTimes+""&&(u=!1)})),o=-1!=l?l-1:-1,r=u}O({title:"课后作业",message:"你已完成该练习~",confirmButtonColor:"var(--van-primary)",confirmButtonText:r?"完成":"下一题",cancelButtonText:"继续"}).then((function(){if(r)y({api:"goBack"});else{var t=F.trainings[o+1];if(t.knowledgePointName&&(J.tabName=t.knowledgePointName),(null==t?void 0:t.type)===z&&(F.itemList=[t],F.videoData=t,e()),(null==t?void 0:t.type)===G){d(1),Y();var n=k.stringify({id:t.content,courseScheduleId:B.courseScheduleId,lessonTrainingId:B.lessonTrainingId,materialId:t.materialId}),a="".concat(location.origin,"/orchestra-music-score/?")+n;y({api:"openAccompanyWebView",content:{url:a,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}}})).catch((function(){F.trainings[o].currentTime=0}))}};u(e,(function(e){U(),"visible"==e&&y({api:"setRequestedOrientation",content:{orientation:0}},(function(){console.log(234)}))}));var K=function(){U();var e=window.location.origin+location.pathname+"#/accompany";y({api:"openWebView",content:{url:e,orientation:1}})};return function(){var e,t;return c("div",{class:N.playContent},[c("div",{class:N.coursewarePlay,style:{width:n.width}},[c(L,{style:{height:"100%"},ref:H,showIndicators:!1,loop:!1,vertical:!0,lazyRender:!0,touchable:!1,duration:0},(t=e=F.itemList.map((function(e,t){return c(M,null,{default:function(){return[c(p,null,[c(R,{item:e,modal:V.model,onEnded:function(e){return $(e)},onChangeModal:function(e){V.model=e}},null),e.muted&&c("div",{class:N.loadWrap},[c(x,{animationData:D},null)])])]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!I(t)?e:{default:function(){return[e]}})),c(s,{name:"top"},{default:function(){var e,t,n;return[V.model&&c("div",{class:N.headerContainer,ref:E},[c("div",{class:N.backBtn,onClick:function(){return Y()}},[c(w,{name:P},null),T("返回")]),c("div",{class:N.menu},[J.tabName]),c("div",{class:N.nums},[T("观看视频模仿并练习:"),(null===(e=F.videoData)||void 0===e?void 0:e.trainingTimes)||0,T("/"),(null===(t=F.videoData)||void 0===t||null===(n=t.trainingContent)||void 0===n?void 0:n.practiceTimes)||0])])]}}),c(s,{name:"right"},{default:function(){return[V.model&&c("div",{class:N.btnGroup},[c("div",{class:N.btnItem,onClick:K},[c("img",{src:"./assets/icon-go-practice.044c0cd2.svg",class:N.btnImg},null),c("span",null,[T("去练习")])])])]}})])])}}}))}}}))}();