(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/category/category"],{4338:function(t,e,n){"use strict";n.r(e);var i=n("dbb0"),r=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=r.a},"49bd":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement;t._self._c},a=[]},"580a":function(t,e,n){},b501:function(t,e,n){"use strict";(function(t){n("856e");i(n("66fd"));var e=i(n("bffb"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},b7b3:function(t,e,n){"use strict";var i=n("580a"),r=n.n(i);r.a},bffb:function(t,e,n){"use strict";n.r(e);var i=n("49bd"),r=n("4338");for(var a in r)"default"!==a&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("b7b3");var c,o=n("f0c5"),u=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],c);e["default"]=u.exports},dbb0:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("a34a")),r=n("64ab");function a(t){return t&&t.__esModule?t:{default:t}}function c(t,e,n,i,r,a,c){try{var o=t[a](c),u=o.value}catch(l){return void n(l)}o.done?e(u):Promise.resolve(u).then(i,r)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){c(a,i,r,o,u,"next",t)}function u(t){c(a,i,r,o,u,"throw",t)}o(void 0)}))}}var u={data:function(){return{sizeCalcState:!1,tabScrollTop:0,currentId:9,flist:[]}},onLoad:function(){this.loadData()},onNavigationBarSearchInputClicked:function(e){t.navigateTo({url:"/pages/product/search"})},methods:{loadData:function(){var t=this;return o(i.default.mark((function e(){var n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=t,(0,r.getCategoryList)({}).then((function(t){var e=t.data;n.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 n=e.detail.scrollTop,i=0,r=10,a=t.createSelectorQuery().select(".content");a.fields({id:!0,dataset:!0,rect:!0,size:!0,scrollOffset:!0},(function(t){i=t.height})).exec();var c=this.flist.filter((function(t){return t.top-10<=n})).reverse();c.length>0&&(i+n+r>=e.detail.scrollHeight?this.currentId=this.flist[this.flist.length-1].id:this.currentId=c[0].id)},calcSize:function(){var e=0;this.flist.forEach((function(n){var i=t.createSelectorQuery().select("#main-"+n.id);i.fields({size:!0},(function(t){n.top=e,e+=t.height,n.bottom=e})).exec()})),this.sizeCalcState=!0},navToList:function(e,n){t.navigateTo({url:"/pages/product/list?fid="+this.currentId+"&sid="+e+"&tid="+n})}}};e.default=u}).call(this,n("543d")["default"])}},[["b501","common/runtime","common/vendor"]]]);