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.fba2875c.js","./index-legacy.199a0ec1.js","./index-legacy.7d84de09.js","./index-legacy.57355ab1.js","./index-legacy.7dcec7b3.js","./index-legacy.edb65d0c.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./index-legacy.d92f7da7.js","./index-legacy.8921f068.js","./index-legacy.a7012d0a.js","./icon_student-legacy.45be2fa9.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","./plyr-legacy.180f4c53.js","./use-id-legacy.db87b112.js","./use-tab-status-legacy.8752ccde.js","./use-refs-legacy.2affcb61.js"],(function(e){"use strict";var i,a,o,s,r,l,c,d,u,_,v,f,m,g,p,h,b,y,x,j,I;return{setters:[function(e){i=e.d,a=e.g,o=e.w,s=e.T,r=e.j,l=e.M,c=e.z,d=e.u,u=e.C,_=e.B,v=e.Z},function(e){f=e.C},function(e){m=e.S},function(e){g=e.C},function(e){p=e.C},function(){},function(){},function(e){h=e.T,b=e.a},function(e){y=e.I},function(e){x=e.F},function(e){j=e.L},function(e){I=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)&&!v(e)}e("default",i({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 a.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,n,s,r,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,o.get("/api-teacher/videoLessonGroup/selectVideoLesson",{params:{groupId:e.groupId}});case 4:return s=t.sent,r=s.data||{},e.title=r.lessonGroup.lessonName,e.useRelationType=r.lessonGroup.relationType,e.lessonPrice=r.lessonGroup.lessonPrice,e.alreadyBuy=r.alreadyBuy,e.detailList=r.detailList||[],(null===(i=a.user.data)||void 0===i?void 0:i.userId)!==r.lessonGroup.teacherId&&(e.trySee=!r.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,o.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_free_rate"}});case 15:l=t.sent,e.freeRate=(null===(n=l.data[0])||void 0===n?void 0:n.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,s;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,a=e.params,i.next=4,o.post("/api-student/videoLesson/page",{data:t(t({},a),{},{videoId:e.classId})});case 4:if(n=i.sent,e.loading=!1,s=n.data||{},console.log(s),!(e.list.length>0&&1===s.pageNo)){i.next=10;break}return i.abrupt("return");case 10:e.list=e.list.concat(s.rows||[]),e.finished=s.pageNo>=s.totalPage,e.params.page=s.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,o.post("/api-teacher/videoLesson/evaluate",{data:{isTeacher:1,videoId:e.classId,content:e.message,studentId:a.user.data.userId}});case 3:s("评论成功"),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,i=this;return r("div",{class:w["video-class-detail"]},[r(g,{src:this.srcUrl,poster:this.posterUrl,freeTitleStatus:this.lessonPrice>0,freeRate:Number(this.freeRate),trySee:this.trySee,height:this.videoHeight},null),r(p,{border:!1,class:w.cell,title:this.title,titleClass:w.titleInfo},{icon:function(){return r(l,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return r("div",{class:w.label},[r("span",null,[i.currentClassIndex]),c("/"),i.detailList.length,c("课时")])}}),r("div",{class:w.videoDesc},[this.videoContent]),r(h,{active:this.tabIndex,"onUpdate:active":function(e){return i.tabIndex=e},class:w.infoField,color:"var(--van-primary)",lineWidth:20,sticky:!0,lazyRender:!0,offsetTop:this.offsetTop},{default:function(){return[r(b,{title:"目录",name:1},{default:function(){return[r("div",{style:{height:"calc(100vh - 320px)",overflowY:"auto"}},[r(m,{title:"课程列表",icon:"courseList"},C(e=i.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:i.useRelationType}}));return r(f,{musicAlbumInfos:a,playId:Number(i.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:t+1},onPlay:i.onPlay,onMusicAlbumDetail:function(e){i.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}):s("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),r(b,{title:"讨论",name:3},{default:function(){return[r("div",{style:{overflowY:"auto",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[i.dataShow?r(j,{loading:i.loading,"onUpdate:loading":function(e){return i.loading=e},finished:i.finished,finishedText:" ",immediateCheck:!1,onLoad:i.getList},C(t=i.list.map((function(e){return r(p,{class:[w["message-list"],1===e.isTeacher&&w["message-active"]],valueClass:w["message-time"]},{icon:function(){return r(y,{class:w.userLogo,src:e.avatar||I,fit:"cover"},null)},title:function(){return r("div",{class:w.title},[r("div",{class:w["message-name"]},[e.userName]),r("div",{class:w["message-time"]},[d(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return r("div",{class:w.label},[e.content])}})})))?t:{default:function(){return[t]}}):r(u,{btnStatus:!1,tips:"暂无讨论"},null)]),r("div",{class:[w.messageContainer]},[r(x,{placeholder:"快来讨论吧~",modelValue:i.message,"onUpdate:modelValue":function(e){return i.message=e}},{button:function(){return r(_,{type:"primary",disabled:!i.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:i.onSubmit},{default:function(){return[c("发布")]}})}})])]}})]}})])}}))}}}))}();
|