webpackJsonp([8],{"7DRl":function(t,i,e){"use strict";var s={methods:{goTop(){var t="";document.documentElement.scrollTop-=100,document.documentElement.scrollTop>0?t=setTimeout(()=>this.goTop(100),16):clearTimeout(t)}}},o={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{attrs:{id:"toolbox"}},[e("i",{staticClass:"iconfont icon-top mb-sm",on:{click:function(i){t.goTop()}}})])},staticRenderFns:[]};var a=e("D8HT")(s,o,!1,function(t){e("WRRQ")},"data-v-77eaee75",null);i.a=a.exports},"80bo":function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=e("FevL"),o=e("9XKR"),a=e("+cBM"),n=e("ERXc"),r=e("7DRl"),l=e("PXpm"),c=e("AAHV"),d=e("p52L"),m=e("gOFm");s.default.component(c.Button.name,c.Button),s.default.component(c.ButtonGroup.name,c.ButtonGroup),s.default.component(m.InfiniteScroll.name,m.InfiniteScroll);var f={data:()=>({title:"",page:1,topData:[],items:[],cid:"",key:"",filters:{titles:["栏目","区域","排序"],data:[]},filterForm:{model:"info",cid:"",order:"",area_id:"",page:1}}),created(){this.title="信息",this.getFilterData()},methods:{simpleClone(t){var i={};for(var e in t)i[e]=t[e];return i},handleTypeChange(t){if(t){var i=t.index,e=t.subId;this.filters.titles.splice(i,1,t.title)}0==i?this.filterForm.cid=e:1==i?this.filterForm.area_id=e:2==i&&(this.filterForm.order=e),this.page=1,this.items=[],this.getTopData(),this.getList()},getFilterData(){this.$axios.get(this.api.infoFilter,{params:{attr:{model:"info"}}}).then(t=>{var i=t.data;var e=[{name:"全部栏目",id:""}];i.columns.forEach(t=>{"info"==t.model&&e.push(t)});var s=[{name:"全部区域",id:""}].concat(i.areas),o=[{name:"默认排序",id:""}].concat([{name:"最新信息",id:"1"},{name:"热门信息",id:"2"},{name:"红包信息",id:"3"}]);this.filters.data=[e,s,o],this.getTopData(),this.getList()})},getTopData(){var t=this.simpleClone(this.filterForm);t.top="1",t.page="",""==t.cid&&(t.model="info");var i=this.$store.getters.getToken;for(var e in i&&(t.token=i),t)t[e]||delete t[e];this.$axios.get(this.api.infoList,{params:{attr:t}}).then(t=>{var i=t.data;this.topData=i})},getList(){this.filterForm.page=this.page;var t=this.simpleClone(this.filterForm);t.top="0",""==t.cid&&(t.model="info");var i=this.$store.getters.getToken;for(var e in i&&(t.token=i),t)t[e]||delete t[e];this.$axios.get(this.api.infoList,{params:{attr:t}}).then(t=>{var i=t.data;const e=i.data;e?(this.items=[...this.items,...e],this.page>=i.last_page?this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.loadedDone"):(this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.finishLoad"),this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.reInit"),this.page++)):this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.loadedDone")})},rightIconClick:function(t){0==t&&this.$router.push({name:"InfoSearch"})}},components:{ArticleList:n.a,infoList:o.a,topFilter:l.a,Bottom:d.a,PriceList:a.a,ToolBox:r.a}},h={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"infoList"},[e("v-title",{attrs:{title:t.title,showBack:!1,rightIcons:["icon-search"]},on:{rightIconClick:t.rightIconClick}}),t._v(" "),e("topFilter",{attrs:{showChild:"true",data:t.filters.data,titles:t.filters.titles},on:{select:t.handleTypeChange}}),t._v(" "),e("div",{staticClass:"section"},[e("div",{staticClass:"wrap"},[e("yd-infinitescroll",{ref:"infinitescrollDemo",attrs:{callback:t.getList}},[t.items?e("div",{staticClass:"list",attrs:{slot:"list"},slot:"list"},t._l(t.topData,function(t){return e("PriceList",{key:t.id,attrs:{item:t}})})):t._e(),t._v(" "),t.items?e("div",{staticClass:"list",attrs:{slot:"list"},slot:"list"},t._l(t.items,function(t){return e("PriceList",{key:t.id,attrs:{item:t}})})):t._e(),t._v(" "),e("Bottom",{attrs:{slot:"doneTip"},slot:"doneTip"}),t._v(" "),e("img",{attrs:{slot:"loadingTip",src:t.api.imgloading},slot:"loadingTip"})],1)],1)]),t._v(" "),e("ToolBox")],1)},staticRenderFns:[]};var p=e("D8HT")(f,h,!1,function(t){e("92FB")},"data-v-c8657b08",null);i.default=p.exports},"92FB":function(t,i){},WRRQ:function(t,i){}});