1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_goods_collection/index"],{"0acd":function(t,e,o){"use strict";o.r(e);var c=o("f75d"),i=o("e4a6");for(var n in i)["default"].indexOf(n)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(n);o("fd1b");var l=o("f0c5"),a=Object(l["a"])(i["default"],c["b"],c["c"],!1,null,null,null,!1,c["a"],void 0);e["default"]=a.exports},"998e":function(t,e,o){},ce06:function(t,e,o){"use strict";(function(t,e){var c=o("4ea4");o("59a4");c(o("66fd"));var i=c(o("0acd"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("bc2e")["default"],o("543d")["createPage"])},e045:function(t,e,o){"use strict";(function(t){var c=o("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=c(o("5c3b")),n=o("865e"),l=o("f8b7"),a=o("26cb"),u=o("8e8a"),s={mixins:[i.default],computed:(0,a.mapGetters)(["isLogin"]),components:{recommend:function(){Promise.all([o.e("common/vendor"),o.e("components/recommend/index")]).then(function(){return resolve(o("b281"))}.bind(null,o)).catch(o.oe)},home:function(){Promise.all([o.e("common/vendor"),o.e("components/home/index")]).then(function(){return resolve(o("377d"))}.bind(null,o)).catch(o.oe)}},data:function(){return{navList:[{name:"商品"},{name:"视频"}],active:0,hostProduct:[],loadTitle:"加载更多",loading:!1,loadend:!1,collectProductList:[],limit:20,page:1,hotScroll:!1,hotPage:1,hotLimit:10,imgHost:n.HTTP_REQUEST_URL,administer:0,isAllSelect:!1,count:0,isShowAuth:!1}},onLoad:function(){},onShow:function(){t.removeStorageSync("form_type_cart"),this.loadend=!1,this.page=1,this.collectProductList=[],this.get_host_product(),this.isLogin?this.get_user_collect_product(this.active?"video":"product"):(0,u.toLogin)()},methods:{onLoadFun:function(){this.get_user_collect_product("product"),this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},goGoods:function(e){if(this.administer)return!1;t.navigateTo({url:"/pages/goods_details/index?id=".concat(e)})},goVideo:function(e){if(this.administer)return!1;t.navigateTo({url:"/pages/short_video/nvueSwiper/index?id="+e})},del:function(t){var e=this,o=[];if(this.collectProductList.forEach((function(t){t.checked&&o.push(t.id)})),!o.length)return this.$util.Tips({title:"请选择收藏商品或视频"});(0,l.collectDel)(o,t).then((function(o){return e.loadend=!1,e.page=1,e.$set(e,"collectProductList",[]),e.get_user_collect_product(t),e.$util.Tips({title:o.msg})})).catch((function(t){return e.$util.Tips({title:t})}))},checkboxChange:function(t){var e=t.detail.value;this.collectProductList.forEach((function(t){-1!==e.indexOf(t.id+"")?t.checked=!0:t.checked=!1})),e.length==this.collectProductList.length?this.isAllSelect=!0:this.isAllSelect=!1},forGoods:function(t){this.collectProductList.length&&this.collectProductList.forEach((function(e){e.checked=!!t}))},checkboxAllChange:function(t){var e=t.detail.value;e.length?this.forGoods(1):this.forGoods(0)},manageTap:function(){this.administer=!this.administer},navTap:function(t){this.active=t;var e="product";e=t?"video":"product",this.isAllSelect=!1,this.forGoods(0),this.loadend=!1,this.page=1,this.$set(this,"collectProductList",[]),this.get_user_collect_product(e)},get_user_collect_product:function(t){var e=this,o=this;this.loading||this.loadend||(o.loading=!0,o.loadTitle="",(0,l.getCollectUserList)({page:o.page,limit:o.limit,category:t}).then((function(t){var c=t.data.list;c.forEach((function(t){t.checked=!1})),e.count=t.data.count;var i=c.length<o.limit;o.collectProductList=o.$util.SplitArray(c,o.collectProductList),o.$set(o,"collectProductList",o.collectProductList),o.loadend=i,o.loadTitle=i?"没有更多内容啦~":"加载更多",o.page=o.page+1,o.loading=!1})).catch((function(t){o.loading=!1,o.loadTitle="加载更多"})))},get_host_product:function(){var t=this;t.hotScroll||(0,l.getProductHot)(t.hotPage,t.hotLimit).then((function(e){t.hotPage++,t.hotScroll=e.data.length<t.hotLimit,t.hostProduct=t.hostProduct.concat(e.data)}))}},onReachBottom:function(){this.collectProductList.length&&this.get_user_collect_product("product")}};e.default=s}).call(this,o("543d")["default"])},e4a6:function(t,e,o){"use strict";o.r(e);var c=o("e045"),i=o.n(c);for(var n in c)["default"].indexOf(n)<0&&function(t){o.d(e,t,(function(){return c[t]}))}(n);e["default"]=i.a},f75d:function(t,e,o){"use strict";o.d(e,"b",(function(){return c})),o.d(e,"c",(function(){return i})),o.d(e,"a",(function(){}));var c=function(){var t=this,e=t.$createElement,o=(t._self._c,t.collectProductList.length),c=t.collectProductList.length&&!t.active,i=t.collectProductList.length&&t.active,n=i?null:!t.collectProductList.length&&t.page>1;t.$mp.data=Object.assign({},{$root:{g0:o,g1:c,g2:i,g3:n}})},i=[]},fd1b:function(t,e,o){"use strict";var c=o("998e"),i=o.n(c);i.a}},[["ce06","common/runtime","common/vendor"]]]);
|