"use strict";const e=require("../../common/vendor.js"),o=require("../../common/assets.js"),n=require("../../store/index.js"),t=require("../../utils/fun.js"),s=require("../../api/index.js"),r=require("../../hooks/useNav.js");if(!Array){(e.resolveComponent("wd-navbar")+e.resolveComponent("wd-swiper")+e.resolveComponent("wd-notice-bar")+e.resolveComponent("z-paging")+e.resolveComponent("uni-popup"))()}Math||((()=>"../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js")+(()=>"../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.js")+(()=>"../../uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js")+(()=>"../../uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const a=e.defineComponent({__name:"index",setup(a){const i=n.Store(),p=e.computed((()=>i.userInfo||{})),u=e.ref(),l=e.ref(0);e.ref(!1);const c=e.ref([]),d=e.ref({content:""});e.ref([]);const m=e.ref(null),v=e.ref([]),{navTo:g}=r.useNav(),f=(e,o)=>{s.api.goodsPage({pageNo:e,pageSize:o,recommended:1}).then((e=>{m.value.complete(e.list)})).catch((e=>{m.value.complete(!1)}))};e.onLoad((()=>{s.api.banner({imageAddress:1}).then((e=>{c.value=e.list})),s.api.noticePage({type:1}).then((e=>{0!=e.list&&(d.value=e.list[0])}))}));const _=async()=>{await i.usersGetInfo(),u.value.open()},b=()=>{e.index.navigateTo({url:"/pages/goods/prefecture"})},w=()=>{e.index.navigateTo({url:"/pages/notice/notice"})};return(n,s)=>({a:o._imports_0,b:o._imports_1,c:e.p({bordered:!1,"custom-style":"background-color: transparent !important;",safeAreaInsetTop:!0}),d:e.o((e=>l.value=e)),e:e.p({customItemClass:"bannerRadius",height:"292rpx",list:["/static/homeY.png"],autoplay:!0,current:l.value}),f:e.o(b),g:o._imports_2,h:e.o((o=>e.unref(g)("/pages/equity/equity",!0))),i:o._imports_3,j:e.o(_),k:e.o((e=>l.value=e)),l:e.p({list:c.value,"value-key":"image",autoplay:!0,current:l.value}),m:o._imports_4,n:e.t(d.value.content),o:e.p({color:"#90B77B","background-color":"#E2ECDC"}),p:e.o(w),q:e.f(v.value,((o,n,t)=>({a:o.cover,b:e.t(o.name),c:e.t(o.specs),d:e.t(o.currentPrice),e:e.o((n=>{return t=o.id,void e.index.navigateTo({url:`/pages/goods/goods?id=${t}`});var t}),n),f:n}))),r:e.sr(m,"b7f702fb-4",{k:"paging"}),s:e.o(f),t:e.o((e=>v.value=e)),v:e.p({"use-page-scroll":!0,modelValue:v.value}),w:e.o((e=>n.$refs.popup.close())),x:o._imports_9,y:p.value.inviteCodeImg,z:e.t(p.value.inviteCode),A:e.o((o=>e.unref(t.copy)(p.value.inviteCode))),B:e.sr(u,"b7f702fb-5",{k:"popup"}),C:e.p({type:"center","border-radius":"16rpx"})})}}),i=e._export_sfc(a,[["__scopeId","data-v-b7f702fb"]]);wx.createPage(i);
