index-legacy.aaf0107b.js 9.4 KB

12345678
  1. ;(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="._liveClass_1u6h7_1 .el-tabs__item{font-size:18px;font-weight:600;color:#999;height:56px;line-height:56px;padding-right:40px;padding-left:0}._liveClass_1u6h7_1 .el-tabs__item.is-active{font-size:20px;color:#000}._liveClass_1u6h7_1 .el-tabs__nav-wrap:after{height:1px;background:#eeeeee}._liveClass_1u6h7_1 .el-tabs__active-bar{height:4px}._items_1u6h7_21:first-child{display:flex;justify-content:flex-start}._items_1u6h7_21:first-child>div{margin:0}._items_1u6h7_21:nth-child(3n + 3){display:flex;justify-content:flex-end}._items_1u6h7_21:nth-child(3n + 3)>div{margin:0}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.3e06faf1.js','./index-legacy.b5758dd8.js','./index-legacy.6decf365.js','./index-legacy.a2967ca2.js','./vendor-legacy.2ed87b03.js'],function(exports){'use strict';var request,state,ColEmpty,Pagination,Item,defineComponent,createVNode,Fragment,ElSkeleton,ElSkeletonItem,ElButton,ElMessage,createTextVNode,ElTabs,ElTabPane;return{setters:[function(module){request=module.r;state=module.c;},function(module){ColEmpty=module.C;},function(module){Pagination=module.P;},function(module){Item=module.I;},function(module){defineComponent=module.d;createVNode=module.c;Fragment=module.F;ElSkeleton=module.aw;ElSkeletonItem=module.ax;ElButton=module.l;ElMessage=module.f;createTextVNode=module.a;ElTabs=module.O;ElTabPane=module.P;}],execute:function execute(){var liveClass="_liveClass_1u6h7_1";var items="_items_1u6h7_21";var styles={liveClass:liveClass,items:items};var List=defineComponent({name:'list',props:{groupStatus:{type:String,default:''}},data:function data(){return{pageInfo:{// 分页规则
  2. limit:9,// 限制显示条数
  3. page:1,// 当前页
  4. total:0,// 总条数
  5. page_size:[9,18,36,45]// 选择限制显示条数
  6. },list:[],loading:false,dataShow:false// 是否有数据
  7. };},mounted:function mounted(){this.getList();},methods:{getList:function getList(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var _state$user$data,_yield$request$post,data;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_this.loading=true;_context.prev=1;_context.next=4;return request.post('/api-website/courseGroup/queryPageCourseGroup',{data:{groupStatus:_this.groupStatus,page:_this.pageInfo.page,rows:_this.pageInfo.limit,teacherId:(_state$user$data=state.user.data)===null||_state$user$data===void 0?void 0:_state$user$data.userId}});case 4:_yield$request$post=_context.sent;data=_yield$request$post.data;_this.list=data.rows||[];_this.pageInfo.total=data.total;if(data.total<=0){_this.dataShow=true;}_context.next=13;break;case 11:_context.prev=11;_context.t0=_context["catch"](1);case 13:if(_this.dataShow){_this.loading=false;}else{setTimeout(function(){_this.loading=false;},200);}case 14:case"end":return _context.stop();}}},_callee,null,[[1,11]]);}))();}},render:function render(){var _state$user$data2,_state$user$data3,_this2=this,_state$user$data4,_state$user$data5;return createVNode(Fragment,null,[(_state$user$data2=state.user.data)!==null&&_state$user$data2!==void 0&&_state$user$data2.entryFlag&&(_state$user$data3=state.user.data)!==null&&_state$user$data3!==void 0&&_state$user$data3.liveFlag?createVNode(Fragment,null,[createVNode("div",{"class":"flex flex-wrap"},[createVNode(ElSkeleton,{"loading":this.loading,"animated":true,"class":"flex justify-between","count":3},{default:function _default(){return[_this2.list.map(function(item){return createVNode("div",{"class":['w-1/3 pt-8',styles.items]},[createVNode(Item,{"item":_objectSpread(_objectSpread({},item),{},{type:'live'})},null)]);})];},template:function template(){return createVNode("div",{"class":"w-[218px]"},[createVNode("div",{"class":"flex flex-col pt-8 w-[218px] rounded-[10px] overflow-hidden m-auto"},[createVNode(ElSkeletonItem,{"variant":"image","style":{width:'100%',height:'122px'}},null),createVNode("div",{"class":"text-base px-2.5 pt-2 text-[#666666] leading-none font-semibold whitespace-nowrap overflow-hidden text-ellipsis"},[createVNode(ElSkeletonItem,{"variant":"h3"},null)]),createVNode("div",{"class":"mx-2.5 pt-1.5 pb-2 flex items-center justify-between"},[createVNode(ElSkeletonItem,{"variant":"p","style":{width:'20%'}},null),createVNode("p",{"style":{width:'60%'}},null),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'20%'}},null)])])]);}})]),createVNode(Pagination,{"total":this.pageInfo.total,"page":this.pageInfo.page,"onUpdate:page":function onUpdatePage($event){return _this2.pageInfo.page=$event;},"limit":this.pageInfo.limit,"onUpdate:limit":function onUpdateLimit($event){return _this2.pageInfo.limit=$event;},"pageSizes":this.pageInfo.page_size,"pagination":this.getList},null),this.dataShow&&createVNode(ColEmpty,null,null)]):(_state$user$data4=state.user.data)!==null&&_state$user$data4!==void 0&&_state$user$data4.entryFlag?!((_state$user$data5=state.user.data)!==null&&_state$user$data5!==void 0&&_state$user$data5.liveFlag)&&createVNode(ColEmpty,{"type":"live","message":"您尚未开通直播服务,开通后即可创建直播课程~","buttonVisibility":true,"buttonText":"立即开通","onDetail":function onDetail(){_this2.$router.push('/userInfo/openLive');}},null):createVNode(ColEmpty,{"type":"teacherCert","message":"您还未完成达人认证,认证后才可创建直播课哦~","buttonVisibility":true,"buttonText":"去认证","onDetail":function onDetail(){_this2.$router.push('/teacherAuth');}},null)]);}});var index=exports('default',defineComponent({name:'live-class',data:function data(){return{activeName:'ING'};},render:function render(){var _this3=this;return createVNode("div",{"class":[styles.liveClass,'relative px-[25px]']},[createVNode(ElButton,{"round":true,"type":"primary","class":"absolute right-11 top-3 z-10","onClick":function onClick(){var _state$user$data6,_state$user$data7;// 直播课需要达人认证和开通直播
  8. if((_state$user$data6=state.user.data)!==null&&_state$user$data6!==void 0&&_state$user$data6.entryFlag&&(_state$user$data7=state.user.data)!==null&&_state$user$data7!==void 0&&_state$user$data7.liveFlag){_this3.$router.push({path:'/userInfo/liveOperation',query:{type:'create'}});}else{var _state$user$data8,_state$user$data9;if(!((_state$user$data8=state.user.data)!==null&&_state$user$data8!==void 0&&_state$user$data8.entryFlag)){ElMessage.error('您还未完成达人认证,认证后才可创建直播课');return;}if(!((_state$user$data9=state.user.data)!==null&&_state$user$data9!==void 0&&_state$user$data9.liveFlag)){ElMessage.error('您尚未开通直播服务,开通后即可创建直播课程');return;}}}},{default:function _default(){return[createTextVNode("\u65B0\u5EFA\u8BFE\u7A0B")];}}),createVNode(ElTabs,{"modelValue":this.activeName,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.activeName=$event;}},{default:function _default(){return[createVNode(ElTabPane,{"label":"进行中","name":"ING"},{default:function _default(){return[_this3.activeName==='ING'&&createVNode(List,{"groupStatus":"ING"},null)];}}),createVNode(ElTabPane,{"label":"未上架","name":"NOT_SALE"},{default:function _default(){return[_this3.activeName==='NOT_SALE'&&createVNode(List,{"groupStatus":"NOT_SALE"},null)];}}),createVNode(ElTabPane,{"label":"销售中","name":"APPLY"},{default:function _default(){return[_this3.activeName==='APPLY'&&createVNode(List,{"groupStatus":"APPLY"},null)];}}),createVNode(ElTabPane,{"label":"已完成","name":"COMPLETE"},{default:function _default(){return[_this3.activeName==='COMPLETE'&&createVNode(List,{"groupStatus":"COMPLETE"},null)];}}),createVNode(ElTabPane,{"label":"已取消","name":"CANCEL"},{default:function _default(){return[_this3.activeName==='CANCEL'&&createVNode(List,{"groupStatus":"CANCEL"},null)];}}),createVNode(ElTabPane,{"label":"已下架","name":"OUT_SALE"},{default:function _default(){return[_this3.activeName==='OUT_SALE'&&createVNode(List,{"groupStatus":"OUT_SALE"},null)];}})];}})]);}}));}};});})();