(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/ns-goods-recommend/ns-goods-recommend"],{"08c1":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},n=[]},2194:function(t,e,o){},"3ff8":function(t,e,o){"use strict";o.r(e);var i=o("6fde"),n=o.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(s);e["default"]=n.a},"6fde":function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"ns-goods-recommend",components:{nsLoading:function(){o.e("components/ns-loading/ns-loading").then(function(){return resolve(o("8594"))}.bind(null,o)).catch(o.oe)},nsGoodsSkuIndex:function(){o.e("components/ns-goods-sku/ns-goods-sku-index").then(function(){return resolve(o("91d0"))}.bind(null,o)).catch(o.oe)}},data:function(){return{list:[],config:{title:"猜你喜欢",sources:"sort",supportPage:[],goodsIds:[],fontWeight:!1,padding:0,cartEvent:"detail",text:"购买",textColor:"#FFFFFF",theme:"default",aroundRadius:25,control:!0,bgColor:"#FF6A00",style:"button",iconDiy:{iconType:"icon",icon:"",style:{fontSize:"60",iconBgColor:[],iconBgColorDeg:0,iconBgImg:"",bgRadius:0,iconColor:["#000000"],iconColorDeg:0}}},page:1,isAll:!0,isClick:!0,showLoading:!1}},props:{isLike:{type:Boolean,default:!0},size:{type:[Number,String],default:10},auto:{type:Boolean,default:!0},load:{type:Boolean,default:!0},route:{type:String,default:""}},mounted:function(){this.auto&&this.getLikeList()},methods:{init:function(){this.list=[],this.page=1},toDetail:function(t){var e={goods_id:t.goods_id};this.$util.redirectTo("/pages/goods/detail",e)},getLikeList:function(t){var e=this,o=this;if(this.isClick&&this.isAll)return this.isClick=!1,this.page>1&&(this.showLoading=!0),new Promise((function(i,n){o.$api.sendRequest({url:"/api/goodssku/recommend",data:{page:e.page,page_size:e.auto?e.size:t,route:e.route},success:function(t){e.showLoading=!1,e.isClick=!0,0==t.code&&(1==e.page&&(e.list=[]),e.config=t.data.config,e.list=e.list.concat(t.data.list),e.list.length==t.data.count&&(e.isAll=!1),e.page+=1,i(t.data.list))}})}))},goodsImg:function(t){var e=t.split(",");return e[0]?this.$util.img(e[0],{size:"mid"}):this.$util.getDefaultImage().goods},imgError:function(t){this.list[t].goods_image=this.$util.getDefaultImage().goods},showPrice:function(t){var e=t.discount_price;return t.member_price&&parseFloat(t.member_price)<parseFloat(e)&&(e=t.member_price),e},showMarketPrice:function(t){if(t.market_price_show){var e=this.showPrice(t);if(t.market_price>0)return t.market_price;if(parseFloat(t.price)>parseFloat(e))return t.price}return""},goodsTag:function(t){return t.label_name||""},cartListChange:function(t){"cart"==this.route&&this.storeToken&&this.$root.getCartData()},addCart:function(t){}}};e.default=i},b580:function(t,e,o){"use strict";o.r(e);var i=o("08c1"),n=o("3ff8");for(var s in n)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(s);o("f3c9");var r=o("828b"),a=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=a.exports},f3c9:function(t,e,o){"use strict";var i=o("2194"),n=o.n(i);n.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/ns-goods-recommend/ns-goods-recommend-create-component',
    {
        'components/ns-goods-recommend/ns-goods-recommend-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("b580"))
        })
    },
    [['components/ns-goods-recommend/ns-goods-recommend-create-component']]
]);
