require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/user_goods_collection/index"],{"0905":function(t,e,l){},"0cbb":function(t,e,l){"use strict";l.r(e);var c=l("f671"),i=l.n(c);for(var o in c)["default"].indexOf(o)<0&&function(t){l.d(e,t,(function(){return c[t]}))}(o);e["default"]=i.a},"5b1f":function(t,e,l){"use strict";l.d(e,"b",(function(){return c})),l.d(e,"c",(function(){return i})),l.d(e,"a",(function(){}));var c=function(){var t=this,e=t.$createElement,l=(t._self._c,t.collectProductList.length),c=l?t.__map(t.collectProductList,(function(e,l){var c=t.__get_orig(e),i=t.footerswitch?null:e.productId.toString();return{$orig:c,g1:i}})):null,i=l?null:!t.collectProductList.length&&t.page>1;t.$mp.data=Object.assign({},{$root:{g0:l,l0:c,g2:i}})},i=[]},"65f5":function(t,e,l){"use strict";var c=l("0905"),i=l.n(c);i.a},"6de1":function(t,e,l){"use strict";(function(t,e){var c=l("47a9");l("1d3c");c(l("3240"));var i=c(l("f12a"));t.__webpack_require_UNI_MP_PLUGIN__=l,e(i.default)}).call(this,l("3223")["default"],l("df3c")["createPage"])},f12a:function(t,e,l){"use strict";l.r(e);var c=l("5b1f"),i=l("0cbb");for(var o in i)["default"].indexOf(o)<0&&function(t){l.d(e,t,(function(){return i[t]}))}(o);l("65f5");var n=l("828b"),s=Object(n["a"])(i["default"],c["b"],c["c"],!1,null,"13e003c0",null,!1,c["a"],void 0);e["default"]=s.exports},f671:function(t,e,l){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=l("de22"),i=l("8f59"),o=l("cef1"),n=l("0466"),s=getApp(),u={components:{recommend:function(){Promise.all([l.e("common/vendor"),l.e("components/base/recommend")]).then(function(){return resolve(l("0d8d"))}.bind(null,l)).catch(l.oe)}},data:function(){return{urlDomain:this.$Cache.get("imgHost"),footerswitch:!0,hostProduct:[],loadTitle:"加载更多",loading:!1,loadend:!1,collectProductList:[],limit:20,page:1,hotScroll:!1,hotPage:1,hotLimit:10,isAllSelect:!1,selectValue:[],delBtnWidth:80,totals:0,theme:s.globalData.theme}},computed:(0,i.mapGetters)(["isLogin"]),onLoad:function(){this.isLogin?(this.loadend=!1,this.page=1,this.collectProductList=[],this.get_user_collect_product()):(0,o.toLogin)()},onShow:function(){this.loadend=!1,this.page=1,this.collectProductList=[],this.get_user_collect_product()},methods:{handleProductDetail:function(t){t.isShow&&(0,n.goProductDetail)(t.productId,0,"")},manage:function(){this.footerswitch=!this.footerswitch},checkboxChange:function(t){for(var e=this.collectProductList,l=t.detail.value,c=0,i=e.length;c<i;++c){var o=e[c];l.includes(o.productId.toString())?this.$set(o,"checked",!0):this.$set(o,"checked",!1)}this.selectValue=l.toString(),this.isAllSelect=e.length===l.length},checkboxAllChange:function(t){var e=t.detail.value;e.length>0?this.setAllSelectValue(1):this.setAllSelectValue(0)},isAllSelectChange:function(){this.isAllSelect=!this.isAllSelect,this.isAllSelect?this.setAllSelectValue(1):this.setAllSelectValue(0)},setAllSelectValue:function(t){var e=this,l=[];this.collectProductList.length>0&&(this.collectProductList.map((function(c){t?(e.$set(c,"checked",!0),l.push(c.productId),e.isAllSelect=!0):(e.$set(c,"checked",!1),e.isAllSelect=!1)})),this.selectValue=l.toString())},get_user_collect_product:function(){var t=this;this.loading||this.loadend||(t.loading=!0,t.loadTitle="",(0,c.getCollectUserList)({page:t.page,limit:t.limit}).then((function(e){e.data.list.map((function(e){t.$set(e,"right",0)})),t.totals=e.data.total;var l=e.data.list,c=l.length<t.limit;t.collectProductList=t.$util.SplitArray(l,t.collectProductList),t.$set(t,"collectProductList",t.collectProductList),t.loadend=c,t.loadTitle=c?"到底了~~":"加载更多",t.page=t.page+1,t.loading=!1})).catch((function(e){t.loading=!1,t.loadTitle="加载更多"})))},delCollection:function(t,e){this.selectValue=t,this.del({ids:this.selectValue.toString()})},delCollectionAll:function(){if(!this.selectValue||0==this.selectValue.length)return this.$util.Tips({title:"请选择商品"});this.del({ids:this.selectValue})},del:function(t){var e=this;(0,c.collectCancel)(t).then((function(t){e.$util.Tips({title:"取消收藏成功",icon:"success"}),e.selectValue=[],e.collectProductList=[],e.loadend=!1,e.page=1,e.get_user_collect_product()})).catch((function(t){return e.$util.Tips({title:t})}))}},onReachBottom:function(){this.get_user_collect_product(),!this.collectProductList.length&&this.page>1&&this.$refs.recommendIndex.get_host_product()},onPageScroll:function(e){t.$emit("scroll")}};e.default=u}).call(this,l("df3c")["default"])}},[["6de1","common/runtime","common/vendor"]]]);