(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/category/category"],{"07d4":function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("12d5");n(i("66fd"));var a=n(i("614a"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(a.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},"31b4":function(t,e,i){"use strict";(function(t){var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(i("2eee")),o=n(i("c973")),c=i("5e62"),r={data:function(){return{sizeCalcState:!1,tabScrollTop:0,currentId:9,flist:[],height:"",currentIndex:0,list:[],page:1,limit:20,loadingType:"more",loaded:!1}},onLoad:function(){this.loadData()},onNavigationBarSearchInputClicked:function(e){t.navigateTo({url:"/pages/product/search"})},onReady:function(t){},methods:{leftClick:function(t){this.currentIndex=t,this.getProducts("reload")},getProducts:function(t){var e=this,i=this.flist[this.currentIndex].id;"reload"==t&&(this.list=[],this.page=1,this.loadingType="more",this.loaded=!1),"loading"!=this.loadingType&&("noMore"==this.loadingType&&(this.currentIndex<this.flist.length-1?(console.log(this.currentIndex),this.currentIndex++,this.list=[],this.page=1,this.loadingType="more",this.loaded=!1,this.getProducts()):console.log("ddd")),this.loadingType="loading",(0,c.getProducts)({cid:i}).then((function(t){e.list=e.list.concat(t.data),e.limit==t.data.length?e.loadingType="more":e.loadingType="noMore",e.loaded=!0})))},loadData:function(){var t=this;return(0,o.default)(a.default.mark((function e(){var i;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=t,(0,c.getCategoryList)({}).then((function(t){var e=t.data;i.flist=e.map((function(t){return t}))})).catch((function(t){console.log(t)}));case 2:case"end":return e.stop()}}),e)})))()},tabtap:function(t){console.log(t),this.sizeCalcState||this.calcSize(),this.currentId=t.id,console.log(t.top),this.tabScrollTop=t.top,console.log(this.tabScrollTop)},asideScroll:function(e){this.sizeCalcState||this.calcSize();var i=e.detail.scrollTop,n=0,a=t.createSelectorQuery().select(".content");a.fields({id:!0,dataset:!0,rect:!0,size:!0,scrollOffset:!0},(function(t){n=t.height})).exec();var o=this.flist.filter((function(t){return t.top-10<=i})).reverse();o.length>0&&(n+i+10>=e.detail.scrollHeight?this.currentId=this.flist[this.flist.length-1].id:this.currentId=o[0].id)},calcSize:function(){var e=0;this.flist.forEach((function(i){var n=t.createSelectorQuery().select("#main-"+i.id);n.fields({size:!0},(function(t){i.top=e,e+=t.height,i.bottom=e})).exec()})),this.sizeCalcState=!0},navToList:function(e,i){t.navigateTo({url:"/pages/product/list?fid="+this.currentId+"&sid="+e+"&tid="+i})},navto:function(e){t.navigateTo({url:e})}}};e.default=r}).call(this,i("543d")["default"])},"44f5":function(t,e,i){"use strict";i.r(e);var n=i("31b4"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"583b":function(t,e,i){"use strict";var n=i("7ca9"),a=i.n(n);a.a},"614a":function(t,e,i){"use strict";i.r(e);var n=i("c396"),a=i("44f5");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("583b");var c=i("f0c5"),r=Object(c["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=r.exports},"7ca9":function(t,e,i){},c396:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},a=[]}},[["07d4","common/runtime","common/vendor"]]]);