(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/diy-components/diy-groupbuy"],{3131:function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={name:"diy-groupbuy",props:{value:{type:Object}},data:function(){return{loading:!0,skeletonType:"",skeletonConfig:{},list:[],page:1}},created:function(){this.initSkeleton(),this.getData()},watch:{componentRefresh:function(e){this.getData()}},computed:{warpCss:function(){var e="";return e+="background-color:"+this.value.componentBgColor+";","round"==this.value.componentAngle&&(e+="border-top-left-radius:"+2*this.value.topAroundRadius+"rpx;",e+="border-top-right-radius:"+2*this.value.topAroundRadius+"rpx;",e+="border-bottom-left-radius:"+2*this.value.bottomAroundRadius+"rpx;",e+="border-bottom-right-radius:"+2*this.value.bottomAroundRadius+"rpx;"),e},goodsItemCss:function(){var t="";t+="background-color:"+this.value.elementBgColor+";","round"==this.value.elementAngle&&(t+="border-top-left-radius:"+2*this.value.topElementAroundRadius+"rpx;",t+="border-top-right-radius:"+2*this.value.topElementAroundRadius+"rpx;",t+="border-bottom-left-radius:"+2*this.value.bottomElementAroundRadius+"rpx;",t+="border-bottom-right-radius:"+2*this.value.bottomElementAroundRadius+"rpx;"),"shadow"==this.value.ornament.type&&(t+="box-shadow:0 0 10rpx "+this.value.ornament.color+";"),"stroke"==this.value.ornament.type&&(t+="border:2rpx solid "+this.value.ornament.color+";");var o=e.getSystemInfoSync().windowWidth;if("horizontal-slide"==this.value.template){var l="";l="scroll"==this.value.slideMode&&"diy"==this.value.goodsMarginType?this.rpxUpPx(2*this.value.goodsMarginNum):[o-2*this.rpxUpPx(20)-3*this.rpxUpPx(200)-2*this.rpxUpPx(2*this.value.margin.both)]/6,t+="margin-left:"+l+"px;",t+="margin-right:"+l+"px;"}return t},swiperHeight:function(){return"multiple"==this.value.nameLineMode?"shadow"==this.value.ornament.type?"404rpx":"392rpx":"shadow"==this.value.ornament.type?"376rpx":"368rpx"}},methods:{initSkeleton:function(){"row1-of1"==this.value.template?(this.skeletonType="list",this.skeletonConfig={textRows:2}):"horizontal-slide"==this.value.template&&(this.skeletonType="waterfall",this.skeletonConfig={gridRows:1,gridColumns:3,headHeight:"200rpx",textRows:2,textWidth:["100%","80%"]})},rpxUpPx:function(t){var o=e.getSystemInfoSync().windowWidth,l=o*parseInt(t)/750;return Math.floor(l)},getData:function(){var e=this,t={num:this.value.count};"diy"==this.value.sources&&(t.num=0,t.goods_id_arr=this.value.goodsId.toString()),this.$api.sendRequest({url:"/groupbuy/api/goods/lists",data:t,success:function(t){if(0==t.code){if(e.list=t.data,"horizontal-slide"==e.value.template&&"slide"==e.value.slideMode){var o=[];e.page=Math.ceil(e.list.length/3);for(var l=0;l=1&&"flex-between",n=e.value.saleStyle.control?e.$util.img("public/uniapp/groupbuy/bg.png"):null,r=e.__map(e.list[o],(function(t,o){var l=e.__get_orig(t),i=e.$util.img(t.goods_image,{size:"mid"}),n=(e.value.goodsNameStyle.control||e.value.priceStyle.mainControl||e.value.priceStyle.lineControl)&&e.value.priceStyle.mainControl?t.groupbuy_price.split("."):null,r=(e.value.goodsNameStyle.control||e.value.priceStyle.mainControl||e.value.priceStyle.lineControl)&&e.value.priceStyle.mainControl?t.groupbuy_price.split("."):null;return{$orig:l,g8:i,g10:n,g11:r}}));return{$orig:l,g7:i,g9:n,l2:r}})):null;e.$mp.data=Object.assign({},{$root:{l0:o,l1:l,l3:i}})},n=[]},f127:function(e,t,o){"use strict";o.r(t);var l=o("8f9f"),i=o("7015");for(var n in i)["default"].indexOf(n)<0&&function(e){o.d(t,e,(function(){return i[e]}))}(n);o("3892");var r=o("828b"),a=Object(r["a"])(i["default"],l["b"],l["c"],!1,null,null,null,!1,l["a"],void 0);t["default"]=a.exports}}]); ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'components/diy-components/diy-groupbuy-create-component', { 'components/diy-components/diy-groupbuy-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('df3c')['createComponent'](__webpack_require__("f127")) }) }, [['components/diy-components/diy-groupbuy-create-component']] ]);