!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r0&&1===o.pageNo)){n.next=9;break}return n.abrupt("return");case 9:e.buyUserList=e.buyUserList.concat(o.rows||[]),e.finished=o.pageNo>=o.totalPage,e.params.page=o.pageNo+1,e.dataShow=e.buyUserList.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){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.videoLessonGroupId,classId:e.id}})},updateShelves:function(){var e=this;return s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.confirm({title:"提示",message:"确认下架该课程吗?",confirmButtonColor:"var(--van-primary)"}).then(s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.post("/api-teacher/videoLessonGroup/updateShelves",{data:{id:e.userInfo.lessonId,shelvesFlag:0}});case 3:d("下架成功"),setTimeout((function(){f({api:"back"})}),800),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])}))));case 1:case"end":return t.stop()}}),t)})))()}},render:function(){var e,t,s,i=this;return m("div",{class:[A,"mb12"]},[this.userInfo.id&&m(o,{userInfo:this.userInfo},null),m(r,{border:!0},{default:function(){return[m("p",{class:S},[i.userInfo.lessonDesc])]}}),this.myself?m(r,{title:"课程列表",icon:"courseList",border:!0},T(e=this.detailList.map((function(e){var t=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:i.userInfo.relationType}}));return m(n,{musicAlbumInfos:t,detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl},onPlay:i.onPlay,onMusicAlbumDetail:function(e){i.userInfo.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?i.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&i.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):d("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}}):m(r,{title:"课程列表",icon:"courseList",titleShow:!1,contentStyle:{paddingTop:"0"}},{default:function(){return[m(j,{color:"var(--van-primary)",lineWidth:20,sticky:!0},{default:function(){return[m(_,{title:"课程",titleClass:"van-hairline--bottom"},T(t=i.detailList.map((function(e){var t=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:i.userInfo.relationType}}));return m(n,{musicAlbumInfos:t,detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl},onPlay:i.onPlay,onMusicAlbumDetail:function(e){i.userInfo.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?i.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&i.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):d("数据正在更新,请稍后再试")}},null)})))?t:{default:function(){return[t]}}),m(_,{title:"学员列表",titleClass:"van-hairline--bottom"},{default:function(){return[i.dataShow?m(I,{loading:i.loading,"onUpdate:loading":function(e){return i.loading=e},finished:i.finished,finishedText:"没有更多了",onLoad:i.getList},T(s=i.buyUserList.map((function(e){return m(a,{class:"mb12",users:{avatar:e.avatar,studentId:e.userId,studentName:e.username,createTime:e.createTime}},null)})))?s:{default:function(){return[s]}}):m(p,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无学生购买"},null)]}})]}})]}}),1===this.shelvesFlag&&m(b,null,["1"==this.share&&this.detailList.length>0&&m(w,{position:"bottom",background:"white"},{default:function(){return[m("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[m(h,{block:!0,round:!0,type:"primary",onClick:function(){i.shareStatus=!0}},{default:function(){return[g("分享课程")]}})])]}}),"1"!=this.share&&this.detailList.length>0&&m(w,{position:"bottom",background:"white"},{default:function(){return[m("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[m(h,{block:!0,round:!0,type:"primary",onClick:i.updateShelves},{default:function(){return[g("下架")]}})])]}})]),m(y,{show:this.shareStatus,"onUpdate:show":function(e){return i.shareStatus=e},style:{background:"transparent"}},{default:function(){return[m(L,{teacherId:i.userInfo.id,shareUrl:i.shareUrl,shareType:"video"},{default:function(){return[m(x,{class:U,coverClass:C,liveInfo:{backgroundPic:i.userInfo.lessonCoverUrl,courseGroupId:i.userInfo.lessonId,courseGroupName:i.userInfo.lessonName,courseNum:i.userInfo.lessonNum,coursePrice:i.userInfo.lessonPrice,teacherName:i.userInfo.username,teacherId:i.userInfo.id,avatar:i.userInfo.headUrl,studentCount:i.userInfo.buyNum,existBuy:0,subjectName:i.userInfo.lessonSubjectName}},null)]}})]}})])}}))}}}))}();