(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d9396178"],{"067f":function(t,i,a){"use strict";a.r(i);var e=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"search"},[a("header",[a("form",{staticClass:"search-wrap pr",attrs:{action:"/"}},[a("i",{staticClass:"icon icon-jiantou-zuo",on:{click:t.onCancel}}),a("van-search",{attrs:{placeholder:"目的地、区域、公寓名称","show-action":""},on:{search:t.onSearch,cancel:t.onCancel},model:{value:t.value,callback:function(i){t.value=i},expression:"value"}})],1)]),a("div",{staticClass:"search-list"},[a("van-pull-refresh",{on:{refresh:t.onRefresh},model:{value:t.isLoading,callback:function(i){t.isLoading=i},expression:"isLoading"}},[a("van-list",{attrs:{finished:t.finished,"immediate-check":!1,offset:200},on:{load:t.onLoad},model:{value:t.loading,callback:function(i){t.loading=i},expression:"loading"}},t._l(t.data,function(i,e){return a("div",{key:e,staticClass:"list",on:{click:function(a){t.goNextPage(i)}}},[a("div",{staticClass:"flex"},[a("p",{staticClass:"lineHidden"},[t._v(t._s(i.name))]),a("i",{directives:[{name:"show",rawName:"v-show",value:"address"===i.type,expression:"item.type === 'address'"}],staticClass:"icon icon-zuobiao"}),a("i",{directives:[{name:"show",rawName:"v-show",value:"building"===i.type,expression:"item.type === 'building'"}],staticClass:"icon icon-gongyu"})])])})),t.isEmpty?a("is-empty"):t._e()],1)],1)])},n=[],s=a("d8ff"),o={components:{IsEmpty:s["a"]},data:function(){return{value:"",data:[],pages:{},page:0,isEmpty:!1,lastId:null,loading:!1,finished:!1,isLoading:!1,lang:this.$store.state.langStr,cityItem:this.$util.storage.fetch("CityItem")}},created:function(){this.verificationCity()},watch:{value:function(t){var i=this;clearTimeout(this.timer),this.timer=setTimeout(function(){i.value=t,i.getData()},500)}},methods:{getCountryList:function(){var t=this,i={};i.url=this.$apis.api_national_real_all_city,this.$net.req(i,this).then(function(i){t.$store.commit("setCountryArr",i.data),t.verificationCity()})},verificationCity:function(){var t=this,i=this.$route.params.cityTag,a=this.$store.state.countryArr,e=null;a.length?a.some(function(a){a.son.some(function(a){if(i==a.other_name)return e=!0,t.$util.storage.save("CityItem",a),t.cityItem=a,!0})}):this.getCountryList(),!e&&a.length&&this.$Dialog.alert({message:"城市信息错误，请重新选择。"}).then(function(){t.$router.push({path:"/".concat(t.lang,"/guide")})})},onLoad:function(){var t=this;setTimeout(function(){t.getData("onLoad")},500)},onRefresh:function(){var t=this;setTimeout(function(){t.getData("onRefresh")},500)},getData:function(t){var i=this,a={};a.url=this.$apis.api_search_fill,"onLoad"!==t&&(this.page=0,this.lastId=null),this.page=this.page+1,a.data={id:this.cityItem.id,keywords:this.value,lastId:this.lastId,limit:10},this.$net.req(a,this).then(function(e){var n=e.data.list;i.lastId=n.slice(-1).id,i.pages.totalCount=e.data.totalCount,"onLoad"===t?(i.loading=!1,i.page*a.data.limit>=i.pages.totalCount&&(i.finished=!0,i.isEmpty=!0),i.data=i.data.concat(n)):i.data=n,"onRefresh"===t&&(i.$toast("刷新成功"),i.isLoading=!1)},function(t){i.$Toast(t.msg)})},goNextPage:function(t){"address"===t.type?this.$router.push({path:"/".concat(this.lang,"/").concat(this.cityItem.other_name,"/buildings"),query:{locationId:t.id}}):"building"===t.type&&this.$router.push({path:"/"+this.lang+"/building/"+t.id})},onSearch:function(){},onCancel:function(){window.history.length>1?this.$router.go(-1):this.$router.push("/")},search:function(){this.$router.push({path:"/".concat(this.lang,"/").concat(this.cityItem.other_name,"/buildings")})}}},c=o,r=(a("bd58"),a("2877")),l=Object(r["a"])(c,e,n,!1,null,"ede8b528",null);l.options.__file="search.vue";i["default"]=l.exports},8198:function(t,i,a){},a4d7:function(t,i,a){},bd58:function(t,i,a){"use strict";var e=a("a4d7"),n=a.n(e);n.a},c309:function(t,i,a){"use strict";var e=a("8198"),n=a.n(e);n.a},d8ff:function(t,i,a){"use strict";var e=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"is_empty"},[a("p",[t._v("加载完毕~")]),a("div",[t._t("default")],2)])},n=[],s={name:"IsEmpty"},o=s,c=(a("c309"),a("2877")),r=Object(c["a"])(o,e,n,!1,null,"45545a31",null);r.options.__file="IsEmpty.vue";i["a"]=r.exports}}]);
//# sourceMappingURL=chunk-d9396178.ccd6c96d.js.map