help-center.ef08ef72.js 2.2 KB

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