live-detail-legacy.03e992db.js 12 KB

1
  1. !function(){function e(e,r,t,n,o,a,i){try{var c=e[a](i),u=c.value}catch(s){return void t(s)}c.done?r(u):Promise.resolve(u).then(n,o)}function r(r){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=r.apply(t,n);function c(r){e(i,o,a,c,u,"next",r)}function u(r){e(i,o,a,c,u,"throw",r)}c(void 0)}))}}var t=document.createElement("style");t.innerHTML="._live-detail_13imh_1 ._introduction_13imh_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_13imh_1 .van-tabs__wrap{margin-bottom:.4rem}._live-detail_13imh_1 .van-button--disabled{opacity:.5}._live-detail_13imh_1 ._tips_13imh_12{background-color:#fff;border-radius:.26667rem;margin:.37333rem .32rem;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._live-detail_13imh_1 ._tips_13imh_12 h3{display:flex;font-size:.37333rem;font-weight:500;color:#333;line-height:1}._live-detail_13imh_1 ._tips_13imh_12 p{text-align:justify;padding-top:.24rem;font-size:.32rem;color:#7a7a7a;line-height:.61333rem}._live-detail_13imh_1 ._tips_13imh_12 .van-icon{margin-right:.16rem}._live-detail_13imh_1 ._btnMore_13imh_35{display:flex;justify-content:space-around}._live-detail_13imh_1 ._btnMore_13imh_35 .van-button{width:60%}._live-detail_13imh_1 ._shareCourse_13imh_42{margin:0;padding:.21333rem;background:#fff}._live-detail_13imh_1 ._shareCourse_13imh_42 .itemTitle{max-width:2.93333rem!important}\n",document.head.appendChild(t),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.b141d2b5.js","./index-legacy.d9279c92.js","./index-legacy.3b8f07aa.js","./orderStatus-legacy.e7da1c46.js","./index-legacy.87bcd48f.js","./index-legacy.02065493.js","./index-legacy.53b87569.js","./live-item-legacy.ad0abf6d.js","./icon-share-legacy.576b0857.js","./tradeOrder-legacy.5003e5e4.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","./index-legacy.7e047c4c.js","./code-down-load-legacy.0c4c8237.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.2ab737c2.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var t,n,o,a,i,c,u,s,d,l,m,f,p,h,v,g,I,b,_,y,Y,A,j,U;return{setters:[function(e){t=e.d,n=e.w,o=e.g,a=e.y,i=e.n,c=e.T,u=e.D,s=e.j,d=e.f,l=e.N,m=e.A,f=e.B,p=e.aS},function(e){h=e.C},function(e){v=e.S},function(e){g=e.U},function(e){I=e.o,b=e.a},function(e){_=e.C},function(e){y=e.C},function(e){Y=e.C},function(e){A=e.L},function(e){j=e.i},function(e){U=e.t},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var T="_live-detail_13imh_1",x="_introduction_13imh_1",w="_tips_13imh_12",N="_btnMore_13imh_35",k="_shareCourse_13imh_42";e("default",t({name:"LiveDetail",data:function(){var e=this.$route.query;return{joinRoom:e.joinRoom,recomUserId:e.recomUserId,groupId:e.groupId,courseId:e.classId,platform:e.p,live:{},shareStatus:!1,shareUrl:""}},computed:{userInfo:function(){var e,r,t=this.live,o=t.planList||[],a=(null===(e=o[0])||void 0===e?void 0:e.startTime)||new Date,i=(null===(r=o[0])||void 0===r?void 0:r.endTime)||new Date;return{avatar:t.avatar,headUrl:t.avatar,username:t.userName||"游客".concat(t.teacherId||""),id:t.teacherId,startTime:"".concat(n(a).format("YYYY-MM-DD")," ").concat(n(a).format("HH:mm"),"~").concat(n(i).format("HH:mm"))||"",buyNum:t.studentCount,type:"live",lessonId:t.courseGroupId,lessonPrice:t.coursePrice,lessonNum:t.courseNum,lessonDesc:t.courseIntroduce,lessonCoverUrl:t.backgroundPic||t.backgroundPicTemplate,lessonName:t.courseGroupName,subjectName:t.subjectName,courseStartTime:t.courseStartTime,auditVersion:t.auditVersion||0,isDegree:!!t.degreeFlag,isTeacher:!!t.teacherFlag}},platformStatus:function(){var e=o.user.data,r=this.$route.query;return e.tenantId>0&&"tenant"==r.p},courseInfo:function(){var e=[];return(this.live.planList||[]).forEach((function(r){var t=r.startTime||new Date,o=r.endTime||new Date;e.push({courseTime:"".concat(n(t).format("YYYY-MM-DD")," ").concat(n(t).format("HH:mm"),"~").concat(n(o).format("HH:mm")),coursePlan:r.plan,roomUid:r.roomUid,liveState:r.liveState,id:r.courseId})})),e||[]},salesEndDate:function(){var e=this.live;return n(e.salesEndDate||new Date).format("YYYY-MM-DD")},liveStatus:function(){var e=this,r=this.live.planList||[],t={status:!1,liveStatus:0,roomUid:""};return r.forEach((function(r){r.courseId===Number(e.courseId)&&(t.status=!0,t.liveStatus=r.liveStatus,t.roomUid=r.roomUid)})),t}},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/#/shareLive?recomUserId=".concat(null===(t=o.user.data)||void 0===t?void 0:t.userId,"&groupId=").concat(e.groupId,"&userType=").concat(o.platformType,"&p=tenant"):e.shareUrl="".concat(location.origin,"/teacher/#/shareLive?recomUserId=").concat(null===(n=o.user.data)||void 0===n?void 0:n.userId,"&groupId=").concat(e.groupId,"&userType=").concat(o.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;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,a.get("/api-student/courseGroup/queryLiveCourseInfo",{params:{groupId:e.groupId}});case 3:t=r.sent,e.live=t.data||{},r.next=9;break;case 7:r.prev=7,r.t0=r.catch(0);case 9:case"end":return r.stop()}}),r,null,[[0,7]])})))()},onJoinRoom:function(){var e=this;return r(regeneratorRuntime.mark((function r(){var t,n,o,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,a.get("/api-student/courseGroup/queryLiveCourseInfo",{params:{groupId:e.groupId}});case 3:t=r.sent,n=t.data||{},o=n.planList||[],u={},o.forEach((function(r){r.courseId===Number(e.courseId)&&(u=r)})),u&&1===u.liveState?i({api:"joinLiveRoom",content:{roomId:u.roomUid,teacherId:e.live.teacherId}}):u&&2===u.liveState?setTimeout((function(){c("课程已结束")}),100):setTimeout((function(){c("课程尚未开始,请耐心等候")}),100),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]])})))()},initLive:function(){var e=this.live;I.orderObject.orderType="LIVE",I.orderObject.orderName="直播课购买",I.orderObject.orderDesc="直播课购买",I.orderObject.actualPrice=e.coursePrice,I.orderObject.recomUserId=this.recomUserId,I.orderObject.orderNo="",I.orderObject.orderList=[{orderType:"LIVE",goodsName:"直播课购买",courseGroupId:e.courseGroupId,courseGroupName:e.courseGroupName,coursePrice:e.coursePrice,price:e.coursePrice,teacherName:e.userName||"游客".concat(e.teacherId||""),teacherId:e.teacherId,avatar:e.avatar,courseInfo:this.courseInfo,recomUserId:this.recomUserId}]},onBuy:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(e.live.coursePrice<=0)){t.next=7;break}return e.initLive(),t.next=6,b((function(){u.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 6:return t.abrupt("return");case 7:return t.next=9,a.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"LIVE",bizId:e.groupId}});case 9:n=t.sent,(o=n.data)?u.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:U(o,e.routerTo);case 1:case"end":return r.stop()}}),r)})))).catch((function(){u.close(),e.cancelPayment(o.orderNo)})):(e.initLive(),e.routerTo()),t.next=16;break;case 14:t.prev=14,t.t0=t.catch(0);case 16:case"end":return t.stop()}}),t,null,[[0,14]])})))()},routerTo:function(){var e=this.live;this.$router.push({path:"/orderDetail",query:{orderType:"LIVE",courseGroupId:e.courseGroupId}})},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,a.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=this;return s("div",{class:[T,"mb12"]},[s(_,null,{right:function(){return s("img",{src:j,onClick:function(){return e.shareStatus=!0}},null)}}),s(g,{userInfo:this.userInfo,showBuy:!1,onUserDetail:function(r){"STUDENT"===o.platformType&&d().isApp&&e.$router.push({path:"/teacherHome",query:{teacherId:r.id,tabs:"live"}})}},null),s(v,{border:!0},{default:function(){return[s("p",{class:x},[e.userInfo.lessonDesc])]}}),s(v,{title:"课程列表",icon:"courseList",border:!0,contentStyle:{paddingTop:"0"}},{default:function(){return[e.courseInfo.length>0&&s(h,{courseInfo:e.courseInfo,courseId:Number(e.courseId)||0},null)]}}),s("div",{class:w},[s("h3",null,[s(l,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAAXNSR0IArs4c6QAAASNQTFRFAAAA/wAA/4AA/6pV/5kz/4Ar/4BA/49A/445/4BA/4xA/4VD/4pA/4U9/4lA/4g7/4M+/4Y5/4Y9/4VA/4g+/4U9/4g8/4Y8/4Q+/4U//4U9/4g8/4Y+/4c9/4Y9/4c8/4c+/4c+/4U9/4Y+/4Y9/4Y8/4c+/4Y+/4c9/4Y9/4Y8/4Y9/4c9/4Y9/4Y8/4Y+/4U+/4U9/4c9/4Y8/4U+/4Y9/4c8/4Y8/4Y+/4Y9/4Y+/4c+/4c9/4Y9/4c+/4Y9/4Y9/4Y8/4c9/4Y9/4Y8/4Y9/4U9/4c9/4Y8/4c9/4Y9/4Y9/4Y9/4c9/4Y8/4Y+/4Y9/4Y9/4U8/4Y9/4Y9/4Y9/4Y8/4Y9/4Y9/4Y8/4Y9/4Y9/4Y9/4c9/4Y8/4Y9/4Y9qWZ60gAAAGB0Uk5TAAECAwUGEBASFBQXGBkcHiUoKiwtLi83OkFLTU5TVFVXYmRnaXJzdH1+h42Ok5SUlZeXmJmgoaWlp6qusLGys7u+w8rL0NbW19jZ3d7j5OTn7O3t8vP19/j5+fr7/P3+TBv5LQAAAThJREFUOMvF1OszQkEYx/FK6KakXMpBSDfkknIJSYUuKIVOl+P7//8VXmiOc057mDHTeF7t85vP7uzu7KzFMrE6eY3/jhQebD8Lf7IMdMtJvynx5oaMapjzik2oBdxnEonjO6AVEhmpD4Wlr/HiNfSlcRPsIG99t5tdOkGjsZb4WNcGawolqwFFYE+f7ELEgIq0Z/XJzAtFfeIYkDHu4IiBQxeEYewwEoR1QRTGzhKAqC6IgceIPBDTBXFwG5Eb4v+JUmKU0rS2LGJE1qa9AKXpNCJnU9FeQpW6T/TEfHWqatMjLX6saXrquEHNJTKuGg21SYD8LCgZkiqyX2JSV3bNwqvpU0EdSNY//QJzGwujidMr2/MmqA7tm7P9w4vbN3g0QUXtjvMmaGo5lq88vcutyvlOYEIf2ydPMlkWBCFozgAAAABJRU5ErkJggg==",size:15},null),m("温馨提示")]),s("p",null,[m("1、该直播课程销售截止后,报名人数若少于"),this.live.mixStudentNum||0,m("人将取消开课,已购买学员付费金额将自动返还,请您放心购买;"),s("br",null,null),m("2、直播课教学计划中的上课时间为老师预计时间,实际上课时间以老师开启直播时间为准;"),s("br",null,null),m("3、若您错过老师直播,可通过视频回放观看完整课程。")])]),this.courseInfo.length>0&&1!==this.live.existBuy&&s(y,{position:"bottom",background:"white"},{default:function(){return[s("div",{class:["btnGroup",N]},[s(f,{block:!0,round:!0,type:"primary",onClick:e.onBuy,disabled:e.platformStatus},{default:function(){return[e.live.coursePrice<=0?"免费领取":"立即购买"]}})])]}}),"1"==this.joinRoom&&2!==this.liveStatus.liveStatus&&s(y,{position:"bottom",background:"white"},{default:function(){return[s("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[s(f,{block:!0,round:!0,type:"primary",onClick:e.onJoinRoom},{default:function(){return[m("进入直播间")]}})])]}}),s(p,{show:this.shareStatus,"onUpdate:show":function(r){return e.shareStatus=r},style:{background:"transparent"}},{default:function(){return[s(Y,{teacherId:e.userInfo.id,shareUrl:e.shareUrl,shareType:"live"},{default:function(){return[s(A,{class:k,liveInfo:{backgroundPic:e.userInfo.lessonCoverUrl,courseGroupId:e.userInfo.lessonId,courseGroupName:e.userInfo.lessonName,courseNum:e.userInfo.lessonNum,coursePrice:e.userInfo.lessonPrice,teacherName:e.userInfo.username,teacherId:e.userInfo.id,avatar:e.userInfo.avatar,studentCount:e.userInfo.buyNum,courseStartTime:e.userInfo.courseStartTime,existBuy:0,subjectName:e.userInfo.subjectName}},null)]}})]}})])}}))}}}))}();