import{d as u,U as p,q as d,x as f,y as m,a as s,S,F as h,a4 as y,a0 as g,a1 as C,D as k}from"./index-74aaacd7.js";import{M as w}from"./index-4261c7fd.js";import{M as T}from"./index-d2dfee14.js";import{s as i}from"./index.module-caa3742e.js";import{L as v}from"./index-2aa7ff55.js";import{C as M}from"./index-baa1bd27.js";import"./index-5fc0aef0.js";import"./index-cc31fe60.js";import"./use-tab-status-3202cba9.js";function b(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!C(l)}const q=u({name:"help-center",setup(){const l=p(),r=d(),t=f({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 a=await k.post("/edu-app/open/helpCenterContent/page",{data:{...t.params,catalogType:"STUDENT"}});t.listState.loading=!1;const e=a.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(a){t.listState.dataShow=!1,t.listState.finished=!0,t.isClick=!1}},n=a=>{t.params.keyword=a,t.params.page=1,t.list=[],t.listState.dataShow=!0,t.listState.loading=!1,t.listState.finished=!1,o()},c=a=>{a.linkType==="OUT"?window.location.href=a.linkUrl:r.push({path:"/information-detail",query:{id:a.id}})};return m(()=>{o()}),()=>{let a;return s("div",{class:[i.helpCenter,!t.listState.dataShow&&"emptyRootContainer"]},[s(T,{position:"top"},{default:()=>[s(S,{border:!1,isBack:l.query.platformType!="ANALYSIS"},null),s(w,{onSearch:n},null)]}),t.listState.dataShow?s(v,{finished:t.listState.finished,finishedText:" ",class:[i.container,i.containerInformation],onLoad:o,immediateCheck:!1},b(a=t.list.map(e=>s(M,{class:i.cell,onClick:()=>c(e),titleStyle:{display:"flex",flexDirection:"column",justifyContent:"space-between"}},{icon:()=>s("div",{class:[i.img,i.bgImg],style:e.coverImage?{backgroundImage:`url(${e.coverImage})`,backgroundSize:"cover"}:""},null),title:()=>s(h,null,[s("div",{class:[i.title,"van-ellipsis"]},[e.title]),s("div",{class:[i.content,"van-multi-ellipsis--l2"]},[e.summary]),s("div",{class:i.time},[e.createTime?y(e.createTime).format("YYYY年MM月DD日"):""])])})))?a:{default:()=>[a]}):s(g,{description:"暂无数据"},null)])}}});export{q as default};