!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;a0&&1===r.pageNo)){n.next=9;break}return n.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,n.next=19;break;case 15:n.prev=15,n.t0=n.catch(0),e.dataShow=!1,e.finished=!0;case 19:case"end":return n.stop()}}),n,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,c.post("/api-student/videoLesson/evaluate",{data:{isTeacher:0,videoId:e.classId,content:e.message,studentId:l.user.data.userId}});case 3:u("评论成功"),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]])})))()}},render:function(){var e,t,o=this;return d("div",{class:L["video-class-detail"]},[d(r,null,{default:function(){return!o.reload&&d(s,{freeRate:Number(o.freeRate),freeTitleStatus:o.lessonPrice>0,trySee:o.trySee,src:o.srcUrl,poster:o.posterUrl,height:o.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(!(o.lessonPrice>0)){e.next=3;break}return o.$router.back(),e.abrupt("return");case 3:return e.prev=3,t=o.videoDetail,O.orderObject.orderType="VIDEO",O.orderObject.orderName="视频课购买",O.orderObject.orderDesc="视频课购买",O.orderObject.actualPrice=t.lessonPrice,O.orderObject.recomUserId="",O.orderObject.orderNo="",O.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:o.detailList,recomUserId:""}],e.next=14,C((function(){f.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){o.__init()}))}));case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(3);case 18:case"end":return e.stop()}}),e,null,[[3,16]])}))),function(){return e.apply(this,arguments)})},null);var e}}),d(y,{border:!1,class:L.cell,title:this.title,titleClass:[L.titleInfo,"van-ellipsis"]},{icon:function(){return d(p,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return d("div",{class:L.label},[d("span",null,[o.currentClassIndex]),m("/"),o.detailList.length,m("课时")])}}),d("div",{class:L.videoDesc},[this.videoContent]),d(b,{active:this.tabIndex,"onUpdate:active":function(e){return o.tabIndex=e},class:L.infoField,color:"var(--van-primary)",sticky:!0,offsetTop:this.offsetTop,lineWidth:20},{default:function(){return[d(k,{title:"目录",name:1},{default:function(){return[d("div",{style:{overflowY:"auto"}},[d(a,{title:"课程列表",icon:"courseList",border:!0},T(e=o.detailList.map((function(e,t){var a=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:o.useRelationType}}));return d(n,{musicAlbumInfos:a,playId:Number(o.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:t+1},onPlay:o.onPlay,onMusicAlbumDetail:function(e){o.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?o.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&o.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):u("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),d(k,{title:"讨论",name:3},{default:function(){return[d("div",{style:{overflowY:"auto",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[o.dataShow?d(I,{loading:o.loading,"onUpdate:loading":function(e){return o.loading=e},finished:o.finished,finishedText:" ",immediateCheck:!1,onLoad:o.getList},T(t=o.list.map((function(e){return d(y,{class:[L["message-list"],1===e.isTeacher&&L["message-active"]],valueClass:L["message-time"]},{icon:function(){return d(x,{class:L.userLogo,src:e.avatar||w,fit:"cover"},null)},title:function(){return d("div",{class:L.title},[d("div",{class:L["message-name"]},[e.userName]),d("div",{class:L["message-time"]},[h(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return d("div",{class:L.label},[e.content])}})})))?t:{default:function(){return[t]}}):d(_,{btnStatus:!1,tips:"暂无讨论"},null)]),d("div",{class:L.messageContainer},[d(j,{placeholder:"快来讨论吧~",modelValue:o.message,"onUpdate:modelValue":function(e){return o.message=e}},{button:function(){return d(v,{type:"primary",disabled:!o.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:o.onSubmit},{default:function(){return[m("发布")]}})}})])]}})]}})])}}))}}}))}();