require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_promotion/merch/merchcategory"],{"07c1":function(t,e,o){"use strict";(function(t,e){var n=o("47a9");o("1dee");n(o("3240"));var i=n(o("cbd5"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"6b41":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return r})),o.d(e,"a",(function(){return n}));var n={nsLogin:function(){return Promise.all([o.e("common/vendor"),o.e("components/ns-login/ns-login")]).then(o.bind(null,"17d0"))}},i=function(){var t=this,e=t.$createElement,o=(t._self._c,t.categoryTree?t.categoryTree.length:null),n=t.categoryTree&&o?t.__map(t.categoryTree,(function(e,o){var n=t.__get_orig(e),i=e.child_list.length,r=i>0?t.__map(e.child_list,(function(e,o){var n=t.__get_orig(e),i=t.$util.img(e.merch_image);return{$orig:n,g2:i}})):null;return{$orig:n,g1:i,l0:r}})):null;t._isMounted||(t.e0=function(e,o){var n=arguments[arguments.length-1].currentTarget.dataset,i=n.eventParams||n["event-params"];o=i.one;return t.$util.redirectTo("/pages_promotion/merch/detail",{merch_id:o.merch_id})}),t.$mp.data=Object.assign({},{$root:{g0:o,l1:n}})},r=[]},7925:function(t,e,o){"use strict";o.r(e);var n=o("a2c4"),i=o.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},a2c4:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={components:{},data:function(){return{scrollTop:0,select:0,categoryId:"category-0",scrollLock:!1,triggered:!0,heightArea:[],loadType:"",categoryTree:[],user_type:t.getStorageSync("user_type")}},onLoad:function(){t.hideTabBar(),this.getCategory()},onShow:function(){this.$refs.category&&this.$refs.category[0].pageShow()},onUnload:function(){!this.storeToken&&this.$refs.login&&this.$refs.login.cancelCompleteInfo()},methods:{switchOnetype:function(t){this.goods_type=t,this.select=-1,this.categoryId="",this.getgoodslist()},switchOneCategory:function(t){t>=this.categoryTree.length||(this.select=t,this.categoryId="category-"+t,this.scrollLock=!0,console.log(t))},touchStart:function(){this.scrollLock=!1},listenScroll:function(t){if(!this.scrollLock){var e=t.detail.scrollTop;if(this.heightArea.length){for(var o=0;o<this.heightArea.length;o++)if(e>=this.heightArea[o][0]&&e<=this.heightArea[o][1]){this.select=o;break}1!=this.value.template&&"all"==this.value.loadType&&this.heightArea[this.select][1]-e-contentWrapHeight<300&&this.$refs.categoryItem[this.select].getGoodsList()}}},sethead:function(t,e){var o=this,n=t.is_select;this.$api.sendRequest({url:"app.ajax_batchheads",data:{goods_id:t.actId,is_select:n},success:function(t){o.$util.showToast({title:t.result.message}),o.getgoodslist()},fail:function(){o.$util.showToast({title:"request:fail"})}})},getCategory:function(){var t=this;this.$api.sendRequest({url:"/merch/api/merch/getcategory",data:{is_type_show:1},success:function(e){console.log(e.data),t.categoryTree=e.data},fail:function(){t.$util.showToast({title:"request:fail"})}})},onRefresh:function(){this.triggered=!1},onRestore:function(){this.triggered="restore"},touchend:function(t){var e=t.changedTouches[0].clientY;("top"==this.scrollType||"none"==this.scrollType)&&e-this.touchstartPosition>100||("bottom"==this.scrollType||"none"==this.scrollType)&&this.touchstartPosition},getDiyInfo:function(){},toLogin:function(){this.$refs.login.open("/pages/goods/category")}}};e.default=o}).call(this,o("df3c")["default"])},b5df:function(t,e,o){},cbd5:function(t,e,o){"use strict";o.r(e);var n=o("6b41"),i=o("7925");for(var r in i)["default"].indexOf(r)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(r);o("ce6c");var s=o("828b"),c=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=c.exports},ce6c:function(t,e,o){"use strict";var n=o("b5df"),i=o.n(n);i.a}},[["07c1","common/runtime","common/vendor"]]]);