index-legacy.d91819a7.js 5.4 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.fba2875c.js","./index-legacy.d86274ab.js","./index-legacy.7d84de09.js","./index-legacy.632c23f1.js","./index-legacy.a026685b.js","./share-legacy.125a9021.js","./index-legacy.57355ab1.js","./plyr-legacy.180f4c53.js","./index-legacy.7dcec7b3.js","./index-legacy.f231f1c5.js","./index-legacy.d92f7da7.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.d,l=e.u,d=e.f,f=e.g,m=e.y,p=e.n,g=e.D,v=e.w,h=e.j,_=e.B,y=e.z},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(){}],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,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"))||"",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(m.stringify(e))):(p({api:"openWebView",content:{url:"".concat(location.origin,"/student/#/liveDetail??").concat(m.stringify(e)),orientation:1,isHideTitle:!1}}),p({api:"back"}))}else"TEACHER"===f.platformType&&g.alert({title:"提示",message:"请使用酷乐秀学生端扫码打开",confirmButtonColor:"#2dc7aa"}).then((function(){p({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),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(_,{block:!0,round:!0,type:"primary",onClick:e.onShare},{default:function(){return[y("下载酷乐秀进入课程")]}})])]}}),this.wxStatus&&h("div",{class:S,onClick:function(){e.wxStatus=!1}},[h("img",{src:U("wx_bg.png"),alt:""},null)])])}}))}}}))}();