;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}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="._video-detail_l0c9q_1 ._introduction_l0c9q_1{color:#7a7a7a;line-height:.61333rem;padding-bottom:.21333rem}._video-detail_l0c9q_1 .van-tabs__wrap{margin-bottom:.4rem}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.52552409.js','./index-legacy.83a2a0a6.js','./index-legacy.04f4f24d.js','./index-legacy.59c8ab8f.js','./vendor-legacy.031e1374.js','./index-legacy.f25f109a6.js','./index-legacy.f25f109a5.js','./index-legacy.637f35562.js','./index-legacy.637f35563.js','./index-legacy.1cd7b6bb.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a4.js','./bars-legacy.9085ff9b.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a10.js','./icon_teacher-legacy.42ba77b1.js','./icon_timer2-legacy.90431d1a.js','./icon_student-legacy.45be2fa9.js'],function(exports){'use strict';var CourseVideoItem,SectionDetail,UserDetail,UserList,defineComponent,createVNode,Tabs,Tab,isVNode,List,request,state,ColResult;return{setters:[function(module){CourseVideoItem=module.C;},function(module){SectionDetail=module.S;},function(module){UserDetail=module.U;},function(module){UserList=module.U;},function(module){defineComponent=module.d;createVNode=module.a;Tabs=module.G;Tab=module.H;isVNode=module.x;List=module.w;},function(){},function(){},function(){},function(){},function(module){request=module.r;state=module.s;ColResult=module.C;},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var introduction="_introduction_l0c9q_1";var styles={"video-detail":"_video-detail_l0c9q_1",introduction:introduction};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var videoDetail=exports('default',defineComponent({name:'VideoDetail',data:function data(){var query=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],// 购买学生数
dataShow:true,// 判断是否有数据
loading:false,finished:false,params:{videoLessonGroupId:query.groupId,page:1,rows:20}};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res,result,users;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.get('/api-teacher/videoLessonGroup/selectVideoLesson',{params:{groupId:_this.params.videoLessonGroupId}});case 3:res=_context.sent;result=res.data||{};users=state.user.data||{};_this.userInfo={username:users.username||"\u6E38\u5BA2".concat(users.id||''),headUrl:users.heardUrl,buyNum:result.lessonGroup.countStudent,lessonNum:result.lessonGroup.lessonCount,lessonName:result.lessonGroup.lessonName,lessonDesc:result.lessonGroup.lessonDesc,lessonPrice:result.lessonGroup.lessonPrice,lessonCoverUrl:result.lessonGroup.lessonCoverUrl};_this.detailList=result.detailList||[];_this.getList();_context.next=13;break;case 11:_context.prev=11;_context.t0=_context["catch"](0);case 13:case"end":return _context.stop();}}},_callee,null,[[0,11]]);}))();},methods:{getList:function getList(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var params,res,result;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;params=_this2.params;_context2.next=4;return request.post('/api-teacher/videoLesson/pageStudent',{data:_objectSpread({},params)});case 4:res=_context2.sent;_this2.loading=false;result=res.data||{};// 处理重复请求数据
if(!(_this2.buyUserList.length>0&&result.pageNo===1)){_context2.next=9;break;}return _context2.abrupt("return");case 9:_this2.buyUserList=_this2.buyUserList.concat(result.rows||[]);_this2.finished=result.pageNo>=result.totalPage;_this2.params.page=result.pageNo+1;_this2.dataShow=_this2.buyUserList.length>0;_context2.next=19;break;case 15:_context2.prev=15;_context2.t0=_context2["catch"](0);_this2.dataShow=false;_this2.finished=true;case 19:case"end":return _context2.stop();}}},_callee2,null,[[0,15]]);}))();},onPlay:function onPlay(detail){this.$router.push({path:'/videoClassDetail',query:{groupId:this.params.videoLessonGroupId,classId:detail.id}});}},render:function render(){var _this3=this;var _slot,_slot2;return createVNode("div",{"class":[styles['video-detail'],'mb12']},[createVNode(UserDetail,{"userInfo":this.userInfo},null),createVNode(SectionDetail,null,{default:function _default(){return[createVNode("p",{"class":styles.introduction},[_this3.userInfo.lessonDesc])];}}),createVNode(SectionDetail,{"title":"课程列表","icon":"courseList","titleShow":false,"contentStyle":{paddingTop:'0'}},{default:function _default(){return[createVNode(Tabs,{"color":"var(--van-primary)","lineWidth":20,"sticky":true},{default:function _default(){return[createVNode(Tab,{"title":"课程","titleClass":"van-hairline--bottom"},_isSlot(_slot=_this3.detailList.map(function(item){return createVNode(CourseVideoItem,{"class":'mb12',"detail":{id:item.id,title:item.videoTitle,content:item.videoContent,imgUrl:item.coverUrl},"onPlay":_this3.onPlay},null);}))?_slot:{default:function _default(){return[_slot];}}),createVNode(Tab,{"title":"学员列表","titleClass":"van-hairline--bottom"},{default:function _default(){return[_this3.dataShow?createVNode(List,{"loading":_this3.loading,"onUpdate:loading":function onUpdateLoading($event){return _this3.loading=$event;},"finished":_this3.finished,"finishedText":"没有更多了","onLoad":_this3.getList},_isSlot(_slot2=_this3.buyUserList.map(function(item){return createVNode(UserList,{"class":"mb12","users":{avatar:item.avatar,studentId:item.userId,studentName:item.username,createTime:item.createTime}},null);}))?_slot2:{default:function _default(){return[_slot2];}}):createVNode(ColResult,{"btnStatus":false,"classImgSize":"SMALL","tips":"暂无学生购买"},null)];}})];}})];}})]);}}));}};});})();
