webpackJsonp([18],{"0NBp":function(t,i){},HaCF:function(t,i,s){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var e=s("Dd8w"),o=s.n(e),c=s("qkow"),a=s("NYxO"),n={data:function(){return{city:"南京市",cityList:[],search:"",chooseCity:"",hotList:[]}},computed:o()({},Object(a.b)(["locationInfo"])),created:function(){var t=this;new qq.maps.Geolocation("GLFBZ-ZR2W6-76XSA-MF7CQ-GDJ6Z-6FB5K","享居屋").getLocation(function(i){t.city=i.city}),this.$http.get({url:"/districtInfo/all",data:{useFlag:"Y"}}).then(function(i){i.success&&(t.cityList=i.data,i.data.forEach(function(i,s){i.fullName!=t.city&&t.hotList.length<9&&t.hotList.push(i)}))}),this.locationInfo&&(this.chooseCity=this.locationInfo.fullName)},methods:{nowchooseCity:function(t){console.log(t),this.$store.commit("updateLocationInfo",t),this.chooseCity=t.fullName,this.$router.replace({name:"home",params:{isNext:1}})},startChoose:function(t){var i=this;this.$http.get({url:"/districtInfo/getOne",data:{fullName:this.city}}).then(function(t){t.success&&(i.$store.commit("updateLocationInfo",t.data),i.chooseCity=t.data.fullName,i.$router.replace({name:"home",params:{isNext:1}}))})}},components:{GmButton:c.a}},l={render:function(){var t=this,i=t.$createElement,s=t._self._c||i;return s("div",{staticClass:"container"},[s("div",{staticClass:"content"},[s("div",{staticClass:"title"},[t._v("当前城市")]),t._v(" "),s("div",{staticClass:"item",class:{active:t.chooseCity==t.city},on:{click:function(i){t.startChoose(t.city)}}},[t._v(t._s(t.city.split("市")[0]))])]),t._v(" "),s("div",{staticClass:"content"},[s("div",{staticClass:"title"},[t._v("热门城市")]),t._v(" "),s("div",{staticClass:"hot"},t._l(t.hotList,function(i){return s("div",{staticClass:"item",class:{active:i.fullName==t.chooseCity},on:{click:function(s){t.nowchooseCity(i)}}},[t._v(t._s(i.fullName.split("市")[0]))])}))]),t._v(" "),t._m(0),t._v(" "),s("div",{staticClass:"list"},t._l(t.cityList,function(i){return s("div",{staticClass:"list-item",class:{active:i.fullName==t.chooseCity},on:{click:function(s){t.nowchooseCity(i)}}},[t._v("\n            "+t._s(i.fullName.split("市")[0])+"\n        ")])}))])},staticRenderFns:[function(){var t=this.$createElement,i=this._self._c||t;return i("div",{staticClass:"content"},[i("div",{staticClass:"title"},[this._v("全部城市")])])}]};var u=s("VU/8")(n,l,!1,function(t){s("0NBp")},"data-v-55bdffa5",null);i.default=u.exports}});
//# sourceMappingURL=18.3d0c9f18d152fb1a31d5.js.map