(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/product/search"],{162:function(e,n,r){"use strict";(function(e){var n=r(3);r(25);n(r(24));var t=n(r(163));wx.__webpack_require_UNI_MP_PLUGIN__=r,e(t.default)}).call(this,r(1)["createPage"])},163:function(e,n,r){"use strict";r.r(n);var t=r(164),o=r(166);for(var i in o)["default"].indexOf(i)<0&&function(e){r.d(n,e,(function(){return o[e]}))}(i);r(168);var a,s=r(39),c=Object(s["default"])(o["default"],t["render"],t["staticRenderFns"],!1,null,null,null,!1,t["components"],a);c.options.__file="pages/product/search.vue",n["default"]=c.exports},164:function(e,n,r){"use strict";r.r(n);var t=r(165);r.d(n,"render",(function(){return t["render"]})),r.d(n,"staticRenderFns",(function(){return t["staticRenderFns"]})),r.d(n,"recyclableRender",(function(){return t["recyclableRender"]})),r.d(n,"components",(function(){return t["components"]}))},165:function(e,n,r){"use strict";var t;r.r(n),r.d(n,"render",(function(){return o})),r.d(n,"staticRenderFns",(function(){return a})),r.d(n,"recyclableRender",(function(){return i})),r.d(n,"components",(function(){return t}));try{t={uniLoadMore:function(){return r.e("components/uni-load-more/uni-load-more").then(r.bind(null,322))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var o=function(){var e=this,n=e.$createElement;e._self._c},i=!1,a=[];o._withStripped=!0},166:function(e,n,r){"use strict";r.r(n);var t=r(167),o=r.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){r.d(n,e,(function(){return t[e]}))}(i);n["default"]=o.a},167:function(e,n,r){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=r(52),o=function(){r.e("components/uni-load-more/uni-load-more").then(function(){return resolve(r(322))}.bind(null,r)).catch(r.oe)},i={components:{uniLoadMore:o},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:async function(n,r){var o=this;if("refresh"!==n){if("nomore"===o.loadingType)return;o.loadingType="loading"}else o.loadingType="more";var i={page:o.page,limit:o.limit,news:o.newOrder,keyword:this.keyword};1===this.searchType&&(i.salesOrder=1===o.numberOrder?"asc":"desc"),2===this.searchType&&(i.priceOrder=1===o.priceOrder?"asc":"desc"),(0,t.getProducts)(i).then((function(t){"refresh"===n&&(o.goodsList=[]),o.goodsList=o.goodsList.concat(t.data),o.limit==t.data.length?(o.page++,o.loadingType="more"):o.loadingType="nomore","refresh"===n&&(1==r?e.hideLoading():e.stopPullDownRefresh())}))},clickHotText:function(e){this.keyword=e,this.navTo()},loadData:async function(){var e=this;(0,t.searchKeyword)({}).then((function(n){e.list=n.data})).catch((function(e){console.log(e)}))},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(n){var r=n.id;e.navigateTo({url:"/pages/product/product?id="+r})}}};n.default=i}).call(this,r(1)["default"])},168:function(e,n,r){"use strict";r.r(n);var t=r(169),o=r.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){r.d(n,e,(function(){return t[e]}))}(i);n["default"]=o.a},169:function(e,n,r){}},[[162,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/product/search.js.map