1 |
- !function(){function e(e,r,t,n,o,a,c){try{var i=e[a](c),u=i.value}catch(s){return void t(s)}i.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 c=r.apply(t,n);function i(r){e(c,o,a,i,u,"next",r)}function u(r){e(c,o,a,i,u,"throw",r)}i(void 0)}))}}var t=document.createElement("style");t.innerHTML="._live-detail_zn2gv_1 ._introduction_zn2gv_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_zn2gv_1 .van-tabs__wrap{margin-bottom:.4rem}._live-detail_zn2gv_1 .van-button--disabled{opacity:.9}._live-detail_zn2gv_1 ._tips_zn2gv_12{background-color:#fff;border-radius:.26667rem;margin:.37333rem .32rem;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding)}._live-detail_zn2gv_1 ._tips_zn2gv_12 h3{display:flex;font-size:.37333rem;font-weight:500;color:#333;line-height:1}._live-detail_zn2gv_1 ._tips_zn2gv_12 p{text-align:justify;padding-top:.24rem;font-size:.32rem;color:#7a7a7a;line-height:.61333rem}._live-detail_zn2gv_1 ._tips_zn2gv_12 .van-icon{margin-right:.16rem}._live-detail_zn2gv_1 ._btnMore_zn2gv_35{display:flex;justify-content:space-around}._live-detail_zn2gv_1 ._btnMore_zn2gv_35 .van-button{width:60%}._live-detail_zn2gv_1 ._shareCourse_zn2gv_42{margin:0;padding:.21333rem;background:#fff}._live-detail_zn2gv_1 ._shareCourse_zn2gv_42 .itemTitle{max-width:2.93333rem!important}\n",document.head.appendChild(t),System.register(["./index-legacy.fba2875c.js","./index-legacy.d86274ab.js","./index-legacy.7d84de09.js","./index-legacy.632c23f1.js","./orderStatus-legacy.9b3fdd6c.js","./index-legacy.e7460ea1.js","./index-legacy.a026685b.js","./index-legacy.31c636a4.js","./live-item-legacy.0569dec7.js","./icon-share-legacy.576b0857.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","./index-legacy.40eca993.js","./use-height-legacy.233a2ec8.js","./index-legacy.af00a324.js","./code-down-load-legacy.cfefc939.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var t,n,o,a,c,i,u,s,d,l,f,m,v,g,p,h,I,_,b,y,Y,A,j;return{setters:[function(e){t=e.d,n=e.u,o=e.g,a=e.w,c=e.n,i=e.T,u=e.D,s=e.j,d=e.f,l=e.M,f=e.z,m=e.B,v=e.aR},function(e){g=e.C},function(e){p=e.S},function(e){h=e.U},function(e){I=e.o,_=e.a},function(e){b=e.C},function(e){y=e.C},function(e){Y=e.C},function(e){A=e.L},function(e){j=e.i},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var U="_live-detail_zn2gv_1",T="_introduction_zn2gv_1",x="_tips_zn2gv_12",w="_btnMore_zn2gv_35",N="_shareCourse_zn2gv_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,live:{},shareStatus:!1,shareUrl:""}},computed:{userInfo:function(){var e,r,t=this.live;console.log("live",t);var o=t.planList||[],a=(null===(e=o[0])||void 0===e?void 0:e.startTime)||new Date,c=(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(c).format("HH:mm"))||"",buyNum:t.studentCount,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}},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):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);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)})),console.log(u,e.live,"tempObj"),u&&1===u.liveState?c({api:"joinLiveRoom",content:{roomId:u.roomUid,teacherId:e.live.teacherId}}):u&&2===u.liveState?setTimeout((function(){i("课程已结束")}),100):setTimeout((function(){i("课程尚未开始,请耐心等候")}),100),r.next=14;break;case 12:r.prev=12,r.t0=r.catch(0);case 14:case"end":return r.stop()}}),r,null,[[0,12]])})))()},onBuy:function(){var e=this;return r(regeneratorRuntime.mark((function t(){var n,o,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n=e.live,I.orderObject.orderType="LIVE",I.orderObject.orderName="直播课购买",I.orderObject.orderDesc="直播课购买",I.orderObject.actualPrice=n.coursePrice,I.orderObject.recomUserId=e.recomUserId,I.orderObject.orderNo="",I.orderObject.orderList=[{orderType:"LIVE",goodsName:"直播课购买",courseGroupId:n.courseGroupId,courseGroupName:n.courseGroupName,coursePrice:n.coursePrice,teacherName:n.userName||"游客".concat(n.teacherId||""),teacherId:n.teacherId,avatar:n.avatar,courseInfo:e.courseInfo,recomUserId:e.recomUserId}],!(n.coursePrice<=0)){t.next=13;break}return t.next=12,_((function(){u.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 12:return t.abrupt("return");case 13:return t.next=15,a.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"LIVE",bizId:e.groupId}});case 15:o=t.sent,(c=o.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:I.orderObject.orderNo=c.orderNo,I.orderObject.actualPrice=c.actualPrice,I.orderObject.discountPrice=c.discountPrice,e.routerTo();case 4:case"end":return r.stop()}}),r)})))).catch((function(){u.close(),e.cancelPayment(c.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(){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:[U,"mb12"]},[s(b,null,{right:function(){return s("img",{src:j,onClick:function(){return e.shareStatus=!0}},null)}}),s(h,{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(p,{border:!0},{default:function(){return[s("p",{class:T},[e.userInfo.lessonDesc])]}}),s(p,{title:"课程列表",icon:"courseList",border:!0,contentStyle:{paddingTop:"0"}},{default:function(){return[e.courseInfo.length>0&&s(g,{courseInfo:e.courseInfo,courseId:Number(e.courseId)||0},null)]}}),s("div",{class:x},[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),f("温馨提示")]),s("p",null,[f("1、该直播课程销售截止后,报名人数若少于"),this.live.mixStudentNum||0,f("人将取消开课,已购买学员付费金额将自动返还,请您放心购买;"),s("br",null,null),f("2、直播课教学计划中的上课时间为老师预计时间,实际上课时间以老师开启直播时间为准;"),s("br",null,null),f("3、若您错过老师直播,可通过视频回放观看完整课程。")])]),this.courseInfo.length>0&&1!==this.live.existBuy&&s(y,{position:"bottom",background:"white"},{default:function(){return[s("div",{class:["btnGroup",w]},[s(m,{block:!0,round:!0,type:"primary",onClick:e.onBuy},{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(m,{block:!0,round:!0,type:"primary",onClick:e.onJoinRoom},{default:function(){return[f("进入直播间")]}})])]}}),s(v,{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:N,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)]}})]}})])}}))}}}))}();
|