(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/book/index/index"],{"1efc":function(t,n,e){"use strict";e.r(n);var o=e("8b05"),i=e("cdfe");for(var a in i)"default"!==a&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("a0fb");var r,c=e("f0c5"),u=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"07b06bcb",null,!1,o["a"],r);n["default"]=u.exports},"35a0":function(t,n,e){"use strict";(function(t){e("8748");o(e("66fd"));var n=o(e("1efc"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("543d")["createPage"])},"40ba":function(t,n,e){},"534c":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(e("4795"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,n,e,o,i,a,r){try{var c=t[a](r),u=c.value}catch(s){return void e(s)}c.done?n(u):Promise.resolve(u).then(o,i)}function r(t){return function(){var n=this,e=arguments;return new Promise((function(o,i){var r=t.apply(n,e);function c(t){a(r,o,i,c,u,"next",t)}function u(t){a(r,o,i,c,u,"throw",t)}c(void 0)}))}}function c(t){return d(t)||l(t)||s(t)||u()}function u(){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 s(t,n){if(t){if("string"===typeof t)return f(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?f(t,n):void 0}}function l(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function d(t){if(Array.isArray(t))return f(t)}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}var p=function(){e.e("plugins/book/components/app-head-nav-list").then(function(){return resolve(e("68ec"))}.bind(null,e)).catch(e.oe)},h=function(){Promise.all([e.e("common/vendor"),e.e("plugins/book/components/app-product-list")]).then(function(){return resolve(e("9875"))}.bind(null,e)).catch(e.oe)},g=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/app-quick-navigation/app-quick-navigation")]).then(function(){return resolve(e("cf64"))}.bind(null,e)).catch(e.oe)},v=function(){e.e("components/page-component/app-no-goods/app-no-goods").then(function(){return resolve(e("23a6"))}.bind(null,e)).catch(e.oe)},b={name:"index",data:function(){return{catList:[{name:"全部",id:0}],cat_id:0,page:1,goods_list:[],page_count:1}},onLoad:function(n){var e=this;t.showLoading({title:"加载中"}),n.cat_id?this.cat_id=n.cat_id:this.cat_id=this.catList[0].id,this.request(),this.$request({url:this.$api.book.cats}).then((function(n){t.hideLoading(),0===n.code&&(e.catList=[].concat(c(e.catList),c(n.data.cat)))}))},methods:{changeStatus:function(t){this.page=1,this.cat_id=t,this.goods_list=[],this.request()},request:function(){var n=this;return r(o.default.mark((function e(){var i;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.showLoading({title:"加载中"}),e.next=3,n.$request({url:n.$api.book.list,data:{page:n.page,cat_id:n.cat_id}});case 3:i=e.sent,t.hideLoading(),0===i.code&&n.dataProcessing(i.data);case 6:case"end":return e.stop()}}),e)})))()},dataProcessing:function(t){for(var n=0;n<t.list.length;n+=2)n+1!==t.list.length?this.goods_list.push([t.list[n],t.list[n+1]]):this.goods_list.push([t.list[n]]);this.page_count=t.pagination.page_count}},onReachBottom:function(){this.page<this.page_count&&(this.page++,this.request())},onShareAppMessage:function(){return this.$shareAppMessage({path:"/plugins/book/index/index",title:this.$children[0].navigationBarTitle})},components:{"app-head-nav-list":p,"app-product-list":h,"app-quick-navigation":g,"app-no-goods":v}};n.default=b}).call(this,e("543d")["default"])},"8b05":function(t,n,e){"use strict";var o,i=function(){var t=this,n=t.$createElement;t._self._c},a=[];e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}))},a0fb:function(t,n,e){"use strict";var o=e("40ba"),i=e.n(o);i.a},cdfe:function(t,n,e){"use strict";e.r(n);var o=e("534c"),i=e.n(o);for(var a in o)"default"!==a&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a}},[["35a0","common/runtime","common/vendor"]]]);