1 |
- !function(){function e(e,t,n,r,o,a,u){try{var s=e[a](u),i=s.value}catch(c){return void n(c)}s.done?t(i):Promise.resolve(i).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var u=t.apply(n,r);function s(t){e(u,o,a,s,i,"next",t)}function i(t){e(u,o,a,s,i,"throw",t)}s(void 0)}))}}var n=document.createElement("style");n.innerHTML="._live-detail_1bpz3_1 ._introduction_1bpz3_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_1bpz3_1 .van-tabs__wrap{margin-bottom:.4rem}._live-detail_1bpz3_1 ._shareCourse_1bpz3_9{margin:0;padding:.21333rem;background:#fff}._live-detail_1bpz3_1 ._shareCourse_1bpz3_9 .itemTitle{max-width:2.93333rem!important}\n",document.head.appendChild(n),System.register(["./index-legacy.31d72590.js","./index-legacy.f6bcdf82.js","./index-legacy.b6d96b2d.js","./index-legacy.d08d293d.js","./index-legacy.b2528a15.js","./index-legacy.47b1cde1.js","./index-legacy.c99e8e49.js","./live-item-legacy.1f5440b3.js","./index-legacy.4f922f18.js","./index-legacy.3f4943f0.js","./index-legacy.7e6f30e7.js","./index-legacy.cc0fd5e8.js","./plyr-legacy.180f4c53.js","./index-legacy.207dc8c2.js","./index-legacy.a7e74731.js","./index-legacy.ca42ae97.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js","./icon_student-legacy.45be2fa9.js","./code-down-load-legacy.5a78d39b.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.8b7c8200.js","./use-id-legacy.4f071235.js","./use-tab-status-legacy.5c2c2da3.js","./use-refs-legacy.2f8acfce.js"],(function(e){"use strict";var n,r,o,a,u,s,i,c,l,d,f,m,p,v,h,g,b,I,y,_,j;return{setters:[function(e){n=e.C},function(e){r=e.S},function(e){o=e.U},function(e){a=e.U},function(e){u=e.d,s=e.x,i=e.e,c=e.s,l=e.p,d=e.T,f=e.i,m=e.C,p=e.F,v=e.B,h=e.A,g=e.aT},function(e){b=e.C},function(e){I=e.C},function(e){y=e.L},function(){},function(){},function(e){_=e.T,j=e.a},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var x="_live-detail_1bpz3_1",T="_introduction_1bpz3_1",S="_shareCourse_1bpz3_9";e("default",u({name:"LiveDetail",data:function(){var e=this.$route.query;return{share:e.share,joinRoom:e.joinRoom,groupId:e.groupId,courseId:e.classId,live:{},shareStatus:!1,shareUrl:"",myself:!1}},computed:{userInfo:function(){var e,t,n=this.live,r=n.planList||[],o=(null===(e=r[0])||void 0===e?void 0:e.startTime)||new Date,a=(null===(t=r[0])||void 0===t?void 0:t.endTime)||new Date;return{headUrl:n.avatar,avatar:n.avatar,username:n.userName,id:n.teacherId,startTime:"".concat(s(o).format("YYYY-MM-DD")," ").concat(s(o).format("HH:mm"),"~").concat(s(a).format("HH:mm"))||"",lessonPrice:n.coursePrice,buyNum:n.studentCount||0,lessonId:n.courseGroupId,lessonNum:n.courseNum||0,lessonDesc:n.courseIntroduce,lessonCoverUrl:n.backgroundPic||n.backgroundPicTemplate,lessonName:n.courseGroupName,subjectName:n.subjectName,courseStartTime:n.courseStartTime,auditVersion:n.auditVersion||0,isDegree:!!n.degreeFlag,isTeacher:!!n.teacherFlag}},courseInfo:function(){var e=[];return(this.live.planList||[]).forEach((function(t){var n=t.startTime||new Date,r=t.endTime||new Date;e.push({courseTime:"".concat(s(n).format("YYYY-MM-DD")," ").concat(s(n).format("HH:mm"),"~").concat(s(r).format("HH:mm")),coursePlan:t.plan,roomUid:t.roomUid,liveState:t.liveState,id:t.courseId})})),e||[]},liveStatus:function(){var e=this,t=this.live.planList||[],n={status:!1,liveStatus:0,roomUid:""};return t.forEach((function(t){t.courseId===Number(e.courseId)&&(n.status=!0,n.liveStatus=t.liveStatus,n.roomUid=t.roomUid)})),n},studentList:function(){return this.live.studentList||[]},courseOffStatus:function(){var e=this.live,t=!1;return("APPLY"===e.status&&0===e.studentList.length||"NOT_SALE"===e.status)&&(t=!0),t}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.get("/api-teacher/courseGroup/queryLiveCourseInfo",{params:{groupId:e.groupId}});case 3:r=t.sent,e.live=r.data||{},"TEACHER"===c.platformType&&(e.myself=!r.data.myself),e.shareUrl="".concat(location.origin,"/teacher/#/shareLive?recomUserId=").concat(null===(n=c.user.data)||void 0===n?void 0:n.userId,"&groupId=").concat(e.groupId),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})))()},methods:{onJoinRoom:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,r,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.get("/api-teacher/courseGroup/queryLiveCourseInfo",{params:{groupId:e.groupId}});case 3:n=t.sent,r=n.data||{},o=r.planList||[],a={},o.forEach((function(t){t.courseId===Number(e.courseId)&&(a=t)})),a&&1===a.liveState?l({api:"joinLiveRoom",content:{roomId:a.roomUid,teacherId:e.live.teacherId}}):a&&2===a.liveState?setTimeout((function(){d("课程已结束")}),100):setTimeout((function(){d("课程尚未开始,请耐心等候")}),100),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),t,null,[[0,11]])})))()},cancelCourseGroup:function(){var e=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.get("/api-teacher/courseGroup/cancelCourseGroup",{params:{groupId:e.groupId}});case 3:d("取消课程成功"),setTimeout((function(){l({api:"back",content:{}})}),500),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})))()}},render:function(){var e=this;return f("div",{class:[x,"mb12"]},[f(o,{userInfo:this.userInfo},null),f(r,{border:!0},{default:function(){return[f("p",{class:T},[e.userInfo.lessonDesc])]}}),this.myself?f(r,{title:"课程列表",icon:"courseList",border:!0},{default:function(){return[f(n,{courseInfo:e.courseInfo,courseId:Number(e.courseId)||0},null)]}}):f(r,{title:"课程列表",icon:"courseList",titleShow:!1,contentStyle:{paddingTop:"0"}},{default:function(){return[f(_,{color:"var(--van-primary)",lineWidth:20,sticky:!0},{default:function(){return[f(j,{title:"课程",titleClass:"van-hairline--bottom"},{default:function(){return[f(n,{courseInfo:e.courseInfo,courseId:Number(e.courseId)||0},null)]}}),f(j,{title:"学员列表",titleClass:"van-hairline--bottom"},{default:function(){return[e.studentList.map((function(e){return f(a,{class:"mb12",users:{avatar:e.avatar,studentId:e.studentId,studentName:e.userName,createTime:e.createTime}},null)})),0===e.studentList.length&&f(m,{tips:"暂无购买学员",classImgSize:"SMALL",btnStatus:!1},null)]}})]}})]}}),"OUT_SALE"!==this.live.status&&f(p,null,[this.courseOffStatus&&f(I,{position:"bottom",background:"white"},{default:function(){return[f("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[f(v,{block:!0,round:!0,type:"primary",onClick:e.cancelCourseGroup},{default:function(){return[h("取消课程")]}})])]}}),"1"==this.joinRoom&&2!==this.liveStatus.liveStatus&&f(I,{position:"bottom",background:"white"},{default:function(){return[f("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[f(v,{block:!0,round:!0,type:"primary",onClick:e.onJoinRoom},{default:function(){return[h("进入直播间")]}})])]}}),"1"==this.share&&this.courseInfo.length>0&&f(I,{position:"bottom",background:"white"},{default:function(){return[f("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[f(v,{block:!0,round:!0,type:"primary",onClick:function(){e.shareStatus=!0}},{default:function(){return[h("分享")]}})])]}})]),f(g,{show:this.shareStatus,"onUpdate:show":function(t){return e.shareStatus=t},style:{background:"transparent"}},{default:function(){return[f(b,{teacherId:e.userInfo.id,shareUrl:e.shareUrl,shareType:"live"},{default:function(){return[f(y,{class:S,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)]}})]}})])}}))}}}))}();
|