pages-shop-index.CUFIRkNY.js 3.4 KB

1
  1. import{h as e,r as t,v as s,t as o,s as a,o as p,$ as r,bY as l,C as i,a as c,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-BCKJ-0Ge.js";import{a as I,b as j}from"./s-menu-tools.IK4uQ0vW.js";import{_ as b,a as f}from"./s-block.IhIDhKJ5.js";import{_ as $}from"./s-search-block.vue_vue_type_style_index_0_scoped_f692e81a_lang.PvnEoxKH.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.DAm7RC0r.js";import"./_plugin-vue_export-helper.BCo6x5W8.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang.gzj6S5Lq.js";import"./uni-icons.B3KpsLhk.js";import"./s-search-block.Cv0lfwt6.js";import"./uni-list.UB2n2Fwy.js";import"./uni-badge.Bl9ecsER.js";import"./su-image.DISGeEJC.js";import"./s-image-banner.KzU1RCj6.js";import"./su-swiper.ADp-lpbz.js";import"./mp-html.vue_vue_type_style_index_0_scoped_b0aa647f_lang.DJaY8k2q.js";import"./s-goods-column.BpLxNQC0.js";import"./points.DDTOnulC.js";import"./useGoods.RKHlFkKU.js";/* empty css */import"./uni-load-more.DXChArLi.js";/* empty css *//* empty css */import"./const.Cjttj2kP.js";import"./mp-html.xN4AfBrC.js";import"./pages-public-richtext.D6BubEeS.js";import"./s-layout.BlKiWP6r.js";import"./phone-international-input.DlQn1niu.js";/* empty css */const U={__name:"index",setup(U){e();const k=t({});t("");const N=s({shopName:"",merchantId:0,shopId:0}),C=t({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)));const{code:t,data:s}=await l.getPage({shopId:e.shopId,merchantId:e.merchantId});k.value=s.property})),i((()=>{})),(e,t)=>{const s=c(n("su-navbar"),I),o=c(n("s-block-item"),b),a=c(n("s-block"),f),p=c(n("s-tabbar"),$),r=c(n("s-menu-tools"),j),l=u;return k.value?(h(),m(l,{key:0},{default:d((()=>[y(s,{title:N.shopName,statusBar:"",color:e.color,tools:e.tools,opacityBgUi:e.opacityBgUi,onSearch:t[0]||(t[0]=t=>e.emits("search",t)),defaultSearch:e.defaultSearch},null,8,["title","color","tools","opacityBgUi","defaultSearch"]),(h(!0),g(x,null,v(k.value.components,((e,t)=>(h(),m(a,{key:t,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};