video-class-detail-legacy.24923b48.js 13 KB

1
  1. !function(){function e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,i)}return a}function t(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t,a,i,n,s,r){try{var o=e[s](r),l=o.value}catch(c){return void a(c)}o.done?t(l):Promise.resolve(l).then(i,n)}function n(e){return function(){var t=this,a=arguments;return new Promise((function(n,s){var r=e.apply(t,a);function o(e){i(r,n,s,o,l,"next",e)}function l(e){i(r,n,s,o,l,"throw",e)}o(void 0)}))}}var s=document.createElement("style");s.innerHTML="._video-class-detail_1914w_1 ._titleInfo_1914w_1{padding-left:.21333rem;font-size:.4rem;font-weight:500;color:#1a1a1a;flex:1 auto}._video-class-detail_1914w_1 ._label_1914w_8{font-size:.37333rem;font-weight:600}._video-class-detail_1914w_1 ._label_1914w_8 span,._video-class-detail_1914w_1 .van-tab--active{color:var(--van-primary)}._video-class-detail_1914w_1 .van-field__value{background:#f7f7f7;border-radius:.8rem;padding-left:.4rem}._video-class-detail_1914w_1 .van-tab__panel{overflow:hidden}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26{margin:.32rem .37333rem .21333rem;width:auto;background-color:#fff;border-radius:.21333rem;padding:.37333rem .4rem}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 ._userLogo_1914w_33{width:1.28rem;height:1.28rem;border-radius:50%;overflow:hidden}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 .van-cell__value{display:flex;align-items:center;justify-content:space-between}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 ._teacher-info_1914w_44{display:flex;justify-content:center;flex-direction:column;padding-left:.21333rem}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 ._teacher-info_1914w_44 ._users_1914w_50{display:flex;padding-top:.13333rem}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 ._teacher-info_1914w_44 ._teacher-name_1914w_54{font-weight:500;color:#1a1a1a;line-height:1.2;font-size:.42667rem;padding-right:.21333rem}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 ._teacher-info_1914w_44 ._level_1914w_61{padding-top:.13333rem;line-height:1.2;font-size:.32rem;color:#999}._video-class-detail_1914w_1 ._open-teacher-info_1914w_26 ._teacher-desc_1914w_67{display:flex;align-items:center}._video-class-detail_1914w_1 ._videoDesc_1914w_71{background-color:#fff;padding:0 .37333rem .32rem;margin-bottom:.16rem;font-size:.37333rem;line-height:.53333rem;color:#7a7a7a}._video-class-detail_1914w_1 ._message-list_1914w_79._message-active_1914w_79 ._title_1914w_1,._video-class-detail_1914w_1 ._message-list_1914w_79._message-active_1914w_79 ._label_1914w_8{color:var(--van-primary)!important}._video-class-detail_1914w_1 ._message-list_1914w_79 ._message-name_1914w_83{flex-basis:65%;line-height:1.2}._video-class-detail_1914w_1 ._message-list_1914w_79 ._message-time_1914w_87{font-size:.32rem;color:#999;flex-basis:35%}._video-class-detail_1914w_1 ._message-list_1914w_79 ._userLogo_1914w_33{width:.90667rem;height:.90667rem;border-radius:50%;margin-right:.21333rem;overflow:hidden}._video-class-detail_1914w_1 ._message-list_1914w_79 ._title_1914w_1{display:flex;justify-content:space-between;font-size:.37333rem;color:#999;font-weight:500}._video-class-detail_1914w_1 ._message-list_1914w_79 ._label_1914w_8{font-size:.37333rem;color:#333;line-height:.53333rem}._video-class-detail_1914w_1 ._isFixed_1914w_111{position:absolute;left:0;right:0;bottom:0}._messageContainer_1914w_117{position:fixed;bottom:0;left:0;right:0}\n",document.head.appendChild(s),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.b813135f.js","./index-legacy.d9279c92.js","./index-legacy.87bcd48f.js","./index-legacy.a3c6b414.js","./index-legacy.610f0a70.js","./index-legacy.6a5df59c.js","./index-legacy.7e047c4c.js","./index-legacy.183eabe8.js","./index-legacy.4a75d877.js","./index-legacy.78ce4f6b.js","./index-legacy.c07bb851.js","./icon_student-legacy.49eef9e9.js","./index-legacy.02065493.js","./index-legacy.a85d660d.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.4391adb4.js","./icon_music_active-legacy.51780227.js","./index-legacy.fd89cccf.js","./plyr-legacy.2bfabaee.js","./tcplayer.v4.8.0.min-legacy.2a56ab95.js","./use-id-legacy.54528695.js","./use-tab-status-legacy.1f35f332.js","./use-refs-legacy.82f31dee.js","./index-legacy.bbc2b10e.js"],(function(e){"use strict";var a,i,s,r,o,l,c,d,u,_,f,m,g,v,p,h,w,y,b,x,j,I,C;return{setters:[function(e){a=e.d,i=e.g,s=e.y,r=e.T,o=e.j,l=e.N,c=e.A,d=e.w,u=e.C,_=e.B,f=e.$},function(e){m=e.C},function(e){g=e.S},function(e){v=e.C},function(e){p=e.C},function(e){h=e.C},function(){},function(){},function(e){w=e.T,y=e.a},function(e){b=e.I},function(e){x=e.F},function(e){j=e.L},function(e){I=e.s},function(e){C=e.C},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var T={"video-class-detail":"_video-class-detail_1914w_1",titleInfo:"_titleInfo_1914w_1",label:"_label_1914w_8","open-teacher-info":"_open-teacher-info_1914w_26",userLogo:"_userLogo_1914w_33","teacher-info":"_teacher-info_1914w_44",users:"_users_1914w_50","teacher-name":"_teacher-name_1914w_54",level:"_level_1914w_61","teacher-desc":"_teacher-desc_1914w_67",videoDesc:"_videoDesc_1914w_71","message-list":"_message-list_1914w_79","message-active":"_message-active_1914w_79",title:"_title_1914w_1","message-name":"_message-name_1914w_83","message-time":"_message-time_1914w_87",isFixed:"_isFixed_1914w_111",messageContainer:"_messageContainer_1914w_117"};function L(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!f(e)}e("default",a({name:"VideoClassDetail",data:function(){var e=this.$route.query;return{groupId:e.groupId,classId:e.classId,tabIndex:1,title:"",lessonPrice:0,payType:"",useRelationType:"",alreadyBuy:!1,currentClassIndex:1,detailList:[],posterUrl:"",srcUrl:"",message:"",navHeight:0,reload:!1,videoContent:"",list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:20},freeRate:0,trySee:!1,videoHeight:"212px",offsetTop:"auto"}},computed:{users:function(){return i.user.data}},mounted:function(){var e=this;return n(regeneratorRuntime.mark((function t(){var a,n,r,o,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.navHeight=sessionStorage.getItem("navHeight")||0,t.prev=1,t.next=4,s.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:e.groupId}});case 4:return r=t.sent,o=r.data||{},e.title=o.lessonGroup.lessonName,e.useRelationType=o.lessonGroup.relationType,e.lessonPrice=o.lessonGroup.lessonPrice,e.payType=o.lessonGroup.payType,e.alreadyBuy=o.alreadyBuy,e.detailList=o.detailList||[],(null===(a=i.user.data)||void 0===a?void 0:a.userId)!==o.lessonGroup.teacherId&&(e.trySee=!o.alreadyBuy),e.detailList.forEach((function(t,a){t.id===Number(e.classId)&&(e.posterUrl=t.coverUrl,e.srcUrl=t.videoUrl,e.title=t.videoTitle,e.currentClassIndex=a+1,e.videoContent=t.videoContent)})),t.next=16,s.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_free_rate"}});case 16:l=t.sent,e.freeRate=(null===(n=l.data[0])||void 0===n?void 0:n.paramValue)||0,e.getList(),t.next=23;break;case 21:t.prev=21,t.t0=t.catch(1);case 23:case"end":return t.stop()}}),t,null,[[1,21]])})))()},methods:{onSearch:function(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},getList:function(){var e=this;return n(regeneratorRuntime.mark((function a(){var i,n,r;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,i=e.params,a.next=4,s.post("/api-student/videoLesson/page",{data:t(t({},i),{},{videoId:e.classId})});case 4:if(n=a.sent,e.loading=!1,r=n.data||{},!(e.list.length>0&&1===r.pageNo)){a.next=9;break}return a.abrupt("return");case 9:e.list=e.list.concat(r.rows||[]),e.finished=r.pageNo>=r.totalPage,e.params.page=r.pageNo+1,e.dataShow=e.list.length>0,a.next=19;break;case 15:a.prev=15,a.t0=a.catch(0),e.dataShow=!1,e.finished=!0;case 19:case"end":return a.stop()}}),a,null,[[0,15]])})))()},onPlay:function(e){var t=this;e.id!==Number(this.classId)&&(this.reload=!0,this.posterUrl=e.imgUrl,this.srcUrl=e.videoUrl,this.title=e.title,this.currentClassIndex=e.index,this.videoContent=e.content,this.classId=e.id,this.onSearch(),setTimeout((function(){t.reload=!1}),0))},onSubmit:function(){var e=this;return n(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.post("/api-teacher/videoLesson/evaluate",{data:{isTeacher:1,videoId:e.classId,content:e.message,studentId:i.user.data.userId}});case 3:r("评论成功"),e.message="",setTimeout((function(){e.onSearch()}),1e3),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})))()}},render:function(){var e,t,a=this;return o("div",{class:T["video-class-detail"]},[o(C,{position:"top",onGetHeight:function(e){console.log(e),a.offsetTop=e+"px"}},{default:function(){return[o(v,null,null),o(p,{src:a.srcUrl,poster:a.posterUrl,freeTitleStatus:a.lessonPrice>0||"VIP"===a.payType,freeRate:Number(a.freeRate),payType:a.payType,trySee:a.trySee,height:a.videoHeight},null),o("div",{style:"overflow: hidden"},[o(h,{border:!1,class:T.cell,title:a.title,titleClass:T.titleInfo},{icon:function(){return o(l,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return o("div",{class:T.label},[o("span",null,[a.currentClassIndex]),c("/"),a.detailList.length,c("课时")])}}),o("div",{class:T.videoDesc},[a.videoContent])])]}}),o(w,{active:this.tabIndex,"onUpdate:active":function(e){return a.tabIndex=e},class:T.infoField,color:"var(--van-primary)",lineWidth:20,sticky:!0,lazyRender:!0,offsetTop:this.offsetTop},{default:function(){return[o(y,{title:"目录",name:1},{default:function(){return[o("div",{style:{height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height))",overflowY:"auto"}},[o(g,{title:"课程列表",icon:"courseList",style:{marginBottom:"12px"}},L(e=a.detailList.map((function(e,t){var i=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:a.useRelationType}}));return o(m,{musicAlbumInfos:i,playId:Number(a.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:t+1},onPlay:a.onPlay,onMusicAlbumDetail:function(e){a.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?a.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&a.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):r("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),o(y,{title:"讨论",name:3},{default:function(){return[o("div",{style:{overflowY:"auto",height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height) - (var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height)))",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[a.dataShow?o(j,{loading:a.loading,"onUpdate:loading":function(e){return a.loading=e},finished:a.finished,finishedText:" ",immediateCheck:!1,onLoad:a.getList},L(t=a.list.map((function(e){return o(h,{class:[T["message-list"],1===e.isTeacher&&T["message-active"]],valueClass:T["message-time"]},{icon:function(){return o(b,{class:T.userLogo,src:e.avatar||I,fit:"cover"},null)},title:function(){return o("div",{class:T.title},[o("div",{class:T["message-name"]},[e.userName]),o("div",{class:T["message-time"]},[d(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return o("div",{class:T.label},[e.content])}})})))?t:{default:function(){return[t]}}):o(u,{btnStatus:!1,tips:"暂无讨论"},null)]),o("div",{class:[T.messageContainer]},[o(x,{placeholder:"快来讨论吧~",modelValue:a.message,"onUpdate:modelValue":function(e){return a.message=e}},{button:function(){return o(_,{type:"primary",disabled:!a.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:a.onSubmit},{default:function(){return[c("发布")]}})}})])]}})]}})])}}))}}}))}();