!function(){function e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function t(t){for(var n=1;n0&&1===s.pageNo)){a.next=9;break}return a.abrupt("return");case 9:e.list=e.list.concat(s.rows||[]),e.finished=s.pageNo>=s.totalPage,e.params.page=s.pageNo+1,e.dataShow=e.list.length>0,a.next=19;break;case 15:a.prev=15,a.t0=a.catch(0),e.dataShow=!1,e.finished=!0;case 19:case"end":return a.stop()}}),a,null,[[0,15]])})))()},onPlay:function(e){var t=this;e.id!==Number(this.classId)&&(this.reload=!0,this.posterUrl=e.imgUrl,this.srcUrl=e.videoUrl,this.title=e.title,this.currentClassIndex=e.index,this.videoContent=e.content,this.classId=e.id,this.onSearch(),setTimeout((function(){t.reload=!1}),0))},onSubmit:function(){var e=this;return i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.post("/api-student/videoLesson/evaluate",{data:{isTeacher:0,videoId:e.classId,content:e.message,studentId:n.user.data.userId}});case 3:o("评论成功"),e.message="",setTimeout((function(){e.onSearch()}),500),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})))()}},watch:{pageVisibility:function(){var e=this;"VIP"===this.payType&&r.get("/api-student/student/queryUserInfo",{initRequest:!0}).then((function(t){l(t.data),e.__init()}))}},render:function(){var e,t,a=this;return c("div",{class:R["video-class-detail"]},[c(k,{position:"top",onGetHeight:function(e){a.offsetTop=e+"px"}},{default:function(){return[c(j,null,{default:function(){return!a.reload&&c(x,{freeRate:Number(a.freeRate),freeTitleStatus:a.lessonPrice>0,trySee:a.trySee,src:a.srcUrl,payType:a.payType,poster:a.posterUrl,height:a.videoHeight,isBuy:!0,onBuyEmit:(e=i(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("VIP"!==a.payType){e.next=3;break}return u().isApp?d({api:"openWebView",content:{url:"".concat(location.origin).concat(location.pathname,"#/memberCenter"),orientation:1,isHideTitle:!1}}):a.$router.push({path:"/memberCenter"}),e.abrupt("return");case 3:if(!(a.lessonPrice>0)){e.next=6;break}return a.$router.back(),e.abrupt("return");case 6:return e.prev=6,t=a.videoDetail,U.orderObject.orderType="VIDEO",U.orderObject.orderName="视频课购买",U.orderObject.orderDesc="视频课购买",U.orderObject.actualPrice=t.lessonPrice,U.orderObject.recomUserId="",U.orderObject.orderNo="",U.orderObject.orderList=[{orderType:"VIDEO",goodsName:"视频课购买",courseGroupId:t.id,courseGroupName:t.lessonName,coursePrice:t.lessonPrice,teacherName:t.username||"游客".concat(t.teacherId||""),teacherId:t.teacherId,avatar:t.headUrl,relationType:t.relationType,courseInfo:a.detailList,recomUserId:""}],e.next=17,S((function(){f.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){a.__init()}))}));case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(6);case 21:case"end":return e.stop()}}),e,null,[[6,19]])}))),function(){return e.apply(this,arguments)})},null);var e}}),c("div",{style:"overflow: hidden"},[c(I,{border:!1,class:R.cell,title:a.title,titleClass:[R.titleInfo,"van-ellipsis"]},{icon:function(){return c(m,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return c("div",{class:R.label},[c("span",null,[a.currentClassIndex]),h("/"),a.detailList.length,h("课时")])}}),c("div",{class:R.videoDesc},[a.videoContent])])]}}),c(w,{active:this.tabIndex,"onUpdate:active":function(e){return a.tabIndex=e},class:R.infoField,color:"var(--van-primary)",sticky:!0,offsetTop:this.offsetTop,lineWidth:20},{default:function(){return[c(T,{title:"目录",name:1},{default:function(){return[c("div",{style:{height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height))",overflowY:"auto"}},[c(b,{title:"课程列表",icon:"courseList",style:{marginBottom:"12px"}},D(e=a.detailList.map((function(e,t){var n=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:a.useRelationType}}));return c(y,{musicAlbumInfos:n,playId:Number(a.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:t+1},onPlay:a.onPlay,onMusicAlbumDetail:function(e){a.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?a.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&a.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):o("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),c(T,{title:"讨论",name:3},{default:function(){return[c("div",{style:{overflowY:"auto",height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - (var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height)))",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[a.dataShow?c(P,{loading:a.loading,"onUpdate:loading":function(e){return a.loading=e},finished:a.finished,finishedText:" ",immediateCheck:!1,onLoad:a.getList},D(t=a.list.map((function(e){return c(I,{class:[R["message-list"],1===e.isTeacher&&R["message-active"]],valueClass:R["message-time"]},{icon:function(){return c(C,{class:R.userLogo,src:e.avatar||L,fit:"cover"},null)},title:function(){return c("div",{class:R.title},[c("div",{class:R["message-name"]},[e.userName]),c("div",{class:R["message-time"]},[p(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return c("div",{class:R.label},[e.content])}})})))?t:{default:function(){return[t]}}):c(v,{btnStatus:!1,tips:"暂无讨论"},null)]),c("div",{class:R.messageContainer},[c(O,{placeholder:"快来讨论吧~",modelValue:a.message,"onUpdate:modelValue":function(e){return a.message=e}},{button:function(){return c(g,{type:"primary",disabled:!a.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:a.onSubmit},{default:function(){return[h("发布")]}})}})])]}})]}})])}}))}}}))}();