video-detail-legacy.9d43d625.js 10.0 KB

1
  1. !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;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?e(Object(s),!0).forEach((function(e){n(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,s,o,a){try{var i=e[o](a),u=i.value}catch(c){return void n(c)}i.done?t(u):Promise.resolve(u).then(r,s)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(s,o){var a=e.apply(t,n);function i(e){r(a,s,o,i,u,"next",e)}function u(e){r(a,s,o,i,u,"throw",e)}i(void 0)}))}}var o=document.createElement("style");o.innerHTML="._video-detail_f64bq_1 ._introduction_f64bq_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._video-detail_f64bq_1 .van-tabs__wrap{margin-bottom:.4rem}._video-detail_f64bq_1 ._shareCourse_f64bq_9{margin:0;padding:.21333rem;background:#fff}._video-detail_f64bq_1 ._shareCourse_f64bq_9 .itemTitle{max-width:2.93333rem!important}._video-detail_f64bq_1 ._coverClass_f64bq_17{width:4.37333rem!important;height:2.45333rem!important}\n",document.head.appendChild(o),System.register(["./index-legacy.6c52edfe.js","./index-legacy.f6bcdf82.js","./index-legacy.b6d96b2d.js","./index-legacy.d08d293d.js","./index-legacy.b2528a15.js","./index-legacy.9cbe7ce8.js","./index-legacy.4f922f18.js","./index-legacy.3f4943f0.js","./index-legacy.7e6f30e7.js","./index-legacy.47b1cde1.js","./index-legacy.c99e8e49.js","./live-item-legacy.1f5440b3.js","./index-legacy.207dc8c2.js","./index-legacy.ca42ae97.js","./index-legacy.edff980f.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.d2829e23.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.a7e74731.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js","./icon_student-legacy.45be2fa9.js","./use-tab-status-legacy.5c2c2da3.js","./use-id-legacy.4f071235.js","./use-refs-legacy.2f8acfce.js","./code-down-load-legacy.5a78d39b.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.8b7c8200.js"],(function(e){"use strict";var n,r,o,a,i,u,c,l,d,f,m,p,b,h,g,y,v,I,j,_,L,w,x;return{setters:[function(e){n=e.C},function(e){r=e.S},function(e){o=e.U},function(e){a=e.U},function(e){i=e.d,u=e.e,c=e.s,l=e.D,d=e.T,f=e.p,m=e.i,p=e.C,b=e.F,h=e.B,g=e.A,y=e.aT,v=e.$},function(e){I=e.L},function(){},function(){},function(e){j=e.T,_=e.a},function(e){L=e.C},function(e){w=e.C},function(e){x=e.L},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var A="_video-detail_f64bq_1",S="_introduction_f64bq_1",U="_shareCourse_f64bq_9",C="_coverClass_f64bq_17";function T(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!v(e)}e("default",i({name:"VideoDetail",data:function(){var e=this.$route.query;return{userInfo:{},detailList:[],musicAlbumInfos:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,share:e.share,params:{videoLessonGroupId:e.groupId,page:1,rows:20},shareStatus:!1,shareUrl:"",shelvesFlag:0,myself:!1}},mounted:function(){var e=this;return s(regeneratorRuntime.mark((function t(){var n,r,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:e.params.videoLessonGroupId}});case 3:r=t.sent,s=r.data||{},"TEACHER"===c.platformType&&(e.myself=!s.myself),e.userInfo={id:s.lessonGroup.teacherId,username:s.lessonGroup.username,headUrl:s.lessonGroup.avatar,buyNum:s.lessonGroup.countStudent,lessonId:s.lessonGroup.id,lessonNum:s.lessonGroup.lessonCount,lessonName:s.lessonGroup.lessonName,lessonDesc:s.lessonGroup.lessonDesc,lessonPrice:s.lessonGroup.lessonPrice,lessonCoverUrl:s.lessonGroup.lessonCoverUrl,relationType:s.lessonGroup.relationType,lessonSubjectName:s.lessonGroup.lessonSubjectName,auditVersion:s.lessonGroup.auditVersion,isDegree:!!s.degreeFlag,isTeacher:!!s.teacherFlag,alreadyBuy:s.alreadyBuy},e.shelvesFlag=s.lessonGroup.shelvesFlag,e.detailList=s.detailList||[],e.shareUrl="".concat(location.origin,"/teacher#/shareVideo?recomUserId=").concat(null===(n=c.user.data)||void 0===n?void 0:n.userId,"&groupId=").concat(e.params.videoLessonGroupId),!e.myself&&e.getList(),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}}),t,null,[[0,13]])})))()},methods:{getList:function(){var e=this;return s(regeneratorRuntime.mark((function n(){var r,s,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=e.params,n.next=4,u.post("/api-teacher/videoLesson/pageStudent",{data:t({},r)});case 4:if(s=n.sent,e.loading=!1,o=s.data||{},!(e.buyUserList.length>0&&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)]}})]}})])}}))}}}))}();