video-detail-legacy.2ec10232.js 10 KB

1
  1. !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.44b91b4c.js","./index-legacy.f478c9a6.js","./index-legacy.4c17bd6d.js","./index-legacy.65f447aa.js","./index-legacy.6ac2a941.js","./orderStatus-legacy.12eb861d.js","./tradeOrder-legacy.a0af1df5.js","./index-legacy.5d9f864a.js","./icon-share-legacy.576b0857.js","./index-legacy.ffbd6cdc.js","./live-item-legacy.7dcddb96.js","./index-legacy.c8c5bc4e.js","./index-legacy.4be048cf.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","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./index-legacy.4bad5b90.js","./index-legacy.9d5cae73.js","./code-down-load-legacy.4137246a.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.da3142a2.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var r,n,o,a,i,s,u,c,l,d,m,f,p,h,y,_,I,v,b,g,w,T,j,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){h=e.C},function(e){y=e.S},function(e){_=e.U},function(e){I=e.C},function(e){v=e.o,b=e.a},function(e){g=e.t},function(e){w=e.C},function(e){T=e.i},function(e){j=e.C},function(e){x=e.L},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",V="_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},platform:e.p,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,c;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:o=t.sent,i=o.data||{},s=i.lessonGroup||{},u=n.user.data,c="VIP"===s.payType?!(!i.alreadyBuy&&"NOT_VIP"===(null===(r=u.userVip)||void 0===r?void 0:r.vipType)):i.alreadyBuy,e.userInfo={alreadyBuy:c,username:s.username||"游客".concat(s.teacherId||""),headUrl:s.avatar,buyNum:s.countStudent,id:s.id,lessonNum:s.lessonCount,lessonName:s.lessonName,payType:s.payType,type:"video",lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,relationType:s.relationType,teacherId:s.teacherId,lessonCoverUrl:s.lessonCoverUrl,auditVersion:s.auditVersion,isDegree:!!i.degreeFlag,isTeacher:!!i.teacherFlag},e.detailList=i.detailList||[],t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})))()},onPlay:function(e){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.groupId,classId:e.id}})},initVideo:function(){var e=this.userInfo;v.orderObject.orderType="VIDEO",v.orderObject.orderName="视频课购买",v.orderObject.orderDesc="视频课购买",v.orderObject.actualPrice=e.lessonPrice,v.orderObject.recomUserId=this.recomUserId,v.orderObject.orderNo="",v.orderObject.orderList=[{orderType:"VIDEO",goodsName:"视频课购买",courseGroupId:e.id,courseGroupName:e.lessonName,coursePrice:e.lessonPrice,price:e.lessonPrice,teacherName:e.username||"游客".concat(e.teacherId||""),teacherId:e.teacherId,avatar:e.headUrl,relationType:this.userInfo.relationType,courseInfo:this.detailList,recomUserId:this.recomUserId}]},onBuy:function(){var e=this;return t(regeneratorRuntime.mark((function r(){var n,o;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(!(e.userInfo.lessonPrice<=0)){r.next=10;break}return e.initVideo(),r.next=9,b((function(){u.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 9:return r.abrupt("return");case 10:return r.next=12,a.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"VIDEO",bizId:e.params.groupId}});case 12:n=r.sent,(o=n.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:g(o,e.routerTo);case 1:case"end":return t.stop()}}),t)})))).catch((function(){u.close(),e.cancelPayment(o.orderNo)})):(e.initVideo(),e.routerTo()),r.next=19;break;case 17:r.prev=17,r.t0=r.catch(0);case 19:case"end":return r.stop()}}),r,null,[[0,17]])})))()},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&&"visible"===this.pageVisibility&&a.get("/api-student/student/queryUserInfo",{initRequest:!0}).then((function(t){var r;c(t.data),e.userInfo.alreadyBuy=!(!e.userInfo.alreadyBuy&&"NOT_VIP"===(null===(r=t.data.userVip)||void 0===r?void 0:r.vipType))}))}},render:function(){var e,t,r=this;return l("div",{class:[q]},[l(I,null,{right:function(){return l("img",{src:T,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(y,{border:!1},{default:function(){return[l("p",{class:z},[r.userInfo.lessonDesc])]}}),l(y,{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(h,{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(j,{teacherId:r.userInfo.id,shareUrl:r.shareUrl,shareType:"video"},{default:function(){return[l(x,{class:P,coverClass:V,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)]}})]}})])}}))}}}))}();