require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/points_mall/integral_goods_list"],{"04f9":function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var s=function(){var t=this,e=t.$createElement,i=(t._self._c,t.$t("搜索商品名称")),s=t.$t("默认"),o=t.$t("积分"),r=t.$t("销量"),n=t.$t("积分"),c=t.$t("人兑换"),a=t.$t("兑换"),h=t.__map(t.productList,(function(e,i){var s=t.__get_orig(e),o=e.vip_price&&e.vip_price>0?t.$t("积分"):null;return{$orig:s,m5:o}})),d=t.productList.length,l=0==t.productList.length&&t.where.page>1;t.$mp.data=Object.assign({},{$root:{m0:i,m1:s,m2:o,m3:r,m4:n,m6:c,m7:a,l0:h,g0:d,g1:l}})},o=[]},"05cd":function(t,e,i){"use strict";(function(t,e){var s=i("47a9");i("2ea2");s(i("3240"));var o=s(i("501b"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},"501b":function(t,e,i){"use strict";i.r(e);var s=i("04f9"),o=i("5111");for(var r in o)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("52aa");var n=i("828b"),c=Object(n["a"])(o["default"],s["b"],s["c"],!1,null,"250f15c3",null,!1,s["a"],void 0);e["default"]=c.exports},5111:function(t,e,i){"use strict";i.r(e);var s=i("799e"),o=i.n(s);for(var r in s)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(r);e["default"]=o.a},"52aa":function(t,e,i){"use strict";var s=i("6b77"),o=i.n(s);o.a},"6b77":function(t,e,i){},"799e":function(t,e,i){"use strict";(function(t){var s=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i("c302"),r=i("d1dc"),n=i("8f59"),c=i("7cf0"),a=s(i("0cf0")),h=i("9ad6"),d={computed:(0,n.mapGetters)(["uid"]),components:{recommend:function(){Promise.all([i.e("common/vendor"),i.e("components/recommend/index")]).then(function(){return resolve(i("492d"))}.bind(null,i)).catch(i.oe)},home:function(){Promise.all([i.e("common/vendor"),i.e("components/home/index")]).then(function(){return resolve(i("05b1"))}.bind(null,i)).catch(i.oe)}},mixins:[a.default],data:function(){return{imgHost:h.HTTP_REQUEST_URL,productList:[],is_switch:!0,where:{store_name:"",priceOrder:"",salesOrder:"",page:1,limit:20},price:0,stock:0,nows:!1,loadend:!1,loading:!1,loadTitle:this.$t("加载更多"),title:"",hostProduct:[],hotPage:1,hotLimit:10,hotScroll:!1}},onPageScroll:function(e){t.$emit("scroll")},onLoad:function(t){this.where.cid=t.cid||0,this.$set(this.where,"sid",t.sid||0),this.title=t.title||"",this.$set(this.where,"store_name",t.searchValue||""),this.get_product_list(),this.get_host_product()},methods:{godDetail:function(e){(0,c.goShopDetail)(e,this.uid).then((function(i){t.navigateTo({url:"/pages/points_mall/integral_goods_details?id=".concat(e.id)})}))},Changswitch:function(){this.is_switch=!this.is_switch},searchSubmit:function(t){this.$set(this.where,"store_name",t.detail.value),this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)},get_host_product:function(){var t=this;t.hotScroll||(0,o.getProductHot)(t.hotPage,t.hotLimit).then((function(e){t.hotPage++,t.hotScroll=e.data.length<t.hotLimit,t.hostProduct=t.hostProduct.concat(e.data)}))},set_where:function(t){switch(t){case 1:this.where={store_name:"",priceOrder:"",salesOrder:"",page:1,limit:20},this.price=0,this.stock=0;break;case 2:0==this.price?this.price=1:1==this.price?this.price=2:2==this.price&&(this.price=0),this.stock=0;break;case 3:0==this.stock?this.stock=1:1==this.stock?this.stock=2:2==this.stock&&(this.stock=0),this.price=0;break;case 4:this.nows=!this.nows;break}this.loadend=!1,this.$set(this.where,"page",1),this.get_product_list(!0)},setWhere:function(){0==this.price?this.where.priceOrder="":1==this.price?this.where.priceOrder="asc":2==this.price&&(this.where.priceOrder="desc"),0==this.stock?this.where.salesOrder="":1==this.stock?this.where.salesOrder="asc":2==this.stock&&(this.where.salesOrder="desc"),this.where.news=this.nows?1:0},get_product_list:function(t){var e=this;e.setWhere(),e.loadend||e.loading||(!0===t&&e.$set(e,"productList",[]),e.loading=!0,e.loadTitle="",(0,r.getStoreIntegralList)(e.where).then((function(t){var i=t.data,s=e.$util.SplitArray(i,e.productList),o=i.length<e.where.limit;e.loadend=o,e.loading=!1,e.loadTitle=o?e.$t("我也是有底线的"):e.$t("加载更多"),e.$set(e,"productList",s),e.$set(e.where,"page",e.where.page+1)})).catch((function(t){e.loading=!1,e.loadTitle=e.$t("加载更多")})))}},onPullDownRefresh:function(){},onReachBottom:function(){this.productList.length>0?this.get_product_list():this.get_host_product()}};e.default=d}).call(this,i("df3c")["default"])}},[["05cd","common/runtime","common/vendor"]]]);
|