video-class-detail-legacy.476ec0bd.js 12 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,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 a(e,t,n,a,i,r,s){try{var o=e[r](s),l=o.value}catch(c){return void n(c)}o.done?t(l):Promise.resolve(l).then(a,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var s=e.apply(t,n);function o(e){a(s,i,r,o,l,"next",e)}function l(e){a(s,i,r,o,l,"throw",e)}o(void 0)}))}}var r=document.createElement("style");r.innerHTML="._video-class-detail_hpnky_1{min-height:100vh}._video-class-detail_hpnky_1 ._videoDesc_hpnky_4{background-color:#fff;padding:0 .37333rem .42667rem;margin-bottom:.16rem;font-size:.37333rem;line-height:.53333rem;color:#7a7a7a}._video-class-detail_hpnky_1 ._titleInfo_hpnky_12{padding-left:.21333rem;font-size:.4rem;font-weight:500;color:#1a1a1a;flex:1 auto;max-width:6.66667rem}._video-class-detail_hpnky_1 ._label_hpnky_20{font-size:.37333rem}._video-class-detail_hpnky_1 ._label_hpnky_20 span,._video-class-detail_hpnky_1 .van-tab--active{color:var(--van-primary)}._video-class-detail_hpnky_1 .van-field__value{background:#f7f7f7;border-radius:.8rem;padding-left:.4rem}._video-class-detail_hpnky_1 .van-tab__panel{overflow:hidden}._video-class-detail_hpnky_1 ._message-list_hpnky_37._message-active_hpnky_37 ._title_hpnky_12,._video-class-detail_hpnky_1 ._message-list_hpnky_37._message-active_hpnky_37 ._label_hpnky_20{color:var(--van-primary)!important}._video-class-detail_hpnky_1 ._message-list_hpnky_37 ._message-name_hpnky_41{flex-basis:65%;line-height:1.2}._video-class-detail_hpnky_1 ._message-list_hpnky_37 ._message-time_hpnky_45{font-size:.32rem;color:#999;flex-basis:35%}._video-class-detail_hpnky_1 ._message-list_hpnky_37 ._userLogo_hpnky_50{width:.90667rem;height:.90667rem;border-radius:50%;margin-right:.21333rem;overflow:hidden}._video-class-detail_hpnky_1 ._message-list_hpnky_37 ._title_hpnky_12{display:flex;justify-content:space-between;font-size:.37333rem;color:#999;font-weight:500}._video-class-detail_hpnky_1 ._message-list_hpnky_37 ._label_hpnky_20{font-size:.37333rem;color:#333;line-height:.53333rem}._messageContainer_hpnky_69{position:fixed;bottom:0;left:0;right:0}\n",document.head.appendChild(r),System.register(["./index-legacy.b1468693.js","./index-legacy.a48d3102.js","./index-legacy.78c8492b.js","./index-legacy.2c46c9eb.js","./index-legacy.f8641610.js","./index-legacy.fc510843.js","./index-legacy.4ddb0119.js","./index-legacy.00d337cc.js","./index-legacy.a8de4840.js","./index-legacy.c8b60294.js","./index-legacy.8a3dede6.js","./index-legacy.13f535d5.js","./icon_teacher-legacy.42ba77b1.js","./orderStatus-legacy.43d498d4.js","./index-legacy.28050159.js","./bars-legacy.72d07b27.js","./icon_album_active-legacy.d2829e23.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.c36297f9.js","./index-legacy.90f7f902.js","./use-height-legacy.be763bb2.js","./plyr-legacy.180f4c53.js","./use-id-legacy.30c2e9af.js","./use-tab-status-legacy.5d29085f.js","./use-refs-legacy.e503281e.js"],(function(e){"use strict";var n,a,r,s,o,l,c,u,d,f,p,m,h,_,v,g,y,b,k,x,j,I,w,O,C;return{setters:[function(e){n=e.C},function(e){a=e.S},function(e){r=e.C},function(e){s=e.C},function(e){o=e.d,l=e.s,c=e.e,u=e.T,d=e.i,f=e.D,p=e.N,m=e.A,h=e.x,_=e.C,v=e.B,g=e.$},function(e){y=e.C},function(){},function(){},function(e){b=e.T,k=e.a},function(e){x=e.I},function(e){j=e.F},function(e){I=e.L},function(e){w=e.i},function(e){O=e.o,C=e.a},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var L={"video-class-detail":"_video-class-detail_hpnky_1",videoDesc:"_videoDesc_hpnky_4",titleInfo:"_titleInfo_hpnky_12",label:"_label_hpnky_20","message-list":"_message-list_hpnky_37","message-active":"_message-active_hpnky_37",title:"_title_hpnky_12","message-name":"_message-name_hpnky_41","message-time":"_message-time_hpnky_45",userLogo:"_userLogo_hpnky_50",messageContainer:"_messageContainer_hpnky_69"};function T(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!g(e)}e("default",o({name:"VideoClassDetail",data:function(){var e=this.$route.query;return{groupId:e.groupId,classId:e.classId,tabIndex:1,title:"",lessonPrice:0,useRelationType:"",alreadyBuy:!1,videoDetail:{},detailList:[],posterUrl:"",srcUrl:"",message:"",navHeight:0,currentClassIndex:1,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 l.user.data},offsetTop:function(){var e=this.navHeight;return Number(e)+44+"px"}},mounted:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var n,a,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=document.body.clientWidth||document.body.offsetWidth,e.videoHeight=n/16*9+"px",e.navHeight=sessionStorage.getItem("navHeight")||0,t.prev=3,t.next=6,e.__init();case 6:return t.next=8,c.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_free_rate"}});case 8:i=t.sent,e.freeRate=(null===(a=i.data[0])||void 0===a?void 0:a.paramValue)||0,t.next=14;break;case 12:t.prev=12,t.t0=t.catch(3);case 14:e.getList();case 15:case"end":return t.stop()}}),t,null,[[3,12]])})))()},methods:{__init:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var n,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.reload=!0,t.next=4,c.get("/api-student/videoLesson/selectVideoLesson",{params:{groupId:e.groupId}});case 4:n=t.sent,a=n.data||{},e.videoDetail=a.lessonGroup,e.title=a.lessonGroup.lessonName,e.lessonPrice=a.lessonGroup.lessonPrice,e.useRelationType=a.lessonGroup.relationType,e.alreadyBuy=a.alreadyBuy,e.detailList=a.detailList||[],e.trySee=!a.alreadyBuy,e.detailList.forEach((function(t,n){t.id===Number(e.classId)&&(e.posterUrl=t.coverUrl,e.srcUrl=t.videoUrl,e.title=t.videoTitle,e.currentClassIndex=n+1,e.videoContent=t.videoContent)})),e.reload=!1,t.next=19;break;case 17:t.prev=17,t.t0=t.catch(0);case 19:case"end":return t.stop()}}),t,null,[[0,17]])})))()},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 i(regeneratorRuntime.mark((function n(){var a,i,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,a=e.params,n.next=4,c.post("/api-student/videoLesson/page",{data:t(t({},a),{},{videoId:e.classId})});case 4:if(i=n.sent,e.loading=!1,r=i.data||{},!(e.list.length>0&&1===r.pageNo)){n.next=9;break}return n.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,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){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 i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.post("/api-student/videoLesson/evaluate",{data:{isTeacher:0,videoId:e.classId,content:e.message,studentId:l.user.data.userId}});case 3:u("评论成功"),e.message="",setTimeout((function(){e.onSearch()}),500),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,o=this;return d("div",{class:L["video-class-detail"]},[d(r,null,{default:function(){return!o.reload&&d(s,{freeRate:Number(o.freeRate),freeTitleStatus:o.lessonPrice>0,trySee:o.trySee,src:o.srcUrl,poster:o.posterUrl,height:o.videoHeight,isBuy:!0,onBuyEmit:(e=i(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o.lessonPrice>0)){e.next=3;break}return o.$router.back(),e.abrupt("return");case 3:return e.prev=3,t=o.videoDetail,O.orderObject.orderType="VIDEO",O.orderObject.orderName="视频课购买",O.orderObject.orderDesc="视频课购买",O.orderObject.actualPrice=t.lessonPrice,O.orderObject.recomUserId="",O.orderObject.orderNo="",O.orderObject.orderList=[{orderType:"VIDEO",goodsName:"视频课购买",courseGroupId:t.id,courseGroupName:t.lessonName,coursePrice:t.lessonPrice,teacherName:t.username||"游客".concat(t.teacherId||""),teacherId:t.teacherId,avatar:t.headUrl,relationType:t.relationType,courseInfo:o.detailList,recomUserId:""}],e.next=14,C((function(){f.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){o.__init()}))}));case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(3);case 18:case"end":return e.stop()}}),e,null,[[3,16]])}))),function(){return e.apply(this,arguments)})},null);var e}}),d(y,{border:!1,class:L.cell,title:this.title,titleClass:[L.titleInfo,"van-ellipsis"]},{icon:function(){return d(p,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return d("div",{class:L.label},[d("span",null,[o.currentClassIndex]),m("/"),o.detailList.length,m("课时")])}}),d("div",{class:L.videoDesc},[this.videoContent]),d(b,{active:this.tabIndex,"onUpdate:active":function(e){return o.tabIndex=e},class:L.infoField,color:"var(--van-primary)",sticky:!0,offsetTop:this.offsetTop,lineWidth:20},{default:function(){return[d(k,{title:"目录",name:1},{default:function(){return[d("div",{style:{overflowY:"auto"}},[d(a,{title:"课程列表",icon:"courseList",border:!0},T(e=o.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:o.useRelationType}}));return d(n,{musicAlbumInfos:a,playId:Number(o.classId),detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl,videoUrl:e.videoUrl,index:t+1},onPlay:o.onPlay,onMusicAlbumDetail:function(e){o.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?o.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&o.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):u("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),d(k,{title:"讨论",name:3},{default:function(){return[d("div",{style:{overflowY:"auto",marginBottom:"calc(var(--van-cell-vertical-padding) * 2 + var( --van-cell-line-height))"}},[o.dataShow?d(I,{loading:o.loading,"onUpdate:loading":function(e){return o.loading=e},finished:o.finished,finishedText:" ",immediateCheck:!1,onLoad:o.getList},T(t=o.list.map((function(e){return d(y,{class:[L["message-list"],1===e.isTeacher&&L["message-active"]],valueClass:L["message-time"]},{icon:function(){return d(x,{class:L.userLogo,src:e.avatar||w,fit:"cover"},null)},title:function(){return d("div",{class:L.title},[d("div",{class:L["message-name"]},[e.userName]),d("div",{class:L["message-time"]},[h(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return d("div",{class:L.label},[e.content])}})})))?t:{default:function(){return[t]}}):d(_,{btnStatus:!1,tips:"暂无讨论"},null)]),d("div",{class:L.messageContainer},[d(j,{placeholder:"快来讨论吧~",modelValue:o.message,"onUpdate:modelValue":function(e){return o.message=e}},{button:function(){return d(v,{type:"primary",disabled:!o.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:o.onSubmit},{default:function(){return[m("发布")]}})}})])]}})]}})])}}))}}}))}();