"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js"),a=require("../../api/product/spu.js");if(require("../../url/index.js"),require("../../store/index.js"),require("../../store/app.js"),require("../../api/promotion/diy.js"),require("../../request/index.js"),require("../../config/index.js"),require("../../platform/index.js"),require("../../platform/provider/wechat/index.js"),require("../../platform/provider/wechat/miniProgram.js"),require("../../api/member/auth.js"),require("../../api/member/social.js"),require("../../api/member/user.js"),require("../../platform/provider/apple/index.js"),require("../../platform/share.js"),require("../../router/index.js"),require("../../hooks/useModal.js"),require("../../helper/index.js"),require("../../helper/test.js"),require("../../helper/digit.js"),require("../../api/member/signin.js"),require("../../helper/throttle.js"),require("../../platform/pay.js"),require("../../api/pay/order.js"),require("../../store/user.js"),require("../../store/cart.js"),require("../../api/trade/cart.js"),require("../../api/pay/wallet.js"),require("../../api/trade/order.js"),require("../../api/promotion/coupon.js"),require("../../store/sys.js"),require("../../store/modal.js"),require("../../config/zIndex.js"),!Array){e.resolveComponent("s-goods-column")()}Math;const i={__name:"s-goods-shelves",props:{data:{type:Object,default(){}},styles:{type:Object,default(){}}},setup(i){const t=i,{layoutType:s,spuIds:o}=t.data;let{marginLeft:d,marginRight:u}=t.styles;const p=e.ref([]);return e.onMounted((async()=>{if(o.length>0){let{data:e}=await a.SpuApi.getSpuListByIds(o.join(","));p.value=e}})),(a,t)=>e.e({a:"twoCol"===e.unref(s)},"twoCol"===e.unref(s)?{b:e.f(p.value,((a,t,s)=>{var o;return{a:e.o((i=>e.unref(r.sheep).$router.go("/pages/goods/index",{id:a.id})),a.id),b:"32be2126-0-"+s,c:e.p({size:"xs",goodsFields:i.data.fields,tagStyle:i.data.badge,data:a,titleColor:null==(o=i.data.fields.name)?void 0:o.color,topRadius:i.data.borderRadiusTop,bottomRadius:i.data.borderRadiusBottom,titleWidth:(454-2*e.unref(u)-2*i.data.space-2*e.unref(d))/2}),d:a.id}})),c:e.s({padding:i.data.space+"rpx"}),d:e.s({margin:"-"+i.data.space+"rpx"})}:{},{e:"threeCol"===e.unref(s)},"threeCol"===e.unref(s)?{f:e.f(p.value,((a,t,s)=>{var o;return{a:e.o((i=>e.unref(r.sheep).$router.go("/pages/goods/index",{id:a.id})),a.id),b:"32be2126-1-"+s,c:e.p({size:"sm",goodsFields:i.data.fields,tagStyle:i.data.badge,data:a,titleColor:null==(o=i.data.fields.name)?void 0:o.color,topRadius:i.data.borderRadiusTop,bottomRadius:i.data.borderRadiusBottom}),d:a.id}})),g:e.s({padding:i.data.space+"rpx"}),h:e.s({margin:"-"+i.data.space+"rpx"})}:{},{i:"horizSwiper"===e.unref(s)},"horizSwiper"===e.unref(s)?{j:e.f(p.value,((a,t,s)=>{var o;return{a:e.o((i=>e.unref(r.sheep).$router.go("/pages/goods/index",{id:a.id})),a.id),b:"32be2126-2-"+s,c:e.p({size:"sm",goodsFields:i.data.fields,tagStyle:i.data.badge,data:a,titleColor:null==(o=i.data.fields.name)?void 0:o.color,titleWidth:(750-2*e.unref(u)-4*i.data.space-2*e.unref(d))/3}),d:a.id}})),k:e.s({marginRight:2*i.data.space+"rpx"})}:{})}},t=e._export_sfc(i,[["__scopeId","data-v-32be2126"]]);wx.createComponent(t);
