index-legacy.ac364a23.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","./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.b141d2b5.js","./index-legacy.d9279c92.js","./index-legacy.3b8f07aa.js","./index-legacy.02065493.js","./share-legacy.cd86940e.js","./index-legacy.a3c6b414.js","./plyr-legacy.2bfabaee.js","./tcplayer.v4.8.0.min-legacy.2a56ab95.js","./index-legacy.610f0a70.js","./index-legacy.fd89cccf.js","./index-legacy.4a75d877.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./index-legacy.bbc2b10e.js"],(function(n){"use strict";var t,i,o,a,r,c,s,u,l,d,f,p,m,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.d,l=e.w,d=e.f,f=e.g,p=e.v,m=e.n,g=e.D,v=e.y,h=e.j,y=e.B,_=e.A},function(e){b=e.C},function(e){w=e.S},function(e){x=e.U},function(e){T=e.C},function(e){I=e.s},function(){},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",u({name:"LiveDetail",data:function(){var e=this.$route.query;return{recomUserId:e.recomUserId,groupId:e.groupId,platform:e.p,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(l(o).format("YYYY-MM-DD")," ").concat(l(o).format("HH:mm"),"~").concat(l(a).format("HH:mm"))||"",type:"live",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(l(t).format("YYYY-MM-DD")," ").concat(l(t).format("HH:mm"),"~").concat(l(i).format("HH:mm")),coursePlan:n.plan,roomUid:n.roomUid,liveState:n.liveState,id:n.courseId})})),e||[]}},created:function(){if(d().isApp)if("STUDENT"===f.platformType){var e=this.$route.query;e.recomUserId=e.userType&&"STUDENT"==e.userType?"":e.recomUserId,d().ios?window.location.replace("".concat(location.origin,"/student/#/liveDetail??").concat(p.stringify(e))):(m({api:"openWebView",content:{url:"".concat(location.origin,"/student/#/liveDetail??").concat(p.stringify(e)),orientation:1,isHideTitle:!1}}),m({api:"back"}))}else"TEACHER"===f.platformType&&g.alert({title:"提示",message:"请使用酷乐秀学生端扫码打开",confirmButtonColor:"#2dc7aa"}).then((function(){m({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,v.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,"&p=").concat(n.p),I(e,{})},onShare:function(){d().weixin?this.wxStatus=!0:(this.reCall(),setTimeout((function(){window.location.href=location.origin+"/student/#/download"}),3e3))}},render:function(){var e=this;return h("div",{class:[j,"mb12"]},[h(x,{userInfo:this.userInfo,showBuy:!1},null),h(w,{border:!0},{default:function(){return[h("p",{class:D},[e.userInfo.lessonDesc])]}}),h(w,{title:"课程列表",icon:"courseList",border:!0},{default:function(){return[h(b,{courseInfo:e.courseInfo,hideVideo:!0},null)]}}),h(T,{position:"bottom"},{default:function(){return[h("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[h(y,{block:!0,round:!0,type:"primary",onClick:e.onShare},{default:function(){return[_("下载酷乐秀进入课程")]}})])]}}),this.wxStatus&&h("div",{class:S,onClick:function(){e.wxStatus=!1}},[h("img",{src:U("wx_bg.png"),alt:""},null)])])}}))}}}))}();