!function(){function e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function t(t){for(var i=1;i0&&1===r.pageNo)){a.next=9;break}return a.abrupt("return");case 9:e.list=e.list.concat(r.rows||[]),e.finished=r.pageNo>=r.totalPage,e.params.page=r.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 n(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.post("/api-teacher/videoLesson/evaluate",{data:{isTeacher:1,videoId:e.classId,content:e.message,studentId:i.user.data.userId}});case 3:r("评论成功"),e.message="",setTimeout((function(){e.onSearch()}),1e3),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]])})))()}},render:function(){var e,t,a=this;return o("div",{class:T["video-class-detail"]},[o(C,{position:"top",onGetHeight:function(e){console.log(e),a.offsetTop=e+"px"}},{default:function(){return[o(v,null,null),o(p,{src:a.srcUrl,poster:a.posterUrl,freeTitleStatus:a.lessonPrice>0||"VIP"===a.payType,freeRate:Number(a.freeRate),payType:a.payType,trySee:a.trySee,height:a.videoHeight},null),o("div",{style:"overflow: hidden"},[o(h,{border:!1,class:T.cell,title:a.title,titleClass:T.titleInfo},{icon:function(){return o(l,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return o("div",{class:T.label},[o("span",null,[a.currentClassIndex]),c("/"),a.detailList.length,c("课时")])}}),o("div",{class:T.videoDesc},[a.videoContent])])]}}),o(w,{active:this.tabIndex,"onUpdate:active":function(e){return a.tabIndex=e},class:T.infoField,color:"var(--van-primary)",lineWidth:20,sticky:!0,lazyRender:!0,offsetTop:this.offsetTop},{default:function(){return[o(y,{title:"目录",name:1},{default:function(){return[o("div",{style:{height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height))",overflowY:"auto"}},[o(g,{title:"课程列表",icon:"courseList",style:{marginBottom:"12px"}},L(e=a.detailList.map((function(e,t){var i=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:a.useRelationType}}));return o(m,{musicAlbumInfos:i,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}):r("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),o(y,{title:"讨论",name:3},{default:function(){return[o("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?o(j,{loading:a.loading,"onUpdate:loading":function(e){return a.loading=e},finished:a.finished,finishedText:" ",immediateCheck:!1,onLoad:a.getList},L(t=a.list.map((function(e){return o(h,{class:[T["message-list"],1===e.isTeacher&&T["message-active"]],valueClass:T["message-time"]},{icon:function(){return o(b,{class:T.userLogo,src:e.avatar||I,fit:"cover"},null)},title:function(){return o("div",{class:T.title},[o("div",{class:T["message-name"]},[e.userName]),o("div",{class:T["message-time"]},[d(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return o("div",{class:T.label},[e.content])}})})))?t:{default:function(){return[t]}}):o(u,{btnStatus:!1,tips:"暂无讨论"},null)]),o("div",{class:[T.messageContainer]},[o(x,{placeholder:"快来讨论吧~",modelValue:a.message,"onUpdate:modelValue":function(e){return a.message=e}},{button:function(){return o(_,{type:"primary",disabled:!a.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:a.onSubmit},{default:function(){return[c("发布")]}})}})])]}})]}})])}}))}}}))}();