1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/list"],{"0ab8":function(t,e,n){"use strict";n.r(e);var o=n("4fe2"),r=n("b4e7");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("ef57");var a,s=n("f0c5"),c=Object(s["a"])(r["default"],o["b"],o["c"],!1,null,"2bd9fede",null,!1,o["a"],a);e["default"]=c.exports},2928:function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("0ab8"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"4fe2":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var r=function(){var t=this,e=t.$createElement;t._self._c},i=[]},"863e":function(t,e,n){},b4e7:function(t,e,n){"use strict";n.r(e);var o=n("f31f"),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},ef57:function(t,e,n){"use strict";var o=n("863e"),r=n.n(o);r.a},f31f:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("a34a")),r=n("2f62");function i(t){return t&&t.__esModule?t:{default:t}}function a(t){return l(t)||u(t)||c(t)||s()}function s(){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 c(t,e){if(t){if("string"===typeof t)return p(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)?p(t,e):void 0}}function u(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function l(t){if(Array.isArray(t))return p(t)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function f(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 d(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var i=t.apply(e,n);function a(t){f(i,o,r,a,s,"next",t)}function s(t){f(i,o,r,a,s,"throw",t)}a(void 0)}))}}function g(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 h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _=function(){n.e("components/page-component/app-product-list/app-product-list").then(function(){return resolve(n("ede7"))}.bind(null,n)).catch(n.oe)},b=function(){n.e("components/page-component/app-sort-rule/app-sort-rule").then(function(){return resolve(n("6ced"))}.bind(null,n)).catch(n.oe)},v=function(){n.e("components/page-component/app-no-goods/app-no-goods").then(function(){return resolve(n("5cd3"))}.bind(null,n)).catch(n.oe)},y={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,listStyle:!1,noGoods:!1,loading:!1,sign:""}},onLoad:function(t){var e=this;this.$commonLoad.onload(t),t.cat_id>0&&(this.cat_id=t.cat_id),t.coupon_id>0&&(this.coupon_id=t.coupon_id),this.sign=t.sign?t.sign:"",this.request().then((function(){e.first_req=!1,e.page<e.page_count&&(e.loading=!0)}))},computed:h(h({},(0,r.mapGetters)("mallConfig",{getVideo:"getVideo",getTheme:"getTheme"})),(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},platform:function(t){return t.gConfig.systemInfo.platform}})),onReachBottom:function(){this.page<this.page_count?(this.page++,this.noGoods=!1,this.request()):(this.loading=!1,this.noGoods=!0)},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 d(o.default.mark((function r(){var i,s;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:n.sign}});case 2:i=o.sent,0===i.code?(n.page_count=i.data.pagination.page_count,0===e?n.goods_list=i.data.list:(s=n.goods_list).push.apply(s,a(i.data.list)),1===n.page&&1===n.page_count&&(n.noGoods=!0)):t.showModal({title:"提示",content:i.msg});case 4:case"end":return o.stop()}}),r)})))()},setSort:function(t){var e=this,n=t.data,o=t.type;this.first_req=!0,this.sort=n,this.page=1,this.sort_type=o,this.goods_list=[],this.request(0).then((function(){e.first_req=!1,e.backTop(),e.page_count>1?e.loading=!0:e.loading=!1}))},backTop:function(){t.pageScrollTo({scrollTop:0,duration:300})},setStyle:function(t){this.listStyle=t},splitData:function(){var t=this;this.compList.length&&(this.goods_list.push.apply(this.goods_list,this.compList.splice(0,10)),this.compList.length&&(this.compTime=setTimeout((function(){t.splitData()}),200)))}},components:{"app-product-list":_,"app-sort-rule":b,"app-no-goods":v},onShareAppMessage:function(){return this.$shareAppMessage({path:"/pages/goods/list",params:{cat_id:this.cat_id}})}};e.default=y}).call(this,n("543d")["default"])}},[["2928","common/runtime","common/vendor"]]]);
|