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