import{u as a,r as e,a as l,c as t,o as s,n as o,b as u,d,e as n,f as r,w as i,g as v,h as p,i as m,F as c,j as y,s as f,k as g,l as k,m as h,p as b}from"./index-DVkgSHpn.js";import{_}from"./el-navbar.DVIyjZEN.js";import{_ as j,a as w,b as x,c as V,d as P,e as U,f as H,g as R,h as I,i as S,j as T,k as $}from"./mall-goods.Db-WJ5hg.js";import{_ as z}from"./mall-archives.Cslt4H0d.js";import{_ as A}from"./el-refresh.CkIPFmzm.js";import{_ as B}from"./el-loading.BSG4bmSC.js";import{_ as D}from"./tabbar.CESuM5GW.js";import{_ as F,a as L}from"./el-layout._U-vZTft.js";import"./el-empty.CMLN1lgh.js";import"./el-loading-icon.Bh3RKCou.js";const M=F({__name:"index",setup(F){a((a=>({"70dff3df":C.value.page_background_color})));const M=e(!0),Q=e(),W=e(0);l().getApp();const X=e([]),q=e(""),C=e({page_background_color:"#f8f8f8",status:0});let E=e(0),G=e(0);const J=async()=>{var a;const{code:e,data:l}=await uni.$http.get("index/index");e&&(q.value=l.name,X.value=l.list,C.value=l.setting,f({title:q.value})),M.value=!1,C.value.status&&(C.value.list=[],null==(a=Q.value)||a.resetPage())},K=t((()=>{const{windowHeight:a}=g();return a-W.value-50}));s((async()=>{o((()=>{J()}))}));const N=()=>{J()},O=a=>{Q.value.isMore()&&(Q.value.loadingPage(),setTimeout((()=>{uni.$http.get("index/lists",{type:"home",page:a.page}).then((a=>{1==a.code?(Q.value.setData(a.data.total,a.data.list.length),C.value.list=C.value.list.concat(a.data.list)):-1==a.code&&Q.value.endLockPage()}))}),100))};return(a,e)=>{const l=u(d("el-navbar"),_),t=u(d("mall-search"),j),s=u(d("mall-title"),w),o=u(d("mall-banner"),x),f=u(d("mall-navigation"),V),g=u(d("mall-video"),P),F=u(d("mall-notice"),U),J=u(d("mall-line"),H),Y=u(d("mall-blank"),R),Z=u(d("mall-wechat"),I),aa=u(d("mall-rubik"),S),ea=u(d("mall-tabs"),T),la=u(d("mall-goods"),$),ta=u(d("mall-archives"),z),sa=b,oa=u(d("el-refresh"),A),ua=u(d("el-loading"),B),da=u(d("tabbar"),D),na=u(d("el-layout"),L);return n(),r(na,{class:"wrap"},{default:i((()=>[v(l,{top:W.value,"onUpdate:top":e[0]||(e[0]=a=>W.value=a),placeholder:!0,fixed:!0,autoBack:!0,border:!1,title:q.value},null,8,["top","title"]),v(oa,{ref_key:"refreshRef",ref:Q,onRefresh:N,onScrolltolower:O,scrollHeight:K.value},{default:i((()=>[(n(!0),p(c,null,m(X.value,((a,l)=>(n(),r(sa,{key:l},{default:i((()=>["search"==a.type?(n(),r(t,{key:0,top:k(E),data:a.value,modelValue:k(G),"onUpdate:modelValue":e[1]||(e[1]=a=>h(G)?G.value=a:G=a)},null,8,["top","data","modelValue"])):y("",!0),"title"==a.type?(n(),r(s,{key:1,data:a.value},null,8,["data"])):y("",!0),"banner"==a.type?(n(),r(o,{key:2,data:a.value},null,8,["data"])):y("",!0),"navigation"==a.type?(n(),r(f,{key:3,data:a.value},null,8,["data"])):y("",!0),"video"==a.type?(n(),r(g,{key:4,data:a.value},null,8,["data"])):y("",!0),"notice"==a.type?(n(),r(F,{key:5,data:a.value},null,8,["data"])):y("",!0),"line"==a.type?(n(),r(J,{key:6,data:a.value},null,8,["data"])):y("",!0),"blank"==a.type?(n(),r(Y,{key:7,data:a.value},null,8,["data"])):y("",!0),"wechat"==a.type?(n(),r(Z,{key:8,data:a.value},null,8,["data"])):y("",!0),"rubik"==a.type?(n(),r(aa,{key:9,data:a.value},null,8,["data"])):y("",!0),"tabs"==a.type?(n(),r(ea,{key:10,data:a.value},null,8,["data"])):y("",!0),"goods"==a.type?(n(),r(la,{key:11,data:a.value},null,8,["data"])):y("",!0),"archives"==a.type?(n(),r(ta,{key:12,data:a.value},null,8,["data"])):y("",!0)])),_:2},1024)))),128)),1==C.value.status?(n(),r(la,{key:0,data:C.value},null,8,["data"])):y("",!0)])),_:1},8,["scrollHeight"]),v(ua,{modelValue:M.value,"onUpdate:modelValue":e[2]||(e[2]=a=>M.value=a),zIndex:"1000"},null,8,["modelValue"]),v(da)])),_:1})}}},[["__scopeId","data-v-1bfe2155"]]);export{M as default};
//# sourceMappingURL=pages-index-index.CKvjITi-.js.map
