"use strict";const e=require("../../../common/vendor.js"),r=require("../../index.js"),t=require("../../api/promotion/seckill.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-seckill-block",props:{data:{type:Object,default(){}},styles:{type:Object,default(){}}},setup(i){const o=i;let{layoutType:s,tagStyle:d,btnBuy:u,space:l}=o.data;o.styles;const n=e.computed((()=>{let e=o.data.btnBuy;return"text"===(null==e?void 0:e.type)?{background:`linear-gradient(to right, ${e.bgBeginColor}, ${e.bgEndColor})`}:"img"===(null==e?void 0:e.type)?{width:"54rpx",height:"54rpx",background:`url(${r.sheep.$url.cdn(e.imgUrl)}) no-repeat`,backgroundSize:"100% 100%"}:void 0})),p=e.ref([]);return e.onMounted((async()=>{const{data:e}=await t.SeckillApi.getSeckillActivity(o.data.activityId),{data:r}=await a.SpuApi.getSpuDetail(e.spuId);p.value=[r]})),(t,a)=>{var c;return e.e({a:"threeCol"===e.unref(s)},"threeCol"===e.unref(s)?{b:e.f(p.value,((t,a,s)=>{var u;return{a:e.o((t=>e.unref(r.sheep).$router.go("/pages/goods/seckill",{id:o.data.activityId})),t.id),b:"7bcaca5a-0-"+s,c:e.p({size:"sm",goodsFields:i.data.fields,tagStyle:e.unref(d),data:t,titleColor:null==(u=i.data.fields.name)?void 0:u.color,topRadius:i.data.borderRadiusTop,bottomRadius:i.data.borderRadiusBottom}),d:t.id}})),c:e.s({padding:i.data.space+"rpx"}),d:e.s({margin:"-"+i.data.space+"rpx"})}:{},{e:"oneCol"===e.unref(s)},"oneCol"===e.unref(s)?{f:e.f(p.value,((t,a,s)=>{var u,l;return{a:e.o((t=>e.unref(r.sheep).$router.go("/pages/goods/seckill",{id:o.data.activityId})),a),b:"7bcaca5a-1-"+s,c:e.p({size:"lg",goodsFields:i.data.fields,tagStyle:e.unref(d),data:t,titleColor:null==(u=i.data.fields.name)?void 0:u.color,subTitleColor:null==(l=i.data.fields.introduction)?void 0:l.color,topRadius:i.data.borderRadiusTop,bottomRadius:i.data.borderRadiusBottom}),d:a}})),g:e.t("text"===(null==(c=e.unref(u))?void 0:c.type)?e.unref(u).text:""),h:e.s(n.value),i:e.s({marginBottom:e.unref(l)+"px"})}:{})}}},o=e._export_sfc(i,[["__scopeId","data-v-7bcaca5a"]]);wx.createComponent(o);
