text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7783c5c1"],{"06c5":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("fb6a"),n("d3b7"),n("b0c0"),n("a630"),n("3ca3");var r=n("6b75");function o(t,e){if(t){if("string"===typeof t)return Object(r["a"])(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)?Object(r["a"])(t,e):void 0}}},"1bab":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("bc3a"),o=n.n(r);function i(t){var e=o.a.create({timeout:5e3,baseURL:"http://152.136.185.210:7878/api/m5"});return e.interceptors.response.use((function(t){return t}),(function(t){console.log(t)})),e.interceptors.response.use((function(t){return t.data.data}),(function(t){console.log(t)})),e(t)}},"1c62":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"home"}},[n("navbar",{staticClass:"home-nav"},[n("div",{staticClass:"home-nav",attrs:{slot:"center"},slot:"center"},[t._v("首页-购物街")])]),n("TabControl",{directives:[{name:"show",rawName:"v-show",value:t.isTabFixed,expression:"isTabFixed"}],ref:"goodList",staticClass:"tabControl",attrs:{titles:["流行","新款","精选"]},on:{tabClick:t.tabClick}}),n("scroll",{ref:"scroll",staticClass:"content",attrs:{probeType:3,"pull-up-load":!0},on:{scroll:t.contentScroll,pullingUp:t.loadM}},[n("HomeSwiper",{attrs:{banners:t.banners},on:{swimgLoad:function(e){return t.swimgLoad()}}}),n("NFHomeReView",{attrs:{recommended:t.recommended}}),n("feture"),n("TabControl",{ref:"goodList",attrs:{titles:["流行","新款","精选"]},on:{tabClick:t.tabClick}}),n("goodList",{attrs:{goods:t.goods[t.cuType].list}})],1),n("back-top",{directives:[{name:"show",rawName:"v-show",value:t.isShowBT,expression:"isShowBT"}],nativeOn:{click:function(e){return t.backClick()}}})],1)},o=[],i=n("6b75");function a(t){if(Array.isArray(t))return Object(i["a"])(t)}n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("a630");function s(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}var c=n("06c5");function l(){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 u(t){return a(t)||s(t)||Object(c["a"])(t)||l()}var f=n("406a"),d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tab-control"},t._l(t.titles,(function(e,r){return n("div",{key:r,staticClass:"tab-control-item",class:{active:r==t.currentIndex},on:{click:function(e){return t.itemTabClick(r)}}},[n("span",[t._v(t._s(e))])])})),0)},p=[],b={name:"TabControl",props:{titles:{type:Array,default:function(){return[]}}},data:function(){return{currentIndex:0}},methods:{itemTabClick:function(t){this.currentIndex=t,this.$emit("tabClick",t)}}},m=b,h=(n("c03f"),n("2877")),v=Object(h["a"])(m,d,p,!1,null,"19472102",null),g=v.exports,y=n("91d8"),w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"rcomend"},t._l(t.recommended,(function(e,r){return n("div",{key:r,staticClass:"rcomend-item"},[n("a",{attrs:{href:"item.link"}},[n("img",{attrs:{src:e.image}}),n("div",[t._v(t._s(e.title))])])])})),0)},T=[],k={name:"NFHomeReView",props:{recommended:{type:Array,default:function(){return[]}}}},C=k,S=(n("831c"),Object(h["a"])(C,w,T,!1,null,"e2271976",null)),$=S.exports,_=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},x=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"feture"},[r("a",{attrs:{href:"#"}},[r("img",{staticClass:"feture-img",attrs:{src:n("3c93")}})])])}],A={name:"Feture"},O=A,j=(n("37e7"),Object(h["a"])(O,_,x,!1,null,"5cb5264a",null)),L=j.exports,H=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("swiper",t._l(t.banners,(function(e,r){return n("swiperitem",{key:r},[n("a",{attrs:{href:e.link}},[n("img",{attrs:{src:e.image,alt:""},on:{load:t.imageLoad}})])])})),1)},F=[],E=n("0540"),I=n("470c"),G={name:"HomeSwiper",data:function(){return{isLoad:!1}},props:{banners:{type:Array,default:function(){return[]}}},components:{swiper:E["a"],swiperitem:I["a"]},methods:{imageLoad:function(){this.isLoad||(this.$emit("swimgLoad"),this.isLoad=!0)}}},N=G,B=Object(h["a"])(N,H,F,!1,null,"39cfeb0d",null),U=B.exports,M=n("eecb"),R=n("1bab");function Y(){return Object(R["a"])({url:"/home/multidata"})}function V(t,e){return Object(R["a"])({url:"/home/data",params:{type:t,page:e}})}var D=n("5d17"),J=n("d433"),P={name:"home",data:function(){return{isTabFixed:!1,tabOffTop:0,isShowBT:!1,recommended:[],result:null,banners:[],saveY:0,goods:{pop:{page:0,list:[]},new:{page:0,list:[]},sell:{page:0,list:[]}},cuType:"pop"}},mixins:[M["a"]],components:{BackTop:J["a"],Scroll:D["a"],goodList:y["a"],TabControl:g,Feture:L,NFHomeReView:$,HomeSwiper:U,Navbar:f["a"]},created:function(){this.getHomeData(),this.getHomeGoods("pop"),this.getHomeGoods("new"),this.getHomeGoods("sell")},mounted:function(){var t=this,e=this.debounce(this.$refs.scroll.refresh,200);this.$bus.$on("itemImageLoad",(function(){t.$refs.scroll.refresh(),e()}))},computed:{showGoods:function(){return this.goods[this.cuType].list}},activated:function(){this.$refs.scroll.scrollTo(0,this.saveY,0),this.$refs.scroll.refresh()},deactivated:function(){this.saveY=this.$refs.scroll.getScrollY()},methods:{debounce:function(t,e){var n=null;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];n&&clearTimeout(n),n=setTimeout((function(){t.apply(r,i)}),e)}},swimgLoad:function(){this.tabOffTop=this.$refs.goodList.$el.offsetTop,this.$refs.scroll.finishPullUp()},tabClick:function(t){switch(t){case 0:this.cuType="pop";break;case 1:this.cuType="new";break;case 2:this.cuType="sell";break;default:console.log("???")}},backClick:function(){this.$refs.scroll.scrollTo(0,0,500)},contentScroll:function(t){this.isShowBT=-t.y>1e3,this.isTabFixed=-t.y>this.tabOffTop},loadM:function(){this.getHomeGoods(this.cuType)},getHomeData:function(){var t=this;Y().then((function(e){t.recommended=e.recommend.list,t.banners=e.banner.list})).catch((function(t){console.log(t)}))},getHomeGoods:function(t){var e=this,n=this.goods[t].page+1;V(t,n).then((function(n){var r;(r=e.goods[t].list).push.apply(r,u(n.list)),e.goods[t].page+=1,e.$refs.scroll.finishPullUp()})).catch((function(t){console.log(t)}))}}},q=P,z=(n("369c"),Object(h["a"])(q,r,o,!1,null,"290245a9",null));e["default"]=z.exports},"369c":function(t,e,n){"use strict";n("82b7")},"37e7":function(t,e,n){"use strict";n("4cf4")},"3b99":function(t,e,n){},"3c93":function(t,e,n){t.exports=n.p+"img/a.794b6628.jpg"},"4cf4":function(t,e,n){},"4df4":function(t,e,n){"use strict";var r=n("0366"),o=n("7b0b"),i=n("9bdd"),a=n("e95a"),s=n("50c4"),c=n("8418"),l=n("35a1");t.exports=function(t){var e,n,u,f,d,p,b=o(t),m="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,g=void 0!==v,y=l(b),w=0;if(g&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==y||m==Array&&a(y))for(e=s(b.length),n=new m(e);e>w;w++)p=g?v(b[w],w):b[w],c(n,w,p);else for(f=y.call(b),d=f.next,n=new m;!(u=d.call(f)).done;w++)p=g?i(f,v,[u.value,w],!0):u.value,c(n,w,p);return n.length=w,n}},"58bb":function(t,e,n){},"6b75":function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},"82b7":function(t,e,n){},"831c":function(t,e,n){"use strict";n("3b99")},"9bdd":function(t,e,n){var r=n("825a"),o=n("2a62");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(a){throw o(t),a}}},a630:function(t,e,n){var r=n("23e7"),o=n("4df4"),i=n("1c7e"),a=!i((function(t){Array.from(t)}));r({target:"Array",stat:!0,forced:a},{from:o})},b0c0:function(t,e,n){var r=n("83ab"),o=n("9bf2").f,i=Function.prototype,a=i.toString,s=/^\s*function ([^ (]*)/,c="name";r&&!(c in i)&&o(i,c,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(t){return""}}})},c03f:function(t,e,n){"use strict";n("58bb")},d28b:function(t,e,n){var r=n("746f");r("iterator")},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),a=n("5135"),s=n("861d"),c=n("9bf2").f,l=n("e893"),u=i.Symbol;if(o&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},d=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof d?new u(t):void 0===t?u():u(t);return""===t&&(f[e]=!0),e};l(d,u);var p=d.prototype=u.prototype;p.constructor=d;var b=p.toString,m="Symbol(test)"==String(u("test")),h=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=b.call(t);if(a(f,t))return"";var n=m?e.slice(7,-1):e.replace(h,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},fb6a:function(t,e,n){"use strict";var r=n("23e7"),o=n("861d"),i=n("e8b5"),a=n("23cb"),s=n("50c4"),c=n("fc6a"),l=n("8418"),u=n("b622"),f=n("1dde"),d=f("slice"),p=u("species"),b=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var n,r,u,f=c(this),d=s(f.length),h=a(t,d),v=a(void 0===e?d:e,d);if(i(f)&&(n=f.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?o(n)&&(n=n[p],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return b.call(f,h,v);for(r=new(void 0===n?Array:n)(m(v-h,0)),u=0;h<v;h++,u++)h in f&&l(r,u,f[h]);return r.length=u,r}})}}]);
  //# sourceMappingURL=chunk-7783c5c1.f6784353.js.map