(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/mch/cat/cat"],{1155:function(t,e,n){"use strict";n.r(e);var i=n("3a15"),a=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},1952:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var a=function(){var t=this,e=t.$createElement;t._self._c},r=[]},"1b74":function(t,e,n){"use strict";(function(t){n("b8bc");i(n("66fd"));var e=i(n("a4ee"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},3472:function(t,e,n){},"3a15":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function a(t){return s(t)||c(t)||o(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function c(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function s(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=function(){n.e("components/page-component/app-category-list/app-category-list").then(function(){return resolve(n("5436"))}.bind(null,n)).catch(n.oe)},p={components:{"app-category-list":h},data:function(){return{scrollTop:0,list:[],goods:[],request:!0,page:1,classId:0,activeIndex:0,activeIndexTwo:0,height:0,over:!1,scrollHeight:0,mch_id:0,cat_style:0,cat_id:0}},computed:d(d(d(d({},(0,i.mapGetters)("mallConfig",{tabBarNavs:"getNavBar"})),(0,i.mapState)("gConfig",{windowHeight:function(t){return t.systemInfo.windowHeight},windowWidth:function(t){return t.systemInfo.windowWidth}})),(0,i.mapGetters)("iPhoneX",{botHeight:"getBotHeight"})),{},{setHeight:function(){return this.windowHeight+"px"}}),onReachBottom:function(){},onLoad:function(t){var e=this;e.mch_id=t.mch_id,e.$request({url:e.$api.mch.cat_style,data:{mch_id:e.mch_id}}).then((function(t){0===t.code&&(e.cat_style=t.data.setting.cat_style,e.loadData())}))},methods:{loadData:function(){var t=this;t.$showLoading(),t.$request({url:t.$api.mch.cats_list,data:{mch_id:t.mch_id,cat_id:t.cat_id}}).then((function(e){t.$hideLoading(),0===e.code&&(t.list=e.data.list)})).catch((function(e){t.$hideLoading()}))},active:function(e){var n=this;this.page=1,t.showLoading({text:"加载中...",mask:!0});for(var i=0;i<this.list.length;i++)this.list[i].active!==e.active&&(this.list[i].active=!1),this.list[i].id===e.id&&(this.list[i].active=!0);this.$request({url:"".concat(this.$api.default.goods_list,"&page=").concat(this.page,"&cat_id=").concat(e.id)}).then((function(i){t.hideLoading(),n.goods=i.data.list,n.page=1,n.classId=e.id,n.over=!1})),this.over=!1},req:function(){var e=this;this.$request({url:"".concat(this.$api.default.goods_list,"&page=").concat(this.page,"&cat_id=").concat(this.classId)}).then((function(n){var i;n.data.list.length>0?(i=e.goods).push.apply(i,a(n.data.list)):e.over=!0;t.hideLoading()}))},activeThree:function(t){for(var e=0;e<this.list.length;e++)this.list[e].active!==t.active&&(this.list[e].active=!1),this.list[e].id===t.id&&(this.list[e].active=!0,this.activeIndex=e)}}};e.default=p}).call(this,n("543d")["default"])},a4ee:function(t,e,n){"use strict";n.r(e);var i=n("1952"),a=n("1155");for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("aa5b");var o,c=n("f0c5"),s=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"1b89d5d3",null,!1,i["a"],o);e["default"]=s.exports},aa5b:function(t,e,n){"use strict";var i=n("3472"),a=n.n(i);a.a}},[["1b74","common/runtime","common/vendor"]]]);