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.fba2875c.js","./index-legacy.199a0ec1.js","./index-legacy.7d84de09.js","./index-legacy.632c23f1.js","./index-legacy.0869e125.js","./index-legacy.a7012d0a.js","./index-legacy.edb65d0c.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./index-legacy.31c636a4.js","./index-legacy.a026685b.js","./live-item-legacy.0569dec7.js","./index-legacy.7dcec7b3.js","./index-legacy.d92f7da7.js","./index-legacy.78361179.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.d2829e23.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.f231f1c5.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.8752ccde.js","./use-id-legacy.db87b112.js","./use-refs-legacy.2affcb61.js","./code-down-load-legacy.cfefc939.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.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,_,w,L,x;return{setters:[function(e){n=e.d,r=e.w,o=e.g,a=e.D,i=e.T,u=e.n,c=e.j,l=e.C,d=e.F,f=e.B,m=e.z,p=e.aR,b=e.Z},function(e){h=e.C},function(e){g=e.S},function(e){y=e.U},function(e){v=e.U},function(e){I=e.L},function(){},function(){},function(e){j=e.T,_=e.a},function(e){w=e.C},function(e){L=e.C},function(e){x=e.L},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var S="_video-detail_f64bq_1",U="_introduction_f64bq_1",A="_shareCourse_f64bq_9",C="_coverClass_f64bq_17";function T(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!b(e)}e("default",n({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,s,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:e.params.videoLessonGroupId}});case 3:s=t.sent,a=s.data||{},"TEACHER"===o.platformType&&(e.myself=!a.myself),e.userInfo={id:a.lessonGroup.teacherId,username:a.lessonGroup.username,headUrl:a.lessonGroup.avatar,buyNum:a.lessonGroup.countStudent,lessonId:a.lessonGroup.id,lessonNum:a.lessonGroup.lessonCount,lessonName:a.lessonGroup.lessonName,lessonDesc:a.lessonGroup.lessonDesc,lessonPrice:a.lessonGroup.lessonPrice,lessonCoverUrl:a.lessonGroup.lessonCoverUrl,relationType:a.lessonGroup.relationType,lessonSubjectName:a.lessonGroup.lessonSubjectName,auditVersion:a.lessonGroup.auditVersion,isDegree:!!a.degreeFlag,isTeacher:!!a.teacherFlag,alreadyBuy:a.alreadyBuy},e.shelvesFlag=a.lessonGroup.shelvesFlag,e.detailList=a.detailList||[],e.shareUrl="".concat(location.origin,"/teacher#/shareVideo?recomUserId=").concat(null===(n=o.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 s,o,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,s=e.params,n.next=4,r.post("/api-teacher/videoLesson/pageStudent",{data:t({},s)});case 4:if(o=n.sent,e.loading=!1,a=o.data||{},!(e.buyUserList.length>0&&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:[S,"mb12"]},[this.userInfo.id&&c(y,{userInfo:this.userInfo},null),c(g,{border:!0},{default:function(){return[c("p",{class:U},[r.userInfo.lessonDesc])]}}),this.myself?c(g,{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: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(g,{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"},T(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},T(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[m("分享课程")]}})])]}}),"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[m("下架")]}})])]}})]),c(p,{show:this.shareStatus,"onUpdate:show":function(e){return r.shareStatus=e},style:{background:"transparent"}},{default:function(){return[c(w,{teacherId:r.userInfo.id,shareUrl:r.shareUrl,shareType:"video"},{default:function(){return[c(x,{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,avatar:r.userInfo.headUrl,studentCount:r.userInfo.buyNum,existBuy:0,subjectName:r.userInfo.lessonSubjectName}},null)]}})]}})])}}))}}}))}();
|