1 |
- !function(){function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function t(t){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?e(Object(n),!0).forEach((function(e){i(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 i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t,i,a,n,o,s){try{var r=e[o](s),l=r.value}catch(c){return void i(c)}r.done?t(l):Promise.resolve(l).then(a,n)}function n(e){return function(){var t=this,i=arguments;return new Promise((function(n,o){var s=e.apply(t,i);function r(e){a(s,n,o,r,l,"next",e)}function l(e){a(s,n,o,r,l,"throw",e)}r(void 0)}))}}var o=document.createElement("style");o.innerHTML="._video-class-detail_veoie_1 ._titleInfo_veoie_1{padding-left:.21333rem;font-size:.4rem;font-weight:500;color:#1a1a1a;flex:1 auto}._video-class-detail_veoie_1 ._label_veoie_8{font-size:.37333rem;font-weight:600}._video-class-detail_veoie_1 ._label_veoie_8 span,._video-class-detail_veoie_1 .van-tab--active{color:var(--van-primary)}._video-class-detail_veoie_1 .van-field__value{background:#f7f7f7;border-radius:.8rem;padding-left:.4rem}._video-class-detail_veoie_1 .van-tab__panel{overflow:hidden}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26{margin:.32rem .37333rem .21333rem;width:auto;background-color:#fff;border-radius:.21333rem;padding:.37333rem .4rem}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 ._userLogo_veoie_33{width:1.28rem;height:1.28rem;border-radius:50%;overflow:hidden}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 .van-cell__value{display:flex;align-items:center;justify-content:space-between}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 ._teacher-info_veoie_44{display:flex;justify-content:center;flex-direction:column;padding-left:.21333rem}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 ._teacher-info_veoie_44 ._users_veoie_50{display:flex;padding-top:.13333rem}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 ._teacher-info_veoie_44 ._teacher-name_veoie_54{font-weight:500;color:#1a1a1a;line-height:1.2;font-size:.42667rem;padding-right:.21333rem}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 ._teacher-info_veoie_44 ._level_veoie_61{padding-top:.13333rem;line-height:1.2;font-size:.32rem;color:#999}._video-class-detail_veoie_1 ._open-teacher-info_veoie_26 ._teacher-desc_veoie_67{display:flex;align-items:center}._video-class-detail_veoie_1 ._videoDesc_veoie_71{background-color:#fff;padding:0 .37333rem .42667rem;margin-bottom:.16rem;font-size:.37333rem;line-height:.53333rem;color:#7a7a7a}._video-class-detail_veoie_1 ._message-list_veoie_79._message-active_veoie_79 ._title_veoie_1,._video-class-detail_veoie_1 ._message-list_veoie_79._message-active_veoie_79 ._label_veoie_8{color:var(--van-primary)!important}._video-class-detail_veoie_1 ._message-list_veoie_79 ._message-name_veoie_83{flex-basis:65%;line-height:1.2}._video-class-detail_veoie_1 ._message-list_veoie_79 ._message-time_veoie_87{font-size:.32rem;color:#999;flex-basis:35%}._video-class-detail_veoie_1 ._message-list_veoie_79 ._userLogo_veoie_33{width:.90667rem;height:.90667rem;border-radius:50%;margin-right:.21333rem;overflow:hidden}._video-class-detail_veoie_1 ._message-list_veoie_79 ._title_veoie_1{display:flex;justify-content:space-between;font-size:.37333rem;color:#999;font-weight:500}._video-class-detail_veoie_1 ._message-list_veoie_79 ._label_veoie_8{font-size:.37333rem;color:#333;line-height:.53333rem}._video-class-detail_veoie_1 ._isFixed_veoie_111{position:absolute;left:0;right:0;bottom:0}._messageContainer_veoie_117{position:fixed;bottom:0;left:0;right:0}\n",document.head.appendChild(o),System.register(["./index-legacy.6c52edfe.js","./index-legacy.f6bcdf82.js","./index-legacy.cc0fd5e8.js","./index-legacy.b2528a15.js","./index-legacy.207dc8c2.js","./index-legacy.4f922f18.js","./index-legacy.3f4943f0.js","./index-legacy.7e6f30e7.js","./index-legacy.ca42ae97.js","./index-legacy.ab501af1.js","./index-legacy.9cbe7ce8.js","./icon_student-legacy.45be2fa9.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","./plyr-legacy.180f4c53.js","./use-id-legacy.4f071235.js","./use-tab-status-legacy.5c2c2da3.js","./use-refs-legacy.2f8acfce.js"],(function(e){"use strict";var i,a,o,s,r,l,c,d,u,_,v,f,m,g,p,h,y,b,x,I,j;return{setters:[function(e){i=e.C},function(e){a=e.S},function(e){o=e.C},function(e){s=e.d,r=e.s,l=e.e,c=e.T,d=e.i,u=e.N,_=e.A,v=e.x,f=e.C,m=e.B,g=e.$},function(e){p=e.C},function(){},function(){},function(e){h=e.T,y=e.a},function(e){b=e.I},function(e){x=e.F},function(e){I=e.L},function(e){j=e.i},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w={"video-class-detail":"_video-class-detail_veoie_1",titleInfo:"_titleInfo_veoie_1",label:"_label_veoie_8","open-teacher-info":"_open-teacher-info_veoie_26",userLogo:"_userLogo_veoie_33","teacher-info":"_teacher-info_veoie_44",users:"_users_veoie_50","teacher-name":"_teacher-name_veoie_54",level:"_level_veoie_61","teacher-desc":"_teacher-desc_veoie_67",videoDesc:"_videoDesc_veoie_71","message-list":"_message-list_veoie_79","message-active":"_message-active_veoie_79",title:"_title_veoie_1","message-name":"_message-name_veoie_83","message-time":"_message-time_veoie_87",isFixed:"_isFixed_veoie_111",messageContainer:"_messageContainer_veoie_117"};function C(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!g(e)}e("default",s({name:"VideoClassDetail",data:function(){var e=this.$route.query;return{groupId:e.groupId,classId:e.classId,tabIndex:1,title:"",lessonPrice:0,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"}},computed:{users:function(){return r.user.data},offsetTop:function(){var e=this.navHeight;return Number(e)+44+"px"}},mounted:function(){var e=this;return n(regeneratorRuntime.mark((function t(){var i,a,n,o,s;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,l.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:e.groupId}});case 4:return n=t.sent,o=n.data||{},e.title=o.lessonGroup.lessonName,e.useRelationType=o.lessonGroup.relationType,e.lessonPrice=o.lessonGroup.lessonPrice,e.alreadyBuy=o.alreadyBuy,e.detailList=o.detailList||[],(null===(i=r.user.data)||void 0===i?void 0:i.userId)!==o.lessonGroup.teacherId&&(e.trySee=!o.alreadyBuy),e.detailList.forEach((function(t,i){t.id===Number(e.classId)&&(e.posterUrl=t.coverUrl,e.srcUrl=t.videoUrl,e.title=t.videoTitle,e.currentClassIndex=i+1,e.videoContent=t.videoContent)})),t.next=15,l.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_free_rate"}});case 15:s=t.sent,e.freeRate=(null===(a=s.data[0])||void 0===a?void 0:a.paramValue)||0,e.getList(),t.next=22;break;case 20:t.prev=20,t.t0=t.catch(1);case 22:case"end":return t.stop()}}),t,null,[[1,20]])})))()},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 i(){var a,n,o;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,a=e.params,i.next=4,l.post("/api-student/videoLesson/page",{data:t(t({},a),{},{videoId:e.classId})});case 4:if(n=i.sent,e.loading=!1,o=n.data||{},console.log(o),!(e.list.length>0&&1===o.pageNo)){i.next=10;break}return i.abrupt("return");case 10:e.list=e.list.concat(o.rows||[]),e.finished=o.pageNo>=o.totalPage,e.params.page=o.pageNo+1,e.dataShow=e.list.length>0,i.next=20;break;case 16:i.prev=16,i.t0=i.catch(0),e.dataShow=!1,e.finished=!0;case 20:case"end":return i.stop()}}),i,null,[[0,16]])})))()},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,l.post("/api-teacher/videoLesson/evaluate",{data:{isTeacher:1,videoId:e.classId,content:e.message,studentId:r.user.data.userId}});case 3:c("评论成功"),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,n=this;return d("div",{class:w["video-class-detail"]},[d(o,{src:this.srcUrl,poster:this.posterUrl,freeTitleStatus:this.lessonPrice>0,freeRate:Number(this.freeRate),trySee:this.trySee,height:this.videoHeight},null),d(p,{border:!1,class:w.cell,title:this.title,titleClass:w.titleInfo},{icon:function(){return d(u,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return d("div",{class:w.label},[d("span",null,[n.currentClassIndex]),_("/"),n.detailList.length,_("课时")])}}),d("div",{class:w.videoDesc},[this.videoContent]),d(h,{active:this.tabIndex,"onUpdate:active":function(e){return n.tabIndex=e},class:w.infoField,color:"var(--van-primary)",lineWidth:20,sticky:!0,lazyRender:!0,offsetTop:this.offsetTop},{default:function(){return[d(y,{title:"目录",name:1},{default:function(){return[d("div",{style:{height:"calc(100vh - 320px)",overflowY:"auto"}},[d(a,{title:"课程列表",icon:"courseList"},C(e=n.detailList.map((function(e,t){var a=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:n.useRelationType}}));return d(i,{musicAlbumInfos:a,playId:Number(n.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:t+1},onPlay:n.onPlay,onMusicAlbumDetail:function(e){n.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?n.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&n.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):c("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),d(y,{title:"讨论",name:3},{default:function(){return[d("div",{style:{overflowY:"auto",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[n.dataShow?d(I,{loading:n.loading,"onUpdate:loading":function(e){return n.loading=e},finished:n.finished,finishedText:" ",immediateCheck:!1,onLoad:n.getList},C(t=n.list.map((function(e){return d(p,{class:[w["message-list"],1===e.isTeacher&&w["message-active"]],valueClass:w["message-time"]},{icon:function(){return d(b,{class:w.userLogo,src:e.avatar||j,fit:"cover"},null)},title:function(){return d("div",{class:w.title},[d("div",{class:w["message-name"]},[e.userName]),d("div",{class:w["message-time"]},[v(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return d("div",{class:w.label},[e.content])}})})))?t:{default:function(){return[t]}}):d(f,{btnStatus:!1,tips:"暂无讨论"},null)]),d("div",{class:[w.messageContainer]},[d(x,{placeholder:"快来讨论吧~",modelValue:n.message,"onUpdate:modelValue":function(e){return n.message=e}},{button:function(){return d(m,{type:"primary",disabled:!n.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:n.onSubmit},{default:function(){return[_("发布")]}})}})])]}})]}})])}}))}}}))}();
|