!function(){function e(e,t,r,n,o,a,i){try{var s=e[a](i),u=s.value}catch(c){return void r(c)}s.done?t(u):Promise.resolve(u).then(n,o)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=t.apply(r,n);function s(t){e(i,o,a,s,u,"next",t)}function u(t){e(i,o,a,s,u,"throw",t)}s(void 0)}))}}var r=document.createElement("style");r.innerHTML="._video-detail_wlqmz_1{height:100vh;overflow:scroll;box-sizing:border-box}._video-detail_wlqmz_1 ._introduction_wlqmz_6{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._video-detail_wlqmz_1 ._btnGroup_wlqmz_11{padding:0 .37333rem .4rem}._video-detail_wlqmz_1 ._btnMore_wlqmz_15{display:flex;justify-content:space-around}._video-detail_wlqmz_1 ._btnMore_wlqmz_15 .van-button{width:55%}._video-detail_wlqmz_1 ._videoItem_wlqmz_22 ._van-cell__title_wlqmz_22{font-size:.58667rem}._video-detail_wlqmz_1 ._videoItem_wlqmz_22 ._van-cell__title_wlqmz_22 p{max-width:2.66667rem}._video-detail_wlqmz_1 ._shareCourse_wlqmz_28{margin:0;padding:.21333rem;background:#fff}._video-detail_wlqmz_1 ._shareCourse_wlqmz_28 .itemTitle{max-width:2.93333rem!important}._video-detail_wlqmz_1 ._coverClass_wlqmz_36{width:4.37333rem!important;height:2.45333rem!important}\n",document.head.appendChild(r),System.register(["./ResizeObserver.es-legacy.9ef5ac8c.js","./index-legacy.833f27b3.js","./index-legacy.3156685a.js","./index-legacy.006eccd8.js","./index-legacy.402479d8.js","./orderStatus-legacy.00d7eecf.js","./tradeOrder-legacy.c0331619.js","./index-legacy.13430c18.js","./icon-share-legacy.576b0857.js","./index-legacy.7f1bd7d2.js","./live-item-legacy.3828afa2.js","./index-legacy.e9381954.js","./index-legacy.8802e914.js","./index-legacy.31c9aada.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.890b9402.js","./icon_music_active-legacy.aba070d7.js","./index-legacy.6268a8fe.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js","./index-legacy.98761967.js","./index-legacy.91eef022.js","./index-legacy.68eb7f39.js","./code-down-load-legacy.3bc1f4e9.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var r,n,o,a,i,s,u,c,l,d,m,f,p,y,h,_,g,I,v,b,w,j,T,x;return{setters:[function(e){r=e.d,n=e.g,o=e.an,a=e.y,i=e.f,s=e.n,u=e.D,c=e.i,l=e.j,d=e.T,m=e.B,f=e.aS,p=e.$},function(e){y=e.C},function(e){h=e.S},function(e){_=e.U},function(e){g=e.C},function(e){I=e.o,v=e.a},function(e){b=e.t},function(e){w=e.C},function(e){j=e.i},function(e){T=e.C},function(e){x=e.L},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var q="_video-detail_wlqmz_1",z="_introduction_wlqmz_6",U="_btnMore_wlqmz_15",C="_videoItem_wlqmz_22",P="_shareCourse_wlqmz_28",N="_coverClass_wlqmz_36";e("default",r({name:"VideoDetail",data:function(){var e=this.$route.query;return{pageVisibility:"visible",userInfo:{},detailList:[],recomUserId:e.recomUserId,params:{groupId:e.groupId},shareStatus:!1,shareUrl:""}},computed:{platformStatus:function(){var e=n.user.data,t=this.$route.query;return e.tenantId>0&&"tenant"==t.p}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var r,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.pageVisibility=o(),t.next=3,e._init();case 3:/(localhost|192)/g.test(location.origin)?e.shareUrl="https://dev.colexiu.com/teacher#/shareVideo?recomUserId=".concat(null===(r=n.user.data)||void 0===r?void 0:r.userId,"&groupId=").concat(e.params.groupId,"&userType=").concat(n.platformType,"&p=tenant"):e.shareUrl="".concat(location.origin,"/teacher#/shareVideo?recomUserId=").concat(null===(a=n.user.data)||void 0===a?void 0:a.userId,"&groupId=").concat(e.params.groupId,"&userType=").concat(n.platformType,"&p=tenant");case 4:case"end":return t.stop()}}),t)})))()},methods:{_init:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var r,o,i,s,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.get("/api-student/videoLesson/selectVideoLesson",{params:{groupId:e.params.groupId}});case 3:r=t.sent,o=r.data||{},i=o.lessonGroup||{},o.teachertTag||"",s=n.user.data,u="VIP"===i.payType?!(!o.alreadyBuy&&!s.isVip):o.alreadyBuy,e.userInfo={alreadyBuy:u,username:i.username||"游客".concat(i.teacherId||""),headUrl:i.avatar,buyNum:i.countStudent,id:i.id,lessonNum:i.lessonCount,lessonName:i.lessonName,payType:i.payType,type:"video",lessonDesc:i.lessonDesc,lessonPrice:i.lessonPrice,relationType:i.relationType,teacherId:i.teacherId,lessonCoverUrl:i.lessonCoverUrl,auditVersion:i.auditVersion,isDegree:!!o.degreeFlag,isTeacher:!!o.teacherFlag},e.detailList=o.detailList||[],console.log(i.payType,s.isVip),console.log(e.userInfo,"this.userInfo"),t.next=17;break;case 15:t.prev=15,t.t0=t.catch(0);case 17:case"end":return t.stop()}}),t,null,[[0,15]])})))()},onPlay:function(e){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.groupId,classId:e.id}})},onBuy:function(){var e=this;return t(regeneratorRuntime.mark((function r(){var n,o,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,"VIP"!==e.userInfo.payType){r.next=4;break}return i().isApp?s({api:"openWebView",content:{url:"".concat(location.origin).concat(location.pathname,"#/memberCenter"),orientation:1,isHideTitle:!1}}):e.$router.push({path:"/memberCenter"}),r.abrupt("return");case 4:if(n=e.userInfo,I.orderObject.orderType="VIDEO",I.orderObject.orderName="视频课购买",I.orderObject.orderDesc="视频课购买",I.orderObject.actualPrice=n.lessonPrice,I.orderObject.recomUserId=e.recomUserId,I.orderObject.orderNo="",I.orderObject.orderList=[{orderType:"VIDEO",goodsName:"视频课购买",courseGroupId:n.id,courseGroupName:n.lessonName,coursePrice:n.lessonPrice,teacherName:n.username||"游客".concat(n.teacherId||""),teacherId:n.teacherId,avatar:n.headUrl,relationType:e.userInfo.relationType,courseInfo:e.detailList,recomUserId:e.recomUserId}],!(n.lessonPrice<=0)){r.next=16;break}return r.next=15,v((function(){u.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 15:return r.abrupt("return");case 16:return r.next=18,a.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"VIDEO",bizId:e.params.groupId}});case 18:o=r.sent,(c=o.data)?u.confirm({title:"提示",message:"您有一个未支付的订单,是否继续支付?",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b(c,e.routerTo);case 1:case"end":return t.stop()}}),t)})))).catch((function(){u.close(),e.cancelPayment(c.orderNo)})):e.routerTo(),r.next=25;break;case 23:r.prev=23,r.t0=r.catch(0);case 25:case"end":return r.stop()}}),r,null,[[0,23]])})))()},routerTo:function(){this.$router.push({path:"/orderDetail",query:{orderType:"VIDEO",courseGroupId:this.params.groupId}})},cancelPayment:function(e){return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}});case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()}},watch:{pageVisibility:function(){var e=this;"VIP"===this.userInfo.payType&&a.get("/api-student/student/queryUserInfo",{initRequest:!0}).then((function(t){var r;c(t.data),e.userInfo.alreadyBuy=!(null===(r=t.data)||void 0===r||!r.isVip)}))}},render:function(){var e,t,r=this;return l("div",{class:[q]},[l(g,null,{right:function(){return l("img",{src:j,onClick:function(){return r.shareStatus=!0}},null)}}),l(_,{userInfo:this.userInfo,onUserDetail:function(e){i().isApp&&"STUDENT"===n.platformType&&r.$router.push({path:"/teacherHome",query:{teacherId:e.teacherId,tabs:"video"}})}},null),l(h,{border:!1},{default:function(){return[l("p",{class:z},[r.userInfo.lessonDesc])]}}),l(h,{title:"课程列表",icon:"courseList",class:"mb12",border:!1},(t=e=this.detailList.map((function(e){var t=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:r.userInfo.relationType}}));return l(y,{musicAlbumInfos:t,class:[C],detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl},onPlay:r.onPlay,onMusicAlbumDetail:function(e){r.userInfo.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?r.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&r.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):d("数据正在更新,请稍后再试")}},null)})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!p(t)?e:{default:function(){return[e]}})),this.userInfo.id&&!this.userInfo.alreadyBuy&&l(w,{position:"bottom",background:"white"},{default:function(){return[l("div",{class:["btnGroup",U]},[l(m,{block:!0,round:!0,type:"primary",onClick:r.onBuy,disabled:r.platformStatus},{default:function(){return["VIP"===r.userInfo.payType?"开通会员":r.userInfo.lessonPrice<=0?"免费领取":"立即购买"]}})])]}}),l(f,{show:this.shareStatus,"onUpdate:show":function(e){return r.shareStatus=e},style:{background:"transparent"}},{default:function(){return[l(T,{teacherId:r.userInfo.id,shareUrl:r.shareUrl,shareType:"video"},{default:function(){return[l(x,{class:P,coverClass:N,liveInfo:{backgroundPic:r.userInfo.lessonCoverUrl,courseGroupId:r.userInfo.lessonId,courseGroupName:r.userInfo.lessonName,courseNum:r.userInfo.lessonNum,coursePrice:r.userInfo.lessonPrice,teacherName:r.userInfo.username,payType:r.userInfo.payType,teacherId:r.userInfo.id,avatar:r.userInfo.headUrl,studentCount:r.userInfo.buyNum,existBuy:0,subjectName:r.userInfo.lessonSubjectName}},null)]}})]}})])}}))}}}))}();