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(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.f478c9a6.js","./index-legacy.4c17bd6d.js","./index-legacy.65f447aa.js","./index-legacy.d595a3f7.js","./index-legacy.43e69380.js","./index-legacy.3ccba950.js","./index-legacy.9d5cae73.js","./index-legacy.cf09c997.js","./index-legacy.ffbd6cdc.js","./index-legacy.5d9f864a.js","./live-item-legacy.7dcddb96.js","./index-legacy.6ac2a941.js","./index-legacy.c8c5bc4e.js","./index-legacy.4be048cf.js","./index-legacy.9d25098b.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.4391adb4.js","./icon_music_active-legacy.51780227.js","./index-legacy.7ce7fe04.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon_student-legacy.49eef9e9.js","./use-tab-status-legacy.d7434e0b.js","./use-id-legacy.ef8b5e97.js","./use-refs-legacy.d925b49f.js","./code-down-load-legacy.4137246a.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.da3142a2.js","./html2canvas.esm-legacy.19f9c2b7.js","./index-legacy.4bad5b90.js"],(function(e){"use strict";var n,r,o,a,i,u,c,l,d,f,p,m,b,h,y,g,v,I,j,_,x,L,w,S;return{setters:[function(e){n=e.d,r=e.y,o=e.g,a=e.D,i=e.T,u=e.n,c=e.j,l=e.C,d=e.F,f=e.B,p=e.A,m=e.aS,b=e.$},function(e){h=e.C},function(e){y=e.S},function(e){g=e.U},function(e){v=e.U},function(e){I=e.L},function(){},function(){},function(e){j=e.T,_=e.a},function(e){x=e.C},function(e){L=e.C},function(e){w=e.L},function(e){S=e.C},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var T="_video-detail_f64bq_1",U="_introduction_f64bq_1",A="_shareCourse_f64bq_9",C="_coverClass_f64bq_17";function G(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,payType:a.lessonGroup.payType,type:"video",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,"&p=tenant"),console.log(e.shareUrl,"shareVideo"),!e.myself&&e.getList(),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})))()},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:[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)]}})]}})])}}))}}}))}();
|