import{d,ag as f,r as p,$ as u,c as a,aj as m,F as S,ai as g,ak as h,al as y,m as k,g as r}from"./index.d1dca38b.js";import{O as w}from"./index.71cfe737.js";import{O as C}from"./index.3aa1e6eb.js";import{s as i}from"./index.module.2e3d103e.js";import{L as v}from"./index.876ff047.js";import{C as O}from"./index.2f930c00.js";import"./index.a5f38096.js";import"./use-tab-status.03ea8dd0.js";function T(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!y(l)}var Y=d({name:"help-center",setup(){const l=f(),t=p({isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,status:!0,type:"HOT_CONSULTATION",page:1,rows:20}}),o=async()=>{try{if(t.isClick)return;t.isClick=!0;const s=await k.post(r.platformApi+"/sysNewsInformation/page",{data:{...t.params,catalogType:r.platformType}});t.listState.loading=!1;const e=s.data||{};if(t.list.length>0&&e.current===1)return;t.list=t.list.concat(e.rows||[]),t.listState.finished=e.current>=e.pages,t.params.page=e.current+1,t.listState.dataShow=t.list.length>0,t.isClick=!1}catch{t.listState.dataShow=!1,t.listState.finished=!0,t.isClick=!1}},n=s=>{t.params.keyword=s,t.params.page=1,t.list=[],t.listState.dataShow=!0,t.listState.loading=!1,t.listState.finished=!1,o()},c=s=>{s.linkType==="OUT"?window.location.href=s.linkUrl:l.push({path:"/information-detail",query:{id:s.id}})};return u(()=>{o()}),()=>{let s;return a("div",{class:[i.helpCenter,!t.listState.dataShow&&"emptyRootContainer"]},[a(C,{position:"top"},{default:()=>[a(m,{border:!1},null),a(w,{onSearch:n},null)]}),t.listState.dataShow?a(v,{finished:t.listState.finished,finishedText:" ",class:[i.container,i.containerInformation],onLoad:o,immediateCheck:!1},T(s=t.list.map(e=>a(O,{class:i.cell,onClick:()=>c(e),titleStyle:{display:"flex",flexDirection:"column",justifyContent:"space-between"}},{icon:()=>a("div",{class:[i.img,i.bgImg],style:e.coverImage?{backgroundImage:`url(${e.coverImage})`,backgroundSize:"cover"}:""},null),title:()=>a(S,null,[a("div",{class:[i.title,"van-ellipsis"]},[e.title]),a("div",{class:[i.content,"van-multi-ellipsis--l2"]},[e.summary]),a("div",{class:i.time},[e.createTime?g(e.createTime).format("YYYY\u5E74MM\u6708DD\u65E5"):""])])})))?s:{default:()=>[s]}):a(h,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u6570\u636E"},null)])}}});export{Y as default};
