(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/diy-components/diy-fenxiao-goods-list"],{"0ecc":function(t,o,e){"use strict";e.r(o);var i=e("6e20"),n=e.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){e.d(o,t,(function(){return i[t]}))}(r);o["default"]=n.a},"1dea":function(t,o,e){},"6a64":function(t,o,e){"use strict";e.r(o);var i=e("8807"),n=e("0ecc");for(var r in n)["default"].indexOf(r)<0&&function(t){e.d(o,t,(function(){return n[t]}))}(r);e("f050");var s=e("828b"),a=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);o["default"]=a.exports},"6e20":function(t,o,e){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var e={name:"diy-fenxiao-goods-list",props:{value:{type:Object}},data:function(){return{list:[],currentRoute:""}},created:function(){var t=getCurrentPages()[getCurrentPages().length-1];this.currentRoute="/"+t.route,this.storeToken||this.$util.redirectTo("/pages_tool/login/login",{back:this.currentRoute},"redirectTo"),this.getData()},watch:{componentRefresh:function(t){this.getData()}},computed:{goodsListWarpCss: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 t="";return 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),t}},methods:{toDetail:function(t){this.$util.redirectTo("/pages/goods/detail",{goods_id:t.goods_id})},followGoods:function(t,o){var e=this,i=t.goods_id,n=t.sku_id;this.$api.sendRequest({url:"/fenxiao/api/goodscollect/add",data:{goods_id:i,sku_id:n},success:function(t){t.code>=0&&(e.$util.showToast({title:"关注成功"}),e.list[o].is_collect=1,e.list[o].collect_id=t.data),e.$forceUpdate()}})},delFollowTip:function(o,e){var i=this;t.showModal({title:"提示",content:"确认取消关注该商品吗",success:function(t){t.confirm&&i.delFollow(o.collect_id,e)}})},delFollow:function(t,o){var e=this;this.$api.sendRequest({url:"/fenxiao/api/goodscollect/delete",data:{collect_id:t},success:function(t){var i="";i=0==t.code?"取消成功":t.message,e.$util.showToast({title:i});var n=e.list;n[o].is_collect=0,e.list=n,e.$forceUpdate()}})},toMore:function(){this.$util.redirectTo("/pages_promotion/fenxiao/goods_list")},getData:function(){var t=this,o={page:1,page_size:this.value.count};"category"==this.value.sources?(o.category_id=this.value.categoryId,o.category_level=1):"diy"==this.value.sources&&(o.page_size=0,o.goods_id_arr=this.value.goodsId.toString()),this.$api.sendRequest({url:"/fenxiao/api/goods/page",data:o,success:function(o){0==o.code&&(t.list=o.data.list)}})},imgError:function(t){this.list[t]&&(this.list[t].goods_image=this.$util.getDefaultImage().goods)}}};o.default=e}).call(this,e("df3c")["default"])},8807:function(t,o,e){"use strict";e.d(o,"b",(function(){return i})),e.d(o,"c",(function(){return n})),e.d(o,"a",(function(){}));var i=function(){var t=this,o=t.$createElement,e=(t._self._c,t.list.length),i=e?t.__map(t.list,(function(o,e){var i=t.__get_orig(o),n=t.$util.img(o.goods_image,{size:"mid"}),r=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl||t.value.priceStyle.lineControl||t.value.btnStyle.control)&&t.value.priceStyle.mainControl?o.commission_money.split("."):null,s=(t.value.goodsNameStyle.control||t.value.priceStyle.mainControl||t.value.priceStyle.lineControl||t.value.btnStyle.control)&&t.value.priceStyle.mainControl?o.commission_money.split("."):null;return{$orig:i,g1:n,g2:r,g3:s}})):null;t.$mp.data=Object.assign({},{$root:{g0:e,l0:i}})},n=[]},f050:function(t,o,e){"use strict";var i=e("1dea"),n=e.n(i);n.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/diy-components/diy-fenxiao-goods-list-create-component',
    {
        'components/diy-components/diy-fenxiao-goods-list-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("6a64"))
        })
    },
    [['components/diy-components/diy-fenxiao-goods-list-create-component']]
]);
