video-detail-legacy.22779a2a.js 9.1 KB

1
  1. !function(){function e(e,r,t,n,o,a,s){try{var i=e[a](s),c=i.value}catch(u){return void t(u)}i.done?r(c):Promise.resolve(c).then(n,o)}function r(r){return function(){var t=this,n=arguments;return new Promise((function(o,a){var s=r.apply(t,n);function i(r){e(s,o,a,i,c,"next",r)}function c(r){e(s,o,a,i,c,"throw",r)}i(void 0)}))}}var t=document.createElement("style");t.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(t),System.register(["./index-legacy.b903c881.js","./index-legacy.4f272dd3.js","./index-legacy.147431b7.js","./index-legacy.2eb3e4dd.js","./index-legacy.885c229f.js","./orderStatus-legacy.d4b782c6.js","./tradeOrder-legacy.5ef1c9e6.js","./index-legacy.6b8d5fc3.js","./icon-share-legacy.576b0857.js","./index-legacy.fd2fff34.js","./live-item-legacy.c58b4598.js","./index-legacy.b7f666cc.js","./index-legacy.5b93d63d.js","./index-legacy.857a8bc7.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.fcd6f4c0.js","./icon_music_active-legacy.77693573.js","./index-legacy.5907f1a9.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js","./index-legacy.4b2a6a63.js","./index-legacy.ae2ce69e.js","./code-down-load-legacy.162151e4.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var t,n,o,a,s,i,c,u,l,d,m,f,p,h,_,g,y,v,I,b,w;return{setters:[function(e){t=e.d,n=e.g,o=e.w,a=e.D,s=e.j,i=e.f,c=e.T,u=e.B,l=e.aR,d=e.Z},function(e){m=e.C},function(e){f=e.S},function(e){p=e.U},function(e){h=e.C},function(e){_=e.o,g=e.a},function(e){y=e.t},function(e){v=e.C},function(e){I=e.i},function(e){b=e.C},function(e){w=e.L},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var j="_video-detail_wlqmz_1",x="_introduction_wlqmz_6",q="_btnMore_wlqmz_15",z="_videoItem_wlqmz_22",T="_shareCourse_wlqmz_28",U="_coverClass_wlqmz_36";e("default",t({name:"VideoDetail",data:function(){var e=this.$route.query;return{userInfo:{},detailList:[],recomUserId:e.recomUserId,params:{groupId:e.groupId},platform:e.p,shareStatus:!1,shareUrl:""}},computed:{platformStatus:function(){var e=n.user.data,r=this.$route.query;return e.tenantId>0&&"tenant"==r.p}},mounted:function(){var e=this;return r(regeneratorRuntime.mark((function r(){var t,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e._init();case 2:/(localhost|192)/g.test(location.origin)?e.shareUrl="https://dev.colexiu.com/teacher#/shareVideo?recomUserId=".concat(null===(t=n.user.data)||void 0===t?void 0:t.userId,"&groupId=").concat(e.params.groupId,"&userType=").concat(n.platformType,"&p=tenant"):e.shareUrl="".concat(location.origin,"/teacher#/shareVideo?recomUserId=").concat(null===(o=n.user.data)||void 0===o?void 0:o.userId,"&groupId=").concat(e.params.groupId,"&userType=").concat(n.platformType,"&p=tenant");case 3:case"end":return r.stop()}}),r)})))()},methods:{_init:function(){var e=this;return r(regeneratorRuntime.mark((function r(){var t,n,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o.get("/api-student/videoLesson/selectVideoLesson",{params:{groupId:e.params.groupId}});case 3:t=r.sent,n=t.data||{},a=n.lessonGroup||{},n.teachertTag||"",e.userInfo={alreadyBuy:n.alreadyBuy,username:a.username||"游客".concat(a.teacherId||""),headUrl:a.avatar,buyNum:a.countStudent,id:a.id,lessonNum:a.lessonCount,lessonName:a.lessonName,lessonDesc:a.lessonDesc,lessonPrice:a.lessonPrice,relationType:a.relationType,teacherId:a.teacherId,lessonCoverUrl:a.lessonCoverUrl,auditVersion:a.auditVersion,isDegree:!!n.degreeFlag,isTeacher:!!n.teacherFlag},e.detailList=n.detailList||[],r.next=13;break;case 11:r.prev=11,r.t0=r.catch(0);case 13:case"end":return r.stop()}}),r,null,[[0,11]])})))()},onPlay:function(e){this.$router.push({path:"/videoClassDetail",query:{groupId:this.params.groupId,classId:e.id}})},onBuy:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,s,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=e.userInfo,_.orderObject.orderType="VIDEO",_.orderObject.orderName="视频课购买",_.orderObject.orderDesc="视频课购买",_.orderObject.actualPrice=n.lessonPrice,_.orderObject.recomUserId=e.recomUserId,_.orderObject.orderNo="",_.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)){t.next=13;break}return t.next=12,g((function(){a.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 12:return t.abrupt("return");case 13:return t.next=15,o.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"VIDEO",bizId:e.params.groupId}});case 15:s=t.sent,(i=s.data)?a.confirm({title:"提示",message:"您有一个未支付的订单,是否继续支付?",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(r(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:y(i,e.routerTo);case 1:case"end":return r.stop()}}),r)})))).catch((function(){a.close(),e.cancelPayment(i.orderNo)})):e.routerTo(),t.next=22;break;case 20:t.prev=20,t.t0=t.catch(0);case 22:case"end":return t.stop()}}),t,null,[[0,20]])})))()},routerTo:function(){this.$router.push({path:"/orderDetail",query:{orderType:"VIDEO",courseGroupId:this.params.groupId}})},cancelPayment:function(e){return r(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}});case 3:r.next=7;break;case 5:r.prev=5,r.t0=r.catch(0);case 7:case"end":return r.stop()}}),r,null,[[0,5]])})))()}},render:function(){var e,r,t=this;return s("div",{class:[j]},[s(h,null,{right:function(){return s("img",{src:I,onClick:function(){return t.shareStatus=!0}},null)}}),s(p,{userInfo:this.userInfo,onUserDetail:function(e){console.log(e),i().isApp&&"STUDENT"===n.platformType&&t.$router.push({path:"/teacherHome",query:{teacherId:e.teacherId,tabs:"video"}})}},null),s(f,{border:!1},{default:function(){return[s("p",{class:x},[t.userInfo.lessonDesc])]}}),s(f,{title:"课程列表",icon:"courseList",class:"mb12",border:!1},(r=e=this.detailList.map((function(e){var r=(e.musicAlbumInfos||[]).map((function(e){return{relationMusicAlbum:e.relationType,musicAlbumName:e.name,musicAlbumId:e.musicAlbumId,status:e.status,useRelationType:t.userInfo.relationType}}));return s(m,{musicAlbumInfos:r,class:[z],detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl},onPlay:t.onPlay,onMusicAlbumDetail:function(e){t.userInfo.alreadyBuy||e.status?"MUSIC"===e.relationMusicAlbum?t.$router.push({path:"/music-detail",query:{id:e.musicAlbumId}}):"ALBUM"===e.relationMusicAlbum&&t.$router.push({path:"/music-album-detail/"+e.musicAlbumId}):c("数据正在更新,请稍后再试")}},null)})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!d(r)?e:{default:function(){return[e]}})),this.userInfo.id&&!this.userInfo.alreadyBuy&&s(v,{position:"bottom",background:"white"},{default:function(){return[s("div",{class:["btnGroup",q]},[s(u,{block:!0,round:!0,type:"primary",onClick:t.onBuy,disabled:t.platformStatus},{default:function(){return[t.userInfo.lessonPrice<=0?"免费领取":"立即购买"]}})])]}}),s(l,{show:this.shareStatus,"onUpdate:show":function(e){return t.shareStatus=e},style:{background:"transparent"}},{default:function(){return[s(b,{teacherId:t.userInfo.id,shareUrl:t.shareUrl,shareType:"video"},{default:function(){return[s(w,{class:T,coverClass:U,liveInfo:{backgroundPic:t.userInfo.lessonCoverUrl,courseGroupId:t.userInfo.lessonId,courseGroupName:t.userInfo.lessonName,courseNum:t.userInfo.lessonNum,coursePrice:t.userInfo.lessonPrice,teacherName:t.userInfo.username,teacherId:t.userInfo.id,avatar:t.userInfo.headUrl,studentCount:t.userInfo.buyNum,existBuy:0,subjectName:t.userInfo.lessonSubjectName}},null)]}})]}})])}}))}}}))}();