live-detail-legacy.05c8d3a4.js 12 KB

1
  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.ca86d0f6.js","./index-legacy.a48d3102.js","./index-legacy.2fe52d92.js","./index-legacy.f8641610.js","./orderStatus-legacy.43d498d4.js","./index-legacy.78c8492b.js","./index-legacy.d0d6a39b.js","./index-legacy.ab8f55ee.js","./live-item-legacy.da1569a3.js","./icon-share-legacy.b913ab9e.js","./index-legacy.2c46c9eb.js","./plyr-legacy.180f4c53.js","./index-legacy.fc510843.js","./index-legacy.c36297f9.js","./index-legacy.c8b60294.js","./icon_teacher-legacy.42ba77b1.js","./icon_timer2-legacy.b6c78faa.js","./icon-jiaozi-legacy.dd5ed0e2.js","./index-legacy.90f7f902.js","./use-height-legacy.be763bb2.js","./index-legacy.00d337cc.js","./code-down-load-legacy.1f28d849.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.700833c0.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.C},function(e){n=e.S},function(e){o=e.U},function(e){a=e.d,c=e.x,i=e.s,u=e.e,s=e.p,d=e.T,l=e.D,f=e.i,m=e.b,v=e.N,g=e.A,p=e.B,h=e.aT},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(){}],execute:function(){var T="_live-detail_zn2gv_1",U="_introduction_zn2gv_1",x="_tips_zn2gv_12",N="_btnMore_zn2gv_35",w="_shareCourse_zn2gv_42";e("default",a({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 n=t.planList||[],o=(null===(e=n[0])||void 0===e?void 0:e.startTime)||new Date,a=(null===(r=n[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(c(o).format("YYYY-MM-DD")," ").concat(c(o).format("HH:mm"),"~").concat(c(a).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,n=r.endTime||new Date;e.push({courseTime:"".concat(c(t).format("YYYY-MM-DD")," ").concat(c(t).format("HH:mm"),"~").concat(c(n).format("HH:mm")),coursePlan:r.plan,roomUid:r.roomUid,liveState:r.liveState,id:r.courseId})})),e||[]},salesEndDate:function(){var e=this.live;return c(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=i.user.data)||void 0===t?void 0:t.userId,"&groupId=").concat(e.groupId,"&userType=").concat(i.platformType):e.shareUrl="".concat(location.origin,"/teacher/#/shareLive?recomUserId=").concat(null===(n=i.user.data)||void 0===n?void 0:n.userId,"&groupId=").concat(e.groupId,"&userType=").concat(i.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,u.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,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,u.get("/api-student/courseGroup/queryLiveCourseInfo",{params:{groupId:e.groupId}});case 3:t=r.sent,n=t.data||{},o=n.planList||[],a={},o.forEach((function(r){r.courseId===Number(e.courseId)&&(a=r)})),console.log(a,e.live,"tempObj"),a&&1===a.liveState?s({api:"joinLiveRoom",content:{roomId:a.roomUid,teacherId:e.live.teacherId}}):a&&2===a.liveState?setTimeout((function(){d("课程已结束")}),100):setTimeout((function(){d("课程尚未开始,请耐心等候")}),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,a;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(){l.alert({message:"领取成功",confirmButtonText:"确定",confirmButtonColor:"#2dc7aa"}).then((function(){e._init()}))}));case 12:return t.abrupt("return");case 13:return t.next=15,u.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"LIVE",bizId:e.groupId}});case 15:o=t.sent,(a=o.data)?l.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=a.orderNo,I.orderObject.actualPrice=a.actualPrice,I.orderObject.discountPrice=a.discountPrice,e.routerTo();case 4:case"end":return r.stop()}}),r)})))).catch((function(){l.close(),e.cancelPayment(a.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,u.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 f("div",{class:[T,"mb12"]},[f(b,null,{right:function(){return f("img",{src:j,onClick:function(){return e.shareStatus=!0}},null)}}),f(o,{userInfo:this.userInfo,showBuy:!1,onUserDetail:function(r){"STUDENT"===i.platformType&&m().isApp&&e.$router.push({path:"/teacherHome",query:{teacherId:r.id,tabs:"live"}})}},null),f(n,{border:!0},{default:function(){return[f("p",{class:U},[e.userInfo.lessonDesc])]}}),f(n,{title:"课程列表",icon:"courseList",border:!0,contentStyle:{paddingTop:"0"}},{default:function(){return[e.courseInfo.length>0&&f(t,{courseInfo:e.courseInfo,courseId:Number(e.courseId)||0},null)]}}),f("div",{class:x},[f("h3",null,[f(v,{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),g("温馨提示")]),f("p",null,[g("1、该直播课程销售截止后,报名人数若少于"),this.live.mixStudentNum||0,g("人将取消开课,已购买学员付费金额将自动返还,请您放心购买;"),f("br",null,null),g("2、直播课教学计划中的上课时间为老师预计时间,实际上课时间以老师开启直播时间为准;"),f("br",null,null),g("3、若您错过老师直播,可通过视频回放观看完整课程。")])]),this.courseInfo.length>0&&1!==this.live.existBuy&&f(Y,{position:"bottom",background:"white"},{default:function(){return[f("div",{class:["btnGroup",N]},[f(p,{block:!0,round:!0,type:"primary",onClick:e.onBuy},{default:function(){return[e.live.coursePrice<=0?"免费领取":"立即购买"]}})])]}}),"1"==this.joinRoom&&2!==this.liveStatus.liveStatus&&f(Y,{position:"bottom",background:"white"},{default:function(){return[f("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[f(p,{block:!0,round:!0,type:"primary",onClick:e.onJoinRoom},{default:function(){return[g("进入直播间")]}})])]}}),f(h,{show:this.shareStatus,"onUpdate:show":function(r){return e.shareStatus=r},style:{background:"transparent"}},{default:function(){return[f(y,{teacherId:e.userInfo.id,shareUrl:e.shareUrl,shareType:"live"},{default:function(){return[f(A,{class:w,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)]}})]}})])}}))}}}))}();