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