webpackJsonp([16],{Un1D:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=e("FevL"),a=e("PXpm"),o=e("p52L"),n=e("7CoX"),r=e("gOFm"),l=e("wYMm");s.default.component(r.InfiniteScroll.name,r.InfiniteScroll);var h={data:()=>({title:"电话",cid:l.b.id,page:1,items:[],topData:[],filters:{titles:["栏目","区域","排序"],data:[]},filterForm:{cid:"",order:"",area_id:"",page:1,keyword:"",wxObj:{}}}),created(){this.getFilterData(),this.filterForm.cid=this.cid,this.wxObj={title:"phone"}},methods:{simpleClone(t){var i={};for(var e in t)i[e]=t[e];return i},getFilterData(){this.$axios.get(this.api.infoFilter+"?attr[model]=info").then(t=>{var i=t.data;var e=[{name:"全部栏目",id:""}];i.columns.forEach(t=>{t.key!=l.b.key||(e=e.concat(t.child))});var s=[{name:"全部区域",id:""}].concat(i.areas),a=[{name:"默认排序",id:""}].concat([{name:"最新信息",id:"1"},{name:"热门信息",id:"2"},{name:"红包信息",id:"3"}]);this.filters.data=[e,s,a],this.getTopData(),this.getList();let o=`${location.origin}${location.pathname}?#${this.$route.fullPath}`;this.wxObj={title:this.api.hostName,desc:"CIM，提供城市信息服务！",link:o}})},getTopData(){var t=this.simpleClone(this.filterForm);t.top="1",t.page="";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);for(var i in t.top="0",t)t[i]||delete t[i];var e=this.$store.getters.getToken;e&&(t.token=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.finishLoad"),this.page++)):this.$refs.infinitescrollDemo.$emit("ydui.infinitescroll.loadedDone")})},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,""==e&&(this.filterForm.cid=l.b.id)):1==i?this.filterForm.area_id=e:2==i&&(this.filterForm.order=e),this.page=1,this.items=[],this.getTopData(),this.getList()},rightIconClick:function(t){0==t&&this.$router.push({name:"InfoSearch"})},goJoin(){this.$router.push({name:"PhoneJoin",params:{cid:"none",id:"none"}})}},components:{Bottom:o.a,PhoneList:n.a,topFilter:a.a}},c={render:function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("section",[e("v-title",{attrs:{title:t.title,showBack:!1,rightIcons:["icon-search"]},on:{rightIconClick:t.rightIconClick}}),t._v(" "),e("topFilter",{attrs:{data:t.filters.data,titles:t.filters.titles},on:{select:t.handleTypeChange}}),t._v(" "),e("div",{staticClass:"shop"},[e("yd-infinitescroll",{ref:"infinitescrollDemo",attrs:{callback:t.getList}},[e("div",{staticClass:"list items",attrs:{slot:"list"},slot:"list"},[t._l(t.topData,function(t){return e("PhoneList",{key:t.id,attrs:{item:t}})}),t._v(" "),t._l(t.items,function(t){return e("PhoneList",{key:t.id,attrs:{item:t}})})],2),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("Share",{attrs:{wxObj:t.wxObj}}),t._v(" "),e("div",{staticClass:"post"},[e("i",{staticClass:"iconfont icon-plus1",on:{click:function(i){t.goJoin()}}})])],1)},staticRenderFns:[]};var d=e("D8HT")(h,c,!1,function(t){e("xQ8T"),e("pJWM")},"data-v-52bf8246",null);i.default=d.exports},pJWM:function(t,i){},xQ8T:function(t,i){}});