12345 |
- ;(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_1vd6e_1 ._introduction_1vd6e_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._live-detail_1vd6e_1 .van-tabs__wrap{margin-bottom:.4rem}._live-detail_1vd6e_1 ._wxpopup_1vd6e_9{width:100%;height:100vh;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);z-index:9999}._live-detail_1vd6e_1 ._wxpopup_1vd6e_9 img{width:88%;margin:0 6%}\n";document.head.appendChild(__vite_style__);System.register(['./icon-cert-legacy.af17c6c7.js','./wx_bg-legacy.d810cdd5.js','./index-legacy.c4f31b1f.js','./index-legacy.3ecf4a67.js','./index-legacy.8f76ecef.js','./index-legacy.e9ff1c6b.js','./index-legacy.1bceca67.js','./vendor-legacy.eeb61cf8.js','./share-legacy.d2e87599.js','./index-legacy.c75fe8a2.js','./index-legacy.c10b536d.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a10.js','./icon_teacher-legacy.42ba77b1.js','./icon_timer2-legacy.b6c78faa.js'],function(exports){'use strict';var __glob_17_0,__glob_17_1,__glob_17_2,__glob_17_3,CoursePlanStep,SectionDetail,UserDetail,ColSticky,browser,state,postMessage,request,defineComponent,dayjs,Dialog,createVNode,Button,createTextVNode,shareCall,qs;return{setters:[function(module){__glob_17_0=module._;__glob_17_1=module.b;},function(module){__glob_17_2=module._;__glob_17_3=module.a;},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(module){qs=module.q;},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var introduction="_introduction_1vd6e_1";var wxpopup="_wxpopup_1vd6e_9";var styles={"live-detail":"_live-detail_1vd6e_1",introduction:introduction,wxpopup:wxpopup};var getAssetsHomeFile=exports('getAssetsHomeFile',function(fileName){var path="../images/".concat(fileName);var modules={"../images/icon-cert.png":__glob_17_0,"../images/icon_music.png":__glob_17_1,"../images/music-share-banner.png":__glob_17_2,"../images/wx_bg.png":__glob_17_3};return modules[path].default;});var index=exports('default',defineComponent({name:'LiveDetail',data:function data(){var query=this.$route.query;return{recomUserId:query.recomUserId,// 分享人编号
- 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,// 课时数
- 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||[];}},created:function created(){if(browser().isApp){if(state.platformType==='STUDENT'){// 自动跳转到学生端视频课详情购买页
- if(browser().ios){window.location.replace("".concat(location.origin,"/student/#/liveDetail??").concat(qs.stringify(this.$route.query)));}else{postMessage({api:'openWebView',content:{url:"".concat(location.origin,"/student/#/liveDetail??").concat(qs.stringify(this.$route.query)),orientation:1,isHideTitle:false}});postMessage({api:'back'});}}else if(state.platformType==='TEACHER'){Dialog.alert({title:'提示',message:'请使用酷乐秀学生端扫码打开',confirmButtonColor:'#2dc7aa'}).then(function(){postMessage({api:'back'});});}}else{// 如果不在app里面则不需要唤起操作
- this.reCall();}},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;_context.next=3;return request.post('/api-teacher/open/liveShareProfit',{data:{bizId:_this.groupId,userId:_this.recomUserId}});case 3:res=_context.sent;_this.live=res.data.liveCourseGroup||{};_context.next=9;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);case 9:case"end":return _context.stop();}}},_callee,null,[[0,7]]);}))();},methods:{locationReplace:function locationReplace(url){if(history.replaceState){history.replaceState(null,document.title,url);window.location.reload();}else{location.replace(url);}},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(){if(browser().weixin){this.wxStatus=true;return;}this.reCall();setTimeout(function(){window.location.href=location.origin+'/student/#/download';},3000);}},render:function render(){var _this2=this;return createVNode("div",{"class":[styles['live-detail'],'mb12']},[createVNode(UserDetail,{"userInfo":this.userInfo,"showBuy":false},null),createVNode(SectionDetail,{"border":true},{default:function _default(){return[createVNode("p",{"class":styles.introduction},[_this2.userInfo.lessonDesc])];}}),createVNode(SectionDetail,{"title":"课程列表","icon":"courseList","border":true},{default:function _default(){return[createVNode(CoursePlanStep,{"courseInfo":_this2.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":_this2.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(){_this2.wxStatus=false;}},[createVNode("img",{"src":getAssetsHomeFile('wx_bg.png'),"alt":""},null)])]);}}));}};});})();
|