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