(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/product/search"],{"503a":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return r}));var r={uniLoadMore:function(){return n.e("components/uni-load-more/uni-load-more").then(n.bind(null,"eaf8"))}},a=function(){var e=this.$createElement;this._self._c},o=[]},"6cd6":function(e,t,n){},"9fb7":function(e,t,n){"use strict";(function(e,t){var r=n("4ea4");n("3e39");r(n("66fd"));var a=r(n("a25c"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},a25c:function(e,t,n){"use strict";n.r(t);var r=n("503a"),a=n("c2ab");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("c76e");var i=n("f0c5"),c=Object(i["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=c.exports},c2ab:function(e,t,n){"use strict";n.r(t);var r=n("f119"),a=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);t["default"]=a.a},c76e:function(e,t,n){"use strict";var r=n("6cd6"),a=n.n(r);a.a},f119:function(e,t,n){"use strict";(function(e){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("2eee")),o=r(n("c973")),i=n("9918"),c={components:{uniLoadMore:function(){n.e("components/uni-load-more/uni-load-more").then(function(){return resolve(n("eaf8"))}.bind(null,n)).catch(n.oe)}},data:function(){return{arrlist:[],keyword:"",list:[],tabCurrentIndex:0,goodsList:[],limit:6,page:1,loadingType:"more",numberOrder:1,priceOrder:1,newOrder:0,searchType:0}},onLoad:function(){this.loadData()},onPullDownRefresh:function(){this.page=1,this.getProducts("refresh")},methods:{getProducts:function(t,n){var r=this;return(0,o.default)(a.default.mark((function o(){var c,s;return a.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(c=r,"refresh"===t){a.next=9;break}if("nomore"!==c.loadingType){a.next=6;break}return a.abrupt("return");case 6:c.loadingType="loading";case 7:a.next=10;break;case 9:c.loadingType="more";case 10:s={page:c.page,limit:c.limit,news:c.newOrder,keyword:r.keyword},1===r.searchType&&(s.salesOrder=1===c.numberOrder?"asc":"desc"),2===r.searchType&&(s.priceOrder=1===c.priceOrder?"asc":"desc"),(0,i.getProducts)(s).then((function(r){"refresh"===t&&(c.goodsList=[]),c.goodsList=c.goodsList.concat(r.data),c.limit==r.data.length?(c.page++,c.loadingType="more"):c.loadingType="nomore","refresh"===t&&(1==n?e.hideLoading():e.stopPullDownRefresh())}));case 14:case"end":return a.stop()}}),o)})))()},clickHotText:function(e){this.keyword=e,this.navTo()},loadData:function(){var e=this;return(0,o.default)(a.default.mark((function t(){return a.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:(0,i.searchKeyword)({}).then((function(t){e.list=t.data})).catch((function(e){console.log(e)}));case 1:case"end":return t.stop()}}),t)})))()},navTo:function(){this.tabCurrentIndex=1,this.infoData()},defaultSearch:function(){this.numberOrder="",this.priceOrder="",this.newOrder=0,this.searchType=0,this.infoData()},newGoodsTab:function(){this.newOrder=1===this.newOrder?0:1,this.infoData()},sortTab:function(e){this.searchType=e,1===this.searchType&&(this.numberOrder=1===this.numberOrder?2:1),2===this.searchType&&(this.priceOrder=1===this.priceOrder?2:1),this.infoData()},infoData:function(){this.page=1,e.pageScrollTo({duration:300,scrollTop:0}),this.getProducts("refresh",1),e.showLoading({title:"正在加载"})},navToDetailPage:function(t){var n=t.id;e.navigateTo({url:"/pages/product/product?id="+n})}}};t.default=c}).call(this,n("543d")["default"])}},[["9fb7","common/runtime","common/vendor"]]]);