var n=Object.defineProperty;var i=Object.getOwnPropertySymbols;var r=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var o=(t,a,e)=>a in t?n(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,l=(t,a)=>{for(var e in a||(a={}))r.call(a,e)&&o(t,e,a[e]);if(i)for(var e of i(a))h.call(a,e)&&o(t,e,a[e]);return t};import{s as d,r as p,C as c}from"./index.3d95a92c.js";import{d as f,a as s,S as g,w as u,q as m,x as S}from"./vendor.a0144ce9.js";/* empty css               *//* empty css               *//* empty css               */import{C as y}from"./index.ccfa57ee.js";/* empty css               */function L(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!S(t)}var v=f({name:"help-center",data(){const t=this.$route.query,a=t.catalogType=="2"?"\u516C\u544A\u5217\u8868":"\u5E2E\u52A9\u4E2D\u5FC3";return document.title=a,t.mode==="accompany"&&(t.platformType="ANALYSIS"),{list:[],dataShow:!0,dataLoading:!1,loading:!1,finished:!1,params:{catalogIds:t.catalogType||1,title:"",status:1,catalogType:t.platformType||d.platformType,page:1,rows:20}}},methods:{async getList(){try{if(this.dataLoading)return;this.dataLoading=!0;let t=this.params;const a=await p.post("/api-cms/helpCenterContent/list",{data:l({},t)});this.dataLoading=!1,this.loading=!1;const e=a.data||{};if(this.list.length>0&&e.pageNo===1)return;this.list=this.list.concat(e.rows||[]),this.finished=e.pageNo>=e.totalPage,this.params.page=e.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}},onSearch(t){this.params.title=t,this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},onDetail(t){this.$router.push({path:"helpCenterDetail",query:{id:t.id,catalogType:this.params.catalogType}})}},render(){let t;return s("div",null,[s(g,{offsetTop:0,position:"top",class:"mb12"},{default:()=>[s(y,{onSearch:this.onSearch},null)]}),this.dataShow?s(u,{loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},L(t=this.list.map(a=>s(m,{title:a.title,titleClass:"van-ellipsis",isLink:!0,onClick:()=>{this.onDetail(a)}},null)))?t:{default:()=>[t]}):s(c,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{v as default};
