1 |
- !function(){function e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){a(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 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 n(e,t,a,n,i,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(n,i)}function i(e){return function(){var t=this,a=arguments;return new Promise((function(i,s){var r=e.apply(t,a);function o(e){n(r,i,s,o,l,"next",e)}function l(e){n(r,i,s,o,l,"throw",e)}o(void 0)}))}}var s=document.createElement("style");s.innerHTML="._video-class-detail_stehj_1{min-height:100vh}._video-class-detail_stehj_1 ._videoDesc_stehj_4{background-color:#fff;padding:0 .37333rem .32rem;margin-bottom:.16rem;font-size:.37333rem;line-height:.53333rem;color:#7a7a7a}._video-class-detail_stehj_1 ._titleInfo_stehj_12{padding-left:.21333rem;font-size:.4rem;font-weight:500;color:#1a1a1a;flex:1 auto;max-width:6.66667rem}._video-class-detail_stehj_1 ._label_stehj_20{font-size:.37333rem}._video-class-detail_stehj_1 ._label_stehj_20 span,._video-class-detail_stehj_1 .van-tab--active{color:var(--van-primary)}._video-class-detail_stehj_1 .van-field__value{background:#f7f7f7;border-radius:.8rem;padding-left:.4rem}._video-class-detail_stehj_1 .van-tab__panel{overflow:hidden}._video-class-detail_stehj_1 ._message-list_stehj_37._message-active_stehj_37 ._title_stehj_12,._video-class-detail_stehj_1 ._message-list_stehj_37._message-active_stehj_37 ._label_stehj_20{color:var(--van-primary)!important}._video-class-detail_stehj_1 ._message-list_stehj_37 ._message-name_stehj_41{flex-basis:65%;line-height:1.2}._video-class-detail_stehj_1 ._message-list_stehj_37 ._message-time_stehj_45{font-size:.32rem;color:#999;flex-basis:35%}._video-class-detail_stehj_1 ._message-list_stehj_37 ._userLogo_stehj_50{width:.90667rem;height:.90667rem;border-radius:50%;margin-right:.21333rem;overflow:hidden}._video-class-detail_stehj_1 ._message-list_stehj_37 ._title_stehj_12{display:flex;justify-content:space-between;font-size:.37333rem;color:#999;font-weight:500}._video-class-detail_stehj_1 ._message-list_stehj_37 ._label_stehj_20{font-size:.37333rem;color:#333;line-height:.53333rem}._messageContainer_stehj_69{position:fixed;bottom:0;left:0;right:0}\n",document.head.appendChild(s),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.f478c9a6.js","./index-legacy.4c17bd6d.js","./index-legacy.6ac2a941.js","./index-legacy.506ac0cf.js","./index-legacy.c8c5bc4e.js","./index-legacy.3ccba950.js","./index-legacy.9d5cae73.js","./index-legacy.cf09c997.js","./index-legacy.4be048cf.js","./index-legacy.cae55a25.js","./index-legacy.43e69380.js","./icon_teacher-legacy.42ba77b1.js","./orderStatus-legacy.12eb861d.js","./index-legacy.5d9f864a.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","./plyr-legacy.2bfabaee.js","./tcplayer.v4.8.0.min-legacy.686dd2d9.js","./use-id-legacy.ef8b5e97.js","./use-tab-status-legacy.d7434e0b.js","./use-refs-legacy.d925b49f.js","./index-legacy.4bad5b90.js"],(function(e){"use strict";var a,n,s,r,o,l,c,u,d,f,m,h,p,v,g,_,y,b,j,x,I,w,T,C,O,P,L,U,S,k;return{setters:[function(e){a=e.d,n=e.g,s=e.an,r=e.y,o=e.T,l=e.i,c=e.j,u=e.f,d=e.n,f=e.D,m=e.N,h=e.A,p=e.w,v=e.C,g=e.B,_=e.$},function(e){y=e.C},function(e){b=e.S},function(e){j=e.C},function(e){x=e.C},function(e){I=e.C},function(){},function(){},function(e){w=e.T,T=e.a},function(e){C=e.I},function(e){O=e.F},function(e){P=e.L},function(e){L=e.i},function(e){U=e.o,S=e.a},function(e){k=e.C},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var N={"video-class-detail":"_video-class-detail_stehj_1",videoDesc:"_videoDesc_stehj_4",titleInfo:"_titleInfo_stehj_12",label:"_label_stehj_20","message-list":"_message-list_stehj_37","message-active":"_message-active_stehj_37",title:"_title_stehj_12","message-name":"_message-name_stehj_41","message-time":"_message-time_stehj_45",userLogo:"_userLogo_stehj_50",messageContainer:"_messageContainer_stehj_69"};function R(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!_(e)}e("default",a({name:"VideoClassDetail",data:function(){var e=this.$route.query;return{pageVisibility:"visible",groupId:e.groupId,classId:e.classId,tabIndex:1,title:"",lessonPrice:0,payType:"",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",offsetTop:"auto"}},computed:{users:function(){return n.user.data}},mounted:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var a,n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.pageVisibility=s(),a=document.body.clientWidth||document.body.offsetWidth,e.videoHeight=a/16*9+"px",e.navHeight=sessionStorage.getItem("navHeight")||0,t.prev=4,t.next=7,e.__init();case 7:return t.next=9,r.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"video_lesson_free_rate"}});case 9:i=t.sent,e.freeRate=(null===(n=i.data[0])||void 0===n?void 0:n.paramValue)||0,t.next=15;break;case 13:t.prev=13,t.t0=t.catch(4);case 15:e.getList();case 16:case"end":return t.stop()}}),t,null,[[4,13]])})))()},methods:{__init:function(){var e=this;return i(regeneratorRuntime.mark((function t(){var a,i,s,o,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.reload=!0,t.prev=1,t.next=4,r.get("/api-student/videoLesson/selectVideoLesson",{params:{groupId:e.groupId}});case 4:i=t.sent,s=i.data||{},o=n.user.data,l="VIP"===s.lessonGroup.payType?!(!s.alreadyBuy&&"NOT_VIP"===(null===(a=o.userVip)||void 0===a?void 0:a.vipType)):s.alreadyBuy,e.videoDetail=s.lessonGroup,e.title=s.lessonGroup.lessonName,e.payType=s.lessonGroup.payType,e.lessonPrice=s.lessonGroup.lessonPrice,e.useRelationType=s.lessonGroup.relationType,e.alreadyBuy=l,e.detailList=s.detailList||[],e.trySee=!l,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=21;break;case 19:t.prev=19,t.t0=t.catch(1);case 21:e.reload=!1;case 22:case"end":return t.stop()}}),t,null,[[1,19]])})))()},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 a(){var n,i,s;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,n=e.params,a.next=4,r.post("/api-student/videoLesson/page",{data:t(t({},n),{},{videoId:e.classId})});case 4:if(i=a.sent,e.loading=!1,s=i.data||{},!(e.list.length>0&&1===s.pageNo)){a.next=9;break}return a.abrupt("return");case 9: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,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 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,r.post("/api-student/videoLesson/evaluate",{data:{isTeacher:0,videoId:e.classId,content:e.message,studentId:n.user.data.userId}});case 3:o("评论成功"),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]])})))()}},watch:{pageVisibility:function(){var e=this;"VIP"===this.payType&&r.get("/api-student/student/queryUserInfo",{initRequest:!0}).then((function(t){l(t.data),e.__init()}))}},render:function(){var e,t,a=this;return c("div",{class:N["video-class-detail"]},[c(k,{position:"top",onGetHeight:function(e){a.offsetTop=e+"px"}},{default:function(){return[c(j,null,{default:function(){return!a.reload&&c(x,{freeRate:Number(a.freeRate),freeTitleStatus:a.lessonPrice>0,trySee:a.trySee,src:a.srcUrl,payType:a.payType,poster:a.posterUrl,height:a.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("VIP"!==a.payType){e.next=3;break}return u().isApp?d({api:"openWebView",content:{url:"".concat(location.origin).concat(location.pathname,"#/memberCenter"),orientation:1,isHideTitle:!1}}):a.$router.push({path:"/memberCenter"}),e.abrupt("return");case 3:if(!(a.lessonPrice>0)){e.next=6;break}return a.$router.back(),e.abrupt("return");case 6:return e.prev=6,t=a.videoDetail,U.orderObject.orderType="VIDEO",U.orderObject.orderName="视频课购买",U.orderObject.orderDesc="视频课购买",U.orderObject.actualPrice=t.lessonPrice,U.orderObject.recomUserId="",U.orderObject.orderNo="",U.orderObject.orderList=[{orderType:"VIDEO",goodsName:"视频课购买",courseGroupId:t.id,courseGroupName:t.lessonName,coursePrice:t.lessonPrice,price:t.lessonPrice,teacherName:t.username||"游客".concat(t.teacherId||""),teacherId:t.teacherId,avatar:t.headUrl,relationType:t.relationType,courseInfo:a.detailList,recomUserId:""}],e.next=17,S((function(){f.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){a.__init()}))}));case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(6);case 21:case"end":return e.stop()}}),e,null,[[6,19]])}))),function(){return e.apply(this,arguments)})},null);var e}}),c("div",{style:"overflow: hidden"},[c(I,{border:!1,class:N.cell,title:a.title,titleClass:[N.titleInfo,"van-ellipsis"]},{icon:function(){return c(m,{name:"video",size:18,color:"var(--van-primary)",style:{display:"flex",alignItems:"center"}},null)},value:function(){return c("div",{class:N.label},[c("span",null,[a.currentClassIndex]),h("/"),a.detailList.length,h("课时")])}}),c("div",{class:N.videoDesc},[a.videoContent])])]}}),c(w,{active:this.tabIndex,"onUpdate:active":function(e){return a.tabIndex=e},class:N.infoField,color:"var(--van-primary)",sticky:!0,offsetTop:this.offsetTop,lineWidth:20},{default:function(){return[c(T,{title:"目录",name:1},{default:function(){return[c("div",{style:{height:"calc(100vh - var(--van-tabs-line-height) - var(--header-height))",overflowY:"auto"}},[c(b,{title:"课程列表",icon:"courseList",style:{marginBottom:"12px"}},R(e=a.detailList.map((function(e,t){var n=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:a.useRelationType}}));return c(y,{musicAlbumInfos:n,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}):o("数据正在更新,请稍后再试")}},null)})))?e:{default:function(){return[e]}})])]}}),c(T,{title:"讨论",name:3},{default:function(){return[c("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?c(P,{loading:a.loading,"onUpdate:loading":function(e){return a.loading=e},finished:a.finished,finishedText:" ",immediateCheck:!1,onLoad:a.getList},R(t=a.list.map((function(e){return c(I,{class:[N["message-list"],1===e.isTeacher&&N["message-active"]],valueClass:N["message-time"]},{icon:function(){return c(C,{class:N.userLogo,src:e.avatar||L,fit:"cover"},null)},title:function(){return c("div",{class:N.title},[c("div",{class:N["message-name"]},[e.userName]),c("div",{class:N["message-time"]},[p(e.evaluateTime).format("YYYY年MM月DD日")])])},label:function(){return c("div",{class:N.label},[e.content])}})})))?t:{default:function(){return[t]}}):c(v,{btnStatus:!1,tips:"暂无讨论"},null)]),c("div",{class:N.messageContainer},[c(O,{placeholder:"快来讨论吧~",modelValue:a.message,"onUpdate:modelValue":function(e){return a.message=e}},{button:function(){return c(g,{type:"primary",disabled:!a.message,style:{padding:"0 20px"},size:"small",round:!0,onClick:a.onSubmit},{default:function(){return[h("发布")]}})}})])]}})]}})])}}))}}}))}();
|