index-legacy.59157331.js 5.5 KB

1
  1. !function(){function e(e,n,t,i,o,a,r){try{var c=e[a](r),s=c.value}catch(u){return void t(u)}c.done?n(s):Promise.resolve(s).then(i,o)}var n=document.createElement("style");n.innerHTML="._live-detail_1vd6e_1 ._introduction_1vd6e_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_1vd6e_1 .van-tabs__wrap{margin-bottom:.4rem}._live-detail_1vd6e_1 ._wxpopup_1vd6e_9{width:100%;height:100vh;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);z-index:9999}._live-detail_1vd6e_1 ._wxpopup_1vd6e_9 img{width:88%;margin:0 6%}\n",document.head.appendChild(n),System.register(["./icon_discount-legacy.51763f3b.js","./share-vip-tips-legacy.0d425f76.js","./share-banner-legacy.3a0e6967.js","./wx_bg-legacy.a09a21f9.js","./index-legacy.ca86d0f6.js","./index-legacy.a48d3102.js","./index-legacy.2fe52d92.js","./index-legacy.d0d6a39b.js","./index-legacy.f8641610.js","./share-legacy.d80c4a50.js","./index-legacy.c3bbeade.js","./index-legacy.2c46c9eb.js","./plyr-legacy.180f4c53.js","./index-legacy.fc510843.js","./index-legacy.c36297f9.js","./index-legacy.c8b60294.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js"],(function(n){"use strict";var t,i,o,a,r,c,s,u,l,d,f,m,p,g,v,h,_,y,b,w,x,T,I;return{setters:[function(e){t=e._,i=e.c,o=e.d},function(e){a=e._,r=e.a},function(e){c=e._},function(e){s=e._},function(e){u=e.C},function(e){l=e.S},function(e){d=e.U},function(e){f=e.C},function(e){m=e.d,p=e.x,g=e.b,v=e.s,h=e.p,_=e.D,y=e.e,b=e.i,w=e.B,x=e.A},function(e){T=e.s},function(e){I=e.q},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var j="_live-detail_1vd6e_1",D="_introduction_1vd6e_1",S="_wxpopup_1vd6e_9",U=n("getAssetsHomeFile",(function(e){var n="../images/".concat(e);return{"../images/icon-cert.png":t,"../images/icon_discount.png":i,"../images/icon_music.png":o,"../images/music-share-banner.png":a,"../images/share-banner.png":c,"../images/share-vip-tips.png":r,"../images/wx_bg.png":s}[n].default}));n("default",m({name:"LiveDetail",data:function(){var e=this.$route.query;return{recomUserId:e.recomUserId,groupId:e.groupId,live:{},wxStatus:!1}},computed:{userInfo:function(){var e,n,t=this.live,i=t.planList||[],o=(null===(e=i[0])||void 0===e?void 0:e.startTime)||new Date,a=(null===(n=i[0])||void 0===n?void 0:n.endTime)||new Date;return{headUrl:t.avatar,username:t.userName,isDegree:!!t.degreeFlag,isTeacher:!!t.teacherFlag,id:t.teacherId,startTime:"".concat(p(o).format("YYYY-MM-DD")," ").concat(p(o).format("HH:mm"),"~").concat(p(a).format("HH:mm"))||"",lessonPrice:t.coursePrice,buyNum:t.studentCount||0,lessonNum:t.courseNum||0,lessonDesc:t.courseIntroduce,lessonCoverUrl:t.backgroundPic||t.backgroundPicTemplate,lessonName:t.courseGroupName,auditVersion:0}},courseInfo:function(){var e=[];return(this.live.planList||[]).forEach((function(n){var t=n.startTime||new Date,i=n.endTime||new Date;e.push({courseTime:"".concat(p(t).format("YYYY-MM-DD")," ").concat(p(t).format("HH:mm"),"~").concat(p(i).format("HH:mm")),coursePlan:n.plan,roomUid:n.roomUid,liveState:n.liveState,id:n.courseId})})),e||[]}},created:function(){if(g().isApp)if("STUDENT"===v.platformType){var e=this.$route.query;e.recomUserId=e.userType&&"STUDENT"==e.userType?"":e.recomUserId,g().ios?window.location.replace("".concat(location.origin,"/student/#/liveDetail??").concat(I.stringify(e))):(h({api:"openWebView",content:{url:"".concat(location.origin,"/student/#/liveDetail??").concat(I.stringify(e)),orientation:1,isHideTitle:!1}}),h({api:"back"}))}else"TEACHER"===v.platformType&&_.alert({title:"提示",message:"请使用酷乐秀学生端扫码打开",confirmButtonColor:"#2dc7aa"}).then((function(){h({api:"back"})}));else this.reCall()},mounted:function(){var n,t=this;return(n=regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,y.post("/api-teacher/open/liveShareProfit",{data:{bizId:t.groupId,userId:t.recomUserId}});case 3:n=e.sent,t.live=n.data.liveCourseGroup||{},e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,i=arguments;return new Promise((function(o,a){var r=n.apply(t,i);function c(n){e(r,o,a,c,s,"next",n)}function s(n){e(r,o,a,c,s,"throw",n)}c(void 0)}))})()},methods:{locationReplace:function(e){history.replaceState?(history.replaceState(null,document.title,e),window.location.reload()):location.replace(e)},reCall:function(){var e=location.origin+"/student/#/liveDetail",n=this.$route.query;e+="?recomUserId=".concat(n.userType&&"STUDENT"==n.userType?"":this.recomUserId,"&groupId=").concat(n.groupId),T(e,{})},onShare:function(){g().weixin?this.wxStatus=!0:(this.reCall(),setTimeout((function(){window.location.href=location.origin+"/student/#/download"}),3e3))}},render:function(){var e=this;return b("div",{class:[j,"mb12"]},[b(d,{userInfo:this.userInfo,showBuy:!1},null),b(l,{border:!0},{default:function(){return[b("p",{class:D},[e.userInfo.lessonDesc])]}}),b(l,{title:"课程列表",icon:"courseList",border:!0},{default:function(){return[b(u,{courseInfo:e.courseInfo,hideVideo:!0},null)]}}),b(f,{position:"bottom"},{default:function(){return[b("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[b(w,{block:!0,round:!0,type:"primary",onClick:e.onShare},{default:function(){return[x("下载酷乐秀进入课程")]}})])]}}),this.wxStatus&&b("div",{class:S,onClick:function(){e.wxStatus=!1}},[b("img",{src:U("wx_bg.png"),alt:""},null)])])}}))}}}))}();