pages-shop-index.VYBoGt3M.js 3.5 KB

1
  1. import{h as e,r as s,v as t,t as o,s as a,o as p,$ as r,c3 as l,C as c,a as i,b as n,d as m,w as d,z as _,i as u,e as h,f as y,x as g,y as v,F as x}from"./index-DpMnyBR1.js";import{a as I,b as j}from"./s-menu-tools.eIZHonhR.js";import{_ as f,a as b}from"./s-block.DLl_06P3.js";import{_ as $}from"./s-search-block.vue_vue_type_style_index_0_scoped_f692e81a_lang.DhN4GUsH.js";import"./s-layout.vue_vue_type_style_index_0_scoped_05ef8b08_lang.DSLpRo7G.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_87b92f91_lang.IQ_VvQ9T.js";import"./uni-icons.CabPTE2z.js";import"./s-search-block.CWo83Zjb.js";import"./uni-list.DYsv1Ok8.js";import"./uni-badge.57mrigFz.js";import"./su-image.B5FOta3P.js";import"./s-image-banner.LhgXD4Iw.js";import"./su-swiper.DxjKjF4p.js";import"./mp-html.vue_vue_type_style_index_0_scoped_b0aa647f_lang.JG3Tl4Q5.js";import"./s-goods-column.BbDJDD7m.js";import"./useGoods.D4OqyRNr.js";/* empty css */import"./uni-load-more.BVYhhWsF.js";/* empty css *//* empty css */import"./const.BF8O-6yZ.js";import"./mp-html.AaSYH2eg.js";import"./pages-public-richtext.Chn5KPBk.js";import"./s-layout.DHVePZJM.js";import"./phone-international-input.DWK6Kh5X.js";/* empty css */const U={__name:"index",setup(U){e();const k=s({});s("");const N=t({shopName:"",merchantId:0,shopId:0}),C=s({theme:"red",style:{bgType:"color",bgColor:"#ffffff",color:"#3c3c3c",activeColor:"#1fa380"},items:[{text:o("common.shop_index"),url:"/pages/shop/index",iconUrl:a.$url.static("/static/shopIndex/shopIndex.svg"),activeIconUrl:a.$url.static("/static/shopIndex/shopIndex-active.svg")},{text:o("common.shop_category"),url:"/pages/shop/category",iconUrl:a.$url.static("/static/shopIndex/category.svg"),activeIconUrl:a.$url.static("/static/shopIndex/category-active.svg")},{text:o("common.all_product"),url:"/pages/shop/allproduct",iconUrl:a.$url.static("/static/shopIndex/allProduct.svg"),activeIconUrl:a.$url.static("/static/shopIndex/allProduct-active.svg")}]});return p((async e=>{e.templateId&&a.$store("app").init(e.templateId),e.spm&&r.decryptSpm(e.spm),e.page&&a.$router.go(decodeURIComponent(e.page)),N.merchantId=e.merchantId,N.shopId=e.shopId,N.shopName=e.shopName,C.value.items=C.value.items.map((e=>(e.url=`${e.url}?shopId=${N.shopId}&shopName=${encodeURIComponent(N.shopName)}&merchantId=${N.merchantId}`,e))),console.log(e);const{code:s,data:t}=await l.getPage({shopId:e.shopId,merchantId:e.merchantId});console.log(t),k.value=t.property})),c((()=>{})),(e,s)=>{const t=i(n("su-navbar"),I),o=i(n("s-block-item"),f),a=i(n("s-block"),b),p=i(n("s-tabbar"),$),r=i(n("s-menu-tools"),j),l=u;return k.value?(h(),m(l,{key:0},{default:d((()=>[y(t,{title:N.shopName,statusBar:"",color:e.color,tools:e.tools,opacityBgUi:e.opacityBgUi,onSearch:s[0]||(s[0]=s=>e.emits("search",s)),defaultSearch:e.defaultSearch},null,8,["title","color","tools","opacityBgUi","defaultSearch"]),(h(!0),g(x,null,v(k.value.components,((e,s)=>(h(),m(a,{key:s,styles:e.property.style},{default:d((()=>[y(o,{type:e.id,data:e.property,styles:e.property.style},null,8,["type","data","styles"])])),_:2},1032,["styles"])))),128)),y(p,{path:"/pages/shop/index",tabbar:C.value},null,8,["tabbar"]),y(r)])),_:1})):_("",!0)}}};export{U as default};