import{r as e,c as a,o as t,n as l,b as s,d as o,e as r,f as i,w as n,g as u,k as c,s as d}from"./index-DVkgSHpn.js";import{_ as m}from"./el-navbar.DVIyjZEN.js";import{_ as p}from"./mall-archives.Cslt4H0d.js";import{_ as f}from"./el-refresh.CkIPFmzm.js";import{a as v}from"./el-layout._U-vZTft.js";import"./el-empty.CMLN1lgh.js";import"./el-loading-icon.Bh3RKCou.js";const g={__name:"list",setup(g){const _=e(),h=e(),y=e(0),k=e({list_style:2,card_style:3,chamfer_style:0,spacing:30,margin:0,padding:20,type:1,background_color:"#f8f8f8",list:[],group:{id:0,name:"",limit:20,link:{}},layout_radius:0,title:"标题",title_color:"#333",ctitle:"更多 >",ctitle_link:{id:0,name:"",link:{}},ctitle_color:"#999",is_title:1}),j=a((()=>{const{windowHeight:e}=c();return e-y.value})),w=async()=>{var e;d({title:"搜索结果"}),k.value.list=[],null==(e=h.value)||e.resetPage()};t((async e=>{_.value=e.keyword||"",l((()=>{w()}))}));const b=()=>{w()},P=e=>{h.value.isMore()&&(h.value.loadingPage(),setTimeout((()=>{uni.$http.get("search/lists",{page:e.page,keyword:_.value}).then((e=>{1==e.code?(h.value.setData(e.data.total,e.data.list.length),k.value.list=k.value.list.concat(e.data.list)):-1==e.code&&h.value.emptyPage()}))}),100))};return(e,a)=>{const t=s(o("el-navbar"),m),l=s(o("mall-archives"),p),c=s(o("el-refresh"),f),d=s(o("el-layout"),v);return r(),i(d,null,{default:n((()=>[u(t,{top:y.value,"onUpdate:top":a[0]||(a[0]=e=>y.value=e),placeholder:!0,fixed:!0,autoBack:!0,border:!0,title:"搜索结果"},null,8,["top"]),u(c,{ref_key:"refreshRef",ref:h,onRefresh:b,onScrolltolower:P,scrollHeight:j.value},{default:n((()=>[u(l,{data:k.value},null,8,["data"])])),_:1},8,["scrollHeight"])])),_:1})}}};export{g as default};
//# sourceMappingURL=pages-search-list.v26V7fff.js.map
