;(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);});};}System.register(['./index-legacy.1cd7b6bb.js','./vendor-legacy.031e1374.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a6.js','./index-legacy.f25f109a5.js','./index-legacy.edec5e29.js','./index-legacy.f25f109a3.js'],function(exports){'use strict';var state,request,ColResult,defineComponent,createVNode,Sticky,List,Cell,isVNode,ColSearch;return{setters:[function(module){state=module.s;request=module.r;ColResult=module.C;},function(module){defineComponent=module.d;createVNode=module.a;Sticky=module.S;List=module.w;Cell=module.q;isVNode=module.x;},function(){},function(){},function(){},function(module){ColSearch=module.C;},function(){}],execute:function execute(){function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var helpCenter=exports('default',defineComponent({name:'help-center',data:function data(){var query=this.$route.query;var title=query.catalogType=='2'?'公告列表':'帮助中心';document.title=title;// 处理兼容性问题
if(query.mode==='accompany'){query.platformType='ANALYSIS';}return{list:[],dataShow:true,// 判断是否有数据
dataLoading:false,loading:false,finished:false,// 1:帮助中心，2：公告管理
params:{catalogIds:query.catalogType||1,title:'',status:1,// STUDENT:学生 TEACHER：老师 ANALYSIS:智能陪练
catalogType:query.platformType||state.platformType,page:1,rows:20}};},methods:{getList:function getList(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var params,res,result;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;if(!_this.dataLoading){_context.next=3;break;}return _context.abrupt("return");case 3:_this.dataLoading=true;params=_this.params;_context.next=7;return request.post('/api-cms/helpCenterContent/list',{data:_objectSpread({},params)});case 7:res=_context.sent;_this.dataLoading=false;_this.loading=false;result=res.data||{};// 处理重复请求数据
if(!(_this.list.length>0&&result.pageNo===1)){_context.next=13;break;}return _context.abrupt("return");case 13:_this.list=_this.list.concat(result.rows||[]);_this.finished=result.pageNo>=result.totalPage;_this.params.page=result.pageNo+1;_this.dataShow=_this.list.length>0;_context.next=23;break;case 19:_context.prev=19;_context.t0=_context["catch"](0);_this.dataShow=false;_this.finished=true;case 23:case"end":return _context.stop();}}},_callee,null,[[0,19]]);}))();},onSearch:function onSearch(val){this.params.title=val;this.params.page=1;this.list=[];this.dataShow=true;// 判断是否有数据
this.loading=false;this.finished=false;this.getList();},onDetail:function onDetail(item){this.$router.push({path:'helpCenterDetail',query:{id:item.id,catalogType:this.params.catalogType}});}},render:function render(){var _this2=this;var _slot;return createVNode("div",null,[createVNode(Sticky,{"offsetTop":0,"position":"top","class":'mb12'},{default:function _default(){return[createVNode(ColSearch,{"onSearch":_this2.onSearch},null)];}}),this.dataShow?createVNode(List,{"loading":this.loading,"onUpdate:loading":function onUpdateLoading($event){return _this2.loading=$event;},"finished":this.finished,"finishedText":"没有更多了","onLoad":this.getList},_isSlot(_slot=this.list.map(function(item){return createVNode(Cell,{"title":item.title,"titleClass":'van-ellipsis',"isLink":true,"onClick":function onClick(){_this2.onDetail(item);}},null);}))?_slot:{default:function _default(){return[_slot];}}):createVNode(ColResult,{"btnStatus":false,"classImgSize":"SMALL","tips":"暂无内容"},null)]);}}));}};});})();
