video-detail-legacy.be069da5.js 9.0 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.6c52edfe.js","./index-legacy.f6bcdf82.js","./index-legacy.b6d96b2d.js","./index-legacy.b2528a15.js","./index-legacy.81a64bb6.js","./orderStatus-legacy.8039009d.js","./tradeOrder-legacy.4e03edf1.js","./index-legacy.c99e8e49.js","./icon-share-legacy.576b0857.js","./index-legacy.47b1cde1.js","./live-item-legacy.1f5440b3.js","./index-legacy.207dc8c2.js","./index-legacy.ca42ae97.js","./index-legacy.edff980f.js","./bars-legacy.9085ff9b.js","./icon_album_active-legacy.d2829e23.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.a7e74731.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js","./index-legacy.f75b8290.js","./use-height-legacy.2a153aaf.js","./index-legacy.8361d47d.js","./index-legacy.3f4943f0.js","./code-down-load-legacy.5a78d39b.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.8b7c8200.js"],(function(e){"use strict";var t,n,o,a,s,i,c,u,l,d,m,f,p,h,_,g,y,I,v,b,w;return{setters:[function(e){t=e.C},function(e){n=e.S},function(e){o=e.U},function(e){a=e.d,s=e.s,i=e.e,c=e.D,u=e.i,l=e.b,d=e.T,m=e.B,f=e.aT,p=e.$},function(e){h=e.C},function(e){_=e.o,g=e.a},function(e){y=e.t},function(e){I=e.C},function(e){v=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(){},function(){}],execute:function(){var j="_video-detail_wlqmz_1",x="_introduction_wlqmz_6",q="_btnMore_wlqmz_15",T="_videoItem_wlqmz_22",z="_shareCourse_wlqmz_28",U="_coverClass_wlqmz_36";e("default",a({name:"VideoDetail",data:function(){var e=this.$route.query;return{userInfo:{},detailList:[],recomUserId:e.recomUserId,params:{groupId:e.groupId},shareStatus:!1,shareUrl:""}},mounted:function(){var e=this;return r(regeneratorRuntime.mark((function r(){var t,n;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=s.user.data)||void 0===t?void 0:t.userId,"&groupId=").concat(e.params.groupId,"&userType=").concat(s.platformType):e.shareUrl="".concat(location.origin,"/teacher#/shareVideo?recomUserId=").concat(null===(n=s.user.data)||void 0===n?void 0:n.userId,"&groupId=").concat(e.params.groupId,"&userType=").concat(s.platformType);case 3:case"end":return r.stop()}}),r)})))()},methods:{_init:function(){var e=this;return r(regeneratorRuntime.mark((function r(){var t,n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,i.get("/api-student/videoLesson/selectVideoLesson",{params:{groupId:e.params.groupId}});case 3:t=r.sent,n=t.data||{},o=n.lessonGroup||{},n.teachertTag||"",e.userInfo={alreadyBuy:n.alreadyBuy,username:o.username||"游客".concat(o.teacherId||""),headUrl:o.avatar,buyNum:o.countStudent,id:o.id,lessonNum:o.lessonCount,lessonName:o.lessonName,lessonDesc:o.lessonDesc,lessonPrice:o.lessonPrice,relationType:o.relationType,teacherId:o.teacherId,lessonCoverUrl:o.lessonCoverUrl,auditVersion:o.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,o,a;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(){c.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 12:return t.abrupt("return");case 13:return t.next=15,i.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"VIDEO",bizId:e.params.groupId}});case 15:o=t.sent,(a=o.data)?c.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(a,e.routerTo);case 1:case"end":return r.stop()}}),r)})))).catch((function(){c.close(),e.cancelPayment(a.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,i.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,a=this;return u("div",{class:[j]},[u(h,null,{right:function(){return u("img",{src:v,onClick:function(){return a.shareStatus=!0}},null)}}),u(o,{userInfo:this.userInfo,onUserDetail:function(e){console.log(e),l().isApp&&"STUDENT"===s.platformType&&a.$router.push({path:"/teacherHome",query:{teacherId:e.teacherId,tabs:"video"}})}},null),u(n,{border:!1},{default:function(){return[u("p",{class:x},[a.userInfo.lessonDesc])]}}),u(n,{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:a.userInfo.relationType}}));return u(t,{musicAlbumInfos:r,class:[T],detail:{id:e.id,title:e.videoTitle,content:e.videoContent,imgUrl:e.coverUrl},onPlay:a.onPlay,onMusicAlbumDetail:function(e){a.userInfo.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}):d("数据正在更新,请稍后再试")}},null)})),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!p(r)?e:{default:function(){return[e]}})),this.userInfo.id&&!this.userInfo.alreadyBuy&&u(I,{position:"bottom",background:"white"},{default:function(){return[u("div",{class:["btnGroup",q]},[u(m,{block:!0,round:!0,type:"primary",onClick:a.onBuy},{default:function(){return[a.userInfo.lessonPrice<=0?"免费领取":"立即购买"]}})])]}}),u(f,{show:this.shareStatus,"onUpdate:show":function(e){return a.shareStatus=e},style:{background:"transparent"}},{default:function(){return[u(b,{teacherId:a.userInfo.id,shareUrl:a.shareUrl,shareType:"video"},{default:function(){return[u(w,{class:z,coverClass:U,liveInfo:{backgroundPic:a.userInfo.lessonCoverUrl,courseGroupId:a.userInfo.lessonId,courseGroupName:a.userInfo.lessonName,courseNum:a.userInfo.lessonNum,coursePrice:a.userInfo.lessonPrice,teacherName:a.userInfo.username,teacherId:a.userInfo.id,avatar:a.userInfo.headUrl,studentCount:a.userInfo.buyNum,existBuy:0,subjectName:a.userInfo.lessonSubjectName}},null)]}})]}})])}}))}}}))}();