help-center.7005d788.js 2.1 KB

1
  1. import{d as o,g as i,w as l,j as e,C as n,Z as r}from"./index.e6d6174e.js";import{C as h}from"./index.af99cf22.js";import{L as p}from"./index.f904775d.js";import{S as d}from"./index.9093bc60.js";import{S as c}from"./index.c42f80e3.js";import{u as f}from"./hooks.00b5b341.js";import"./use-tab-status.e9ba8498.js";import"./index.17d70acf.js";import"./use-id.f239f36f.js";function m(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!r(t)}var b=o({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||i.platformType,page:1,rows:20}}},mounted(){f("\u5E2E\u52A9\u4E2D\u5FC3")},methods:{async getList(){try{if(this.dataLoading)return;this.dataLoading=!0;const t=this.params,a=await l.post("/api-cms/helpCenterContent/list",{data:{...t}});this.dataLoading=!1,this.loading=!1;const s=a.data||{};if(this.list.length>0&&s.pageNo===1)return;this.list=this.list.concat(s.rows||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.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 e("div",null,[e(d,{offsetTop:0,position:"top",class:"mb12"},{default:()=>[e(c,{type:i.projectType==="tenant"?"tenant":"person",onSearch:this.onSearch},null)]}),this.dataShow?e(p,{loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:this.getList},m(t=this.list.map(a=>e(h,{title:a.title,titleClass:"van-ellipsis",isLink:!0,onClick:()=>{this.onDetail(a)}},null)))?t:{default:()=>[t]}):e(n,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{b as default};