index-legacy.05a95721.js 6.3 KB

12345
  1. ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._live-detail_1aqns_1 ._introduction_1aqns_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_1aqns_1 .van-tabs__wrap{margin-bottom:.4rem}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.f873191b.js','./index-legacy.51c32d39.js','./index-legacy.a49e3159.js','./index-legacy.c4ceaaef.js','./index-legacy.6c7a838b.js','./vendor-legacy.85605a93.js','./share-legacy.c42020bd.js','./index-legacy.0a8a9e7c.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a10.js','./icon_teacher-legacy.42ba77b1.js','./icon_timer2-legacy.90431d1a.js'],function(exports){'use strict';var CoursePlanStep,SectionDetail,UserDetail,ColSticky,browser,state,postMessage,request,defineComponent,dayjs,Dialog,createVNode,Button,createTextVNode,shareCall;return{setters:[function(module){CoursePlanStep=module.C;},function(module){SectionDetail=module.S;},function(module){UserDetail=module.U;},function(module){ColSticky=module.C;},function(module){browser=module.e;state=module.s;postMessage=module.p;request=module.r;},function(module){defineComponent=module.d;dayjs=module.g;Dialog=module.D;createVNode=module.a;Button=module.B;createTextVNode=module.j;},function(module){shareCall=module.s;},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var introduction="_introduction_1aqns_1";var styles={"live-detail":"_live-detail_1aqns_1",introduction:introduction};var getAssetsHomeFile=exports('getAssetsHomeFile',function(fileName){var path="../images/".concat(fileName);var modules={};return modules[path].default;});var index=exports('default',defineComponent({name:'LiveDetail',data:function data(){var query=this.$route.query;return{recomUserId:query.recomUserId,// 分享人编号
  2. groupId:query.groupId,live:{},wxStatus:false};},computed:{userInfo:function userInfo(){var _planList$,_planList$2;var live=this.live;var planList=live.planList||[];var startTime=((_planList$=planList[0])===null||_planList$===void 0?void 0:_planList$.startTime)||new Date();var endTime=((_planList$2=planList[0])===null||_planList$2===void 0?void 0:_planList$2.endTime)||new Date();return{headUrl:live.avatar,username:live.userName,id:live.teacherId,startTime:"".concat(dayjs(startTime).format('YYYY-MM-DD')," ").concat(dayjs(startTime).format('HH:mm'),"~").concat(dayjs(endTime).format('HH:mm'))||'',lessonPrice:live.coursePrice,buyNum:live.studentCount||0,lessonNum:live.courseNum||0,// 课时数
  3. lessonDesc:live.courseIntroduce,lessonCoverUrl:live.backgroundPic||live.backgroundPicTemplate,lessonName:live.courseGroupName};},courseInfo:function courseInfo(){var tempArr=[];var coursePlanList=this.live.planList||[];coursePlanList.forEach(function(item){var startTime=item.startTime||new Date();var endTime=item.endTime||new Date();tempArr.push({courseTime:"".concat(dayjs(startTime).format('YYYY-MM-DD')," ").concat(dayjs(startTime).format('HH:mm'),"~").concat(dayjs(endTime).format('HH:mm')),coursePlan:item.plan,roomUid:item.roomUid,liveState:item.liveState,id:item.courseId});});return tempArr||[];}},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;if(browser().isApp){if(state.platformType==='STUDENT'){// 自动跳转到学生端视频课详情购买页
  4. window.location.replace("".concat(location.origin,"/student/#/liveDetail?recomUserId=").concat(_this.recomUserId,"&groupId=").concat(_this.groupId));}else if(state.platformType==='TEACHER'){Dialog.alert({title:'提示',message:'请使用酷乐秀学生端扫码打开',confirmButtonColor:'#2dc7aa'}).then(function(){postMessage({api:'back'});});}}else{// 如果不在app里面则不需要唤起操作
  5. _this.reCall();}_context.next=4;return request.get('/api-teacher/courseGroup/queryLiveCourseInfo',{params:{groupId:_this.groupId}});case 4:res=_context.sent;_this.live=res.data||{};_context.next=10;break;case 8:_context.prev=8;_context.t0=_context["catch"](0);case 10:case"end":return _context.stop();}}},_callee,null,[[0,8]]);}))();},methods:{reCall:function reCall(){var _location=location,origin=_location.origin;var str=origin+'/student/#/liveDetail';var params=this.$route.query;str+="?recomUserId=".concat(this.recomUserId,"&groupId=").concat(params.groupId);shareCall(str,{});},onShare:function onShare(){var _this2=this;if(browser().weixin){this.wxStatus=true;return;}this.reCall();setTimeout(function(){_this2.$router.push('/download');},3000);}},render:function render(){var _this3=this;return createVNode("div",{"class":[styles['live-detail'],'mb12']},[createVNode(UserDetail,{"userInfo":this.userInfo},null),createVNode(SectionDetail,{"border":true},{default:function _default(){return[createVNode("p",{"class":styles.introduction},[_this3.userInfo.lessonDesc])];}}),createVNode(SectionDetail,{"title":"课程列表","icon":"courseList","border":true},{default:function _default(){return[createVNode(CoursePlanStep,{"courseInfo":_this3.courseInfo},null)];}}),createVNode(ColSticky,{"position":"bottom"},{default:function _default(){return[createVNode("div",{"class":['btnGroup'],"style":{paddingTop:'12px'}},[createVNode(Button,{"block":true,"round":true,"type":"primary","onClick":_this3.onShare},{default:function _default(){return[createTextVNode("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")];}})])];}}),this.wxStatus&&createVNode("div",{"class":styles.wxpopup,"onClick":function onClick(){_this3.wxStatus=false;}},[createVNode("img",{"src":getAssetsHomeFile('wx_bg.png'),"alt":""},null)])]);}}));}};});})();