Files
mp-weixin-2811-xcx.aigc-qui…/components/diy-components/diy-pinfan.js

11 lines
6.0 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/diy-components/diy-pinfan"],{"193c":function(t,e,o){"use strict";o.r(e);var i=o("f8a0"),n=o.n(i);for(var l in i)["default"].indexOf(l)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(l);e["default"]=n.a},"30fa":function(t,e,o){"use strict";var i=o("f973"),n=o.n(i);n.a},"577f":function(t,e,o){"use strict";o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return l})),o.d(e,"a",(function(){return i}));var i={xSkeleton:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/x-skeleton/components/x-skeleton/x-skeleton")]).then(o.bind(null,"1226"))}},n=function(){var t=this,e=t.$createElement,o=(t._self._c,"row1-of1"==t.value.template?t.__map(t.list,(function(e,o){var i=t.__get_orig(e),n=t.$util.img(e.goods_image,{size:"mid"}),l=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl||t.value.priceStyle.lineControl||t.value.btnStyle.control)&&t.value.priceStyle.mainControl?e.pintuan_price.split("."):null,a=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl||t.value.priceStyle.lineControl||t.value.btnStyle.control)&&t.value.priceStyle.mainControl?e.pintuan_price.split("."):null;return{$orig:i,g0:n,g1:l,g2:a}})):null),i="horizontal-slide"==t.value.template&&"scroll"==t.value.slideMode?t.__map(t.list,(function(e,o){var i=t.__get_orig(e),n=t.$util.img(e.goods_image,{size:"mid"}),l=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl)&&t.value.priceStyle.mainControl?e.pintuan_price.split("."):null,a=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl)&&t.value.priceStyle.mainControl?e.pintuan_price.split("."):null;return{$orig:i,g3:n,g4:l,g5:a}})):null,n="horizontal-slide"==t.value.template&&"slide"==t.value.slideMode?t.__map(t.page,(function(e,o){var i=t.__get_orig(e),n=t.list.length&&[t.list[o].length/3]>=1&&"flex-between",l=t.__map(t.list[o],(function(e,o){var i=t.__get_orig(e),n=t.$util.img(e.goods_image,{size:"mid"}),l=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl)&&t.value.priceStyle.mainControl?e.pintuan_price.split("."):null,a=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl)&&t.value.priceStyle.mainControl?e.pintuan_price.split("."):null;return{$orig:i,g7:n,g8:l,g9:a}}));return{$orig:i,g6:n,l2:l}})):null;t.$mp.data=Object.assign({},{$root:{l0:o,l1:i,l3:n}})},l=[]},f8a0:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={name:"diy-pinfan",props:{value:{type:Object}},data:function(){return{loading:!0,skeletonType:"",skeletonConfig:{},list:[],page:1}},created:function(){this.initSkeleton(),this.getData()},watch:{componentRefresh:function(t){this.getData()}},computed:{warpCss:function(){var t="";return t+="background-color:"+this.value.componentBgColor+";","round"==this.value.componentAngle&&(t+="border-top-left-radius:"+2*this.value.topAroundRadius+"rpx;",t+="border-top-right-radius:"+2*this.value.topAroundRadius+"rpx;",t+="border-bottom-left-radius:"+2*this.value.bottomAroundRadius+"rpx;",t+="border-bottom-right-radius:"+2*this.value.bottomAroundRadius+"rpx;"),t},goodsItemCss:function(){var e="";e+="background-color:"+this.value.elementBgColor+";","round"==this.value.elementAngle&&(e+="border-top-left-radius:"+2*this.value.topElementAroundRadius+"rpx;",e+="border-top-right-radius:"+2*this.value.topElementAroundRadius+"rpx;",e+="border-bottom-left-radius:"+2*this.value.bottomElementAroundRadius+"rpx;",e+="border-bottom-right-radius:"+2*this.value.bottomElementAroundRadius+"rpx;"),"shadow"==this.value.ornament.type&&(e+="box-shadow:0 0 10rpx "+this.value.ornament.color+";"),"stroke"==this.value.ornament.type&&(e+="border:2rpx solid "+this.value.ornament.color+";");var o=t.getSystemInfoSync().windowWidth;if("horizontal-slide"==this.value.template){var i="";i="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,e+="margin-left:"+i+"px;",e+="margin-right:"+i+"px;"}return e},swiperHeight:function(){return"multiple"==this.value.nameLineMode?"shadow"==this.value.ornament.type?"444rpx":"432rpx":"shadow"==this.value.ornament.type?"404rpx":"396rpx"}},methods:{initSkeleton:function(){"row1-of1"==this.value.template?(this.skeletonType="list",this.skeletonConfig={textRows:3}):"horizontal-slide"==this.value.template&&(this.skeletonType="waterfall",this.skeletonConfig={gridRows:1,gridColumns:3,headHeight:"200rpx",textRows:2,textWidth:["100%","80%"]})},rpxUpPx:function(e){var o=t.getSystemInfoSync().windowWidth,i=o*parseInt(e)/750;return Math.floor(i)},getData:function(){var t=this,e={num:this.value.count};"diy"==this.value.sources&&(e.num=0,e.goods_id_arr=this.value.goodsId.toString()),this.$api.sendRequest({url:"/pinfan/api/goods/lists",data:e,success:function(e){if(0==e.code&&e.data&&(t.list=e.data,"horizontal-slide"==t.value.template&&"slide"==t.value.slideMode)){var o=[];t.page=Math.ceil(t.list.length/3);for(var i=0;i<t.page;i++){o[i]=[];for(var n=3*i;n<t.list.length;n++){if(3==o[i].length)break;o[i].push(t.list[n])}}t.list=o}t.loading=!1}})},toDetail:function(t){this.$util.redirectTo("/pages_promotion/pinfan/detail",{pinfan_id:t.pintuan_id})},imageError:function(t){this.list[t].goods_image=this.$util.getDefaultImage().goods,this.$forceUpdate()}}};e.default=o}).call(this,o("df3c")["default"])},f973:function(t,e,o){},fb1c:function(t,e,o){"use strict";o.r(e);var i=o("577f"),n=o("193c");for(var l in n)["default"].indexOf(l)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(l);o("30fa");var a=o("828b"),r=Object(a["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=r.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/diy-components/diy-pinfan-create-component',
{
'components/diy-components/diy-pinfan-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("fb1c"))
})
},
[['components/diy-components/diy-pinfan-create-component']]
]);