|
|
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||[];}},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'){// 自动跳转到学生端视频课详情购买页
|
|
|
-_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)])]);}}));}};});})();
|
|
|
+_this.reCall();}_context.next=4;return request.post('/api-teacher/open/liveShareProfit',{data:{bizId:_this.groupId,userId:_this.recomUserId}});case 4:res=_context.sent;_this.live=res.data.liveCourseGroup||{};_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(){if(browser().weixin){this.wxStatus=true;return;}this.reCall();setTimeout(function(){// this.$router.push('/download')
|
|
|
+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},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)])]);}}));}};});})();
|