1 |
- import{d as c,b as t,I as d,O as h,v as I,Q as u,M as m,j as M,U as w,V as f,W as v,y as b,z as y}from"./vendor.2bcdc9cf.js";/* empty css *//* empty css *//* empty css */import{i as S,T as g}from"./icon_search.8aa425ea.js";import{r as _}from"./index.b8b9219f.js";import{c as j,g as W}from"./shop-mall.fff18e3c.js";import"./index.bf47a6bc.js";/* empty css *//* empty css *//* empty css */import"./index.903a2347.js";/* empty css */var B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAAXNSR0IArs4c6QAAAVBQTFRFAAAAAAAAAAAAAAAAAAAAAAAAMzMzKioqJCQkICAgHBwcGhoaFxcXJycnJCQkJCQkIyMjISEhHR0dJycnIiIiISEhIiIiJSUlJCQkJCQkIyMjIiIiISEhIiIiJCQkIyMjIiIiISEhIyMjIyMjAMS2ISEhJCQkIiIiJCQkIyMjJCQkIyMjIyMjIiIiJCQkIyMjIiIiJCQkIyMjIyMjIyMjIiIiIiIiJCQkIyMjJCQkJCQkIyMjIyMjIyMjJCQkIyMjIyMjIyMjIiIiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIiIiIyMjIyMjIyMjIiIiIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjAcG2IyMjIyMjIyMjIiIiIyMjIyMjIyMjIiIiIyMjIyMjIyMjIyMjIiIiIyMjIyMjIyMjIyMjIyMjIiIiIyMjIyMjAcG1IyMjhLW/uAAAAG50Uk5TAAECAwQFBQYHCAkKCw0OFRYXGhoeHyYpKissLS81OTo8PUFCSU1OWV1eZGVmaGptb3B0e3x+gIGDh4iRkpidn6Giqq+wsbS1tri8wcLExcjMzc7T1djb3eLi5OXm5+vs7u7x8vP09/j5+vv8/f6WaXTSAAABhUlEQVRIx+2WV1PCUBBGo6DYsGDDLorYe4+9F+yCBntU7Mn5/28+yQPk3kDQGR/yPe3mmzNz7+7enSiKK1d/LABeEhtDFU5hgIeRAucwbJblAbNb6OTiJU3TOsCkw8LVng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wljjAAAAAXNSR0IArs4c6QAAAWlJREFUWEftmL9Lw0AUx7+v6VIVBzuqo65KLsR01slVsjsLiiDo36AgiIOze3F10tlYklBXHW1HHUTt0vTJDXYoqSfpWY9yt4Xj5T73ee/y4xEAcl13h4iOACzIa4x3MIAWMx+naXpBQohdAOfjZRi62p4EagGYNwSoLYF6/5CmYftnCSRz2B9Jkoy1hgbXt0CDubKGVKfXGvoTQ77vV7Ms22bmGdUCefNE9O44zmWj0XjRUtSe590w83oRmO8YIrqN43hDC5AQ4hNAZRQgAJ0kSaa0ABlnyLgaGjFVP4bb55DKrjVkDakMqOYno4bc6CroMZ8BvKjacf48PZeI9tNgK9Ly6li9qz8CWCoG0496atbCZV1A8rNhbkSg12YtrGoBWonqBwBOiFEqAsUE+e93+BCEp1qA5E3WouvZbrkzXQSo3K183Aebb3mxk3HKilj5bYw1pDJlDU2EIeMaVsa19MxqeprWFv4Cg3ombpWgR0sAAAAASUVORK5CYII=";const O="_hotGoods_1xtmi_1",G="_title_1xtmi_8",J="_tips_1xtmi_20",P="_hotGoodsSection_1xtmi_36",U="_hotGoodsItem_1xtmi_42",x="_hotGoodsItemImg_1xtmi_43",K="_hotGoodsWrap_1xtmi_50",E="_hotIcon_1xtmi_53";var A={hotGoods:O,title:G,tips:J,hotGoodsSection:P,hotGoodsItem:U,hotGoodsItemImg:x,hotGoodsWrap:K,hotIcon:E},Q=c({name:"hot-goods",props:{hotProductList:{type:Array,default:[]},onOpenWebView:{type:Function,default:o=>{}}},render(){return t("div",{class:A.hotGoods},[t("div",{class:A.hotGoodsSection},[this.hotProductList.map(o=>t("div",{class:A.hotGoodsItem,onClick:()=>{this.onOpenWebView("/goodsDetail?id="+o.id)}},[t(d,{class:A.hotGoodsItemImg,src:o.pic,fit:"cover"},null)]))])])}});const R="_swipeType_se6u6_1",z="_swipeTypeShow_se6u6_17",T="_typeSection_se6u6_20",H="_typeItem_se6u6_24",N="_swipeTypeImg_se6u6_28",X="_typeName_se6u6_34";var a={swipeType:R,swipeTypeShow:z,typeSection:T,typeItem:H,swipeTypeImg:N,typeName:X};function C(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!I(o)}var Z=c({name:"menu-list",props:{productList:{type:Array,default:[]},onOpenWebView:{type:Function,default:o=>{}}},render(){let o;return t(u,{class:[a.swipeType,this.productList.length>1&&a.swipeTypeShow],"indicator-color":"var(--van-primary)",loop:!1,showIndicators:this.productList.length>1},C(o=this.productList.map(e=>{let i;return t(h,{class:a.typeSection},C(i=e.map(s=>t("div",{class:a.typeItem,onClick:()=>{this.onOpenWebView("/goodsList?id="+s.id+"&tag="+encodeURIComponent(s.name))}},[t(d,{class:a.swipeTypeImg,src:s.icon,fit:"cover"},null),t("p",{class:a.typeName},[s.name])])))?i:{default:()=>[i]})}))?o:{default:()=>[o]})}});const Y="_shopMall_o1mpk_1",F="_hotContent_o1mpk_5",D="_dot_o1mpk_15",q="_iconBadge_o1mpk_24",$="_searchBox_o1mpk_27",tt="_swipe_o1mpk_33",et="_swipeItemImg_o1mpk_38",ot="_tabs_o1mpk_53";var r={shopMall:Y,hotContent:F,"icon-shop-cart":"_icon-shop-cart_o1mpk_10",dot:D,iconBadge:q,searchBox:$,swipe:tt,swipeItemImg:et,tabs:ot};const st="_theHomeHeader_u1nyo_1",it="_content_u1nyo_8",nt="_mall_u1nyo_12",at="_cart_u1nyo_17",rt="_more_u1nyo_22",ct="_searchBox_u1nyo_29",At="_iconSearch_u1nyo_41",pt="_popover_u1nyo_46";var n={theHomeHeader:st,content:it,mall:nt,cart:at,more:rt,searchBox:ct,iconSearch:At,popover:pt};var lt=c({name:"TheHomeHeader",emits:["cart","more","search"],setup(o,{emit:e}){m(sessionStorage.getItem("navHeight"));const i={reference:()=>t("img",{class:n.more,src:V,onClick:()=>e("more")},null)},s=m(!1),p=[{text:"\u6211\u7684\u8BA2\u5355",icon:L,url:"/goodsOrder"},{text:"\u6211\u7684\u5730\u5740",icon:k,url:"/address"}];return()=>t("div",{class:n.theHomeHeader},[t("div",null,null),t("div",{class:n.content},[t("div",{class:n.searchBox,onClick:()=>e("search")},[t("img",{class:n.iconSearch,src:S},null),t("span",null,[M("\u641C\u7D22\u4F60\u559C\u6B22\u7684\u5185\u5BB9")])]),t(w,{content:j.value,showZero:!1},{default:()=>[t("img",{class:n.cart,src:B,onClick:()=>e("cart")},null)]}),t(f,{placement:"bottom-end",class:n.popover,show:s.value,"onUpdate:show":l=>s.value=l,actions:p,onSelect:l=>e("more",l)},i)])])}});function dt(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!I(o)}var St=c({name:"shop-mall",data(){return{loading:!1,height:"auto",count:0,advertiseList:[],productList:[],hotProductList:[],productCategoryList:[]}},mounted(){this.init(),document.addEventListener("visibilitychange",o=>{if(!document.hidden){W();const e=this.$refs.tabFirst;e==null||e.onSearch()}})},unmounted(){},methods:{onRefresh(){this.productCategoryList=[],this.$nextTick(()=>{this.init()});const o=this.$refs.tabFirst;o==null||o.onSearch()},async init(){try{const e=(await _.get("/api-mall-portal/home/content")).data||{};this.count=e.count,j.value=e.count,this.advertiseList=e.advertiseList;const i=e.productCategoryList||[],s=[];for(;i.length>0;){const p=i.splice(0,5);s.push(p)}this.productList=s,this.hotProductList=e.hotProductList||[],this.productCategoryList=e.productAttributeCategoryList||[]}catch{}setTimeout(()=>{this.loading=!1},500)},openWebView(o){try{this.$router.push(o)}catch{}}},render(){let o;return t("div",{class:r.shopMall},[t(lt,{onCart:()=>this.openWebView("/cart"),onSearch:()=>this.openWebView("/goodsList?input=focus"),onMore:e=>{!e||this.openWebView(e.url)}},null),t(v,{modelValue:this.loading,"onUpdate:modelValue":e=>this.loading=e,"loading-text":"\u6B63\u5728\u5237\u65B0...","success-text":"\u5237\u65B0\u5B8C\u6210",onRefresh:()=>this.onRefresh()},{default:()=>[t("div",{class:r.hotContent},[t(u,{class:r.swipe,autoplay:3e3,showIndicators:!1},dt(o=this.advertiseList.map(e=>t(h,{onClick:()=>this.openWebView(e.url)},{default:()=>[t(d,{class:r.swipeItemImg,src:e.pic,fit:"fill"},null)]})))?o:{default:()=>[o]}),t(Z,{productList:this.productList,onOpenWebView:this.openWebView},null)]),this.hotProductList.length===3&&t(Q,{hotProductList:this.hotProductList,onOpenWebView:this.openWebView},null),t(b,{shrink:!0,lineWidth:25,background:"#f6f8f9",color:"var(--van-primary)",class:r.tabs,sticky:!0,offsetTop:this.height,lazyRender:!0},{default:()=>[t(y,{title:"\u5168\u90E8",name:0},{default:()=>[t(g,{ref:"tabFirst",isTab:!0,showAdd:!1,productAttributeCategoryId:0,onOpenWebView:this.openWebView},null)]}),this.productCategoryList.map(e=>t(y,{title:e.name,name:e.id},{default:()=>[t(g,{isTab:!0,showAdd:!1,productAttributeCategoryId:e.id,onOpenWebView:this.openWebView},null)]}))]})]})])}});export{St as default};
|