(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/list"],{"0122":function(t,e,n){"use strict";n.r(e);var o=n("561d"),r=n("80a1");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("11d4");var a,s=n("f0c5"),c=Object(s["a"])(r["default"],o["b"],o["c"],!1,null,"40374fdc",null,!1,o["a"],a);e["default"]=c.exports},"11d4":function(t,e,n){"use strict";var o=n("cdd6"),r=n.n(o);r.a},"4e40":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("4795")),r=n("2f62");function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e,n,o,r,i,a){try{var s=t[i](a),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(o,r)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var i=t.apply(e,n);function s(t){a(i,o,r,s,c,"next",t)}function c(t){a(i,o,r,s,c,"throw",t)}s(void 0)}))}}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=function(){n.e("components/page-component/app-product-list/app-product-list").then(function(){return resolve(n("69c0"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("components/page-component/app-sort-rule/app-sort-rule").then(function(){return resolve(n("4421"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("components/page-component/app-no-goods/app-no-goods").then(function(){return resolve(n("23a6"))}.bind(null,n)).catch(n.oe)},g={name:"list",data:function(){return{goods_list:[],page_count:1,coupon_id:0,page:1,cat_id:0,sort:1,sort_type:1,first_req:!0}},onLoad:function(t){var e=this;this.cat_id=t.cat_id,t.coupon_id>0&&(this.coupon_id=t.coupon_id),this.request().then((function(){e.first_req=!1}))},computed:u({},(0,r.mapGetters)("mallConfig",{getVideo:"getVideo"}),{},(0,r.mapState)({isShowCartFly:function(t){return t.mallConfig.mall.setting.is_show_cart_fly},isShowScoreTop:function(t){return t.mallConfig.mall.setting.is_show_score_top}})),onReachBottom:function(){this.page<this.page_count?(this.page++,this.request()):t.showToast({title:"暂无更多商品",icon:"none"})},methods:{routeGo:function(e){e.video_url&&1==this.getVideo?t.navigateTo({url:"/pages/goods/video?goods_id=".concat(e.id)}):t.navigateTo({url:e.page_url})},request:function(e){var n=this;return s(o.default.mark((function r(){var i;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.$request({url:n.$api.default.goods_list,method:"get",data:{page:n.page,cat_id:n.cat_id,sort:n.sort,sort_type:n.sort_type,keyword:"",coupon_id:n.coupon_id,sign:""}});case 2:i=o.sent,0===i.code?(0===e&&(n.goods_list=[]),n.dataProcessing(i.data.list),n.page_count=i.data.pagination.page_count):t.showModal({title:"提示",content:i.msg});case 4:case"end":return o.stop()}}),r)})))()},dataProcessing:function(t){for(var e=0;e<t.length;e+=2)e+1!==t.length?this.goods_list.push([t[e],t[e+1]]):this.goods_list.push([t[e]])},setSort:function(t,e){var n=this;this.first_req=!0,this.sort=t,this.page=1,this.sort_type=e,this.goods_list=[],this.request(0).then((function(){n.first_req=!1,n.backTop()}))},backTop:function(){t.pageScrollTo({scrollTop:0,duration:300})}},components:{"app-product-list":d,"app-sort-rule":l,"app-no-goods":f},onShareAppMessage:function(){return this.$shareAppMessage({path:"/pages/goods/list",params:{cat_id:this.cat_id}})}};e.default=g}).call(this,n("543d")["default"])},"561d":function(t,e,n){"use strict";var o,r=function(){var t=this,e=t.$createElement;t._self._c},i=[];n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}))},"80a1":function(t,e,n){"use strict";n.r(e);var o=n("4e40"),r=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=r.a},aade:function(t,e,n){"use strict";(function(t){n("8748");o(n("66fd"));var e=o(n("0122"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},cdd6:function(t,e,n){}},[["aade","common/runtime","common/vendor"]]]);