help-center.b77d6a74.js 2.3 KB

1
  1. import{d as o,g as i,y as l,j as e,C as n,$ as r}from"./ResizeObserver.es.f28023e0.js";import{C as p}from"./index.3b2e70c8.js";import{L as h}from"./index.79f59946.js";import{S as d}from"./index.b0753b8c.js";import{S as f}from"./index.22776016.js";import{u as c}from"./hooks.19957bf3.js";import{C as m}from"./index.bd375ca9.js";import"./use-tab-status.653933d8.js";import"./index.975e8f79.js";import"./use-id.cc14bbe9.js";function g(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!r(t)}var D=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,pageTitle:a,params:{catalogIds:t.catalogType||1,title:"",status:1,catalogType:t.platformType||i.projectType==="tenant"&&i.platformType==="STUDENT"?"TENANT_STUDENT":i.platformType,page:1,rows:20}}},mounted(){c("\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(m,{isFixed:!1,title:this.pageTitle,border:!1},null),e(f,{type:i.projectType==="tenant"?"tenant":"person",onSearch:this.onSearch},null)]}),this.dataShow?e(h,{loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,finishedText:" ",onLoad:this.getList},g(t=this.list.map(a=>e(p,{title:a.title,titleClass:"van-ellipsis",isLink:!0,onClick:()=>{this.onDetail(a)}},null)))?t:{default:()=>[t]}):e(n,{btnStatus:!1,classImgSize:"CERT",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{D as default};