5403e0ce66
Conflicts: fangija-zsyf/config.js
43 lines
847 B
JavaScript
43 lines
847 B
JavaScript
var distDatas = {nearDists: []}
|
|
Vue.component('map-component', {
|
|
template: `
|
|
|
|
`,
|
|
data: function(){
|
|
return distDatas;
|
|
},
|
|
methods: {
|
|
loadMap:function(){
|
|
alert("map:"+lat+"address:"+address);
|
|
baseInfo.address = address;
|
|
if(lat && lng && address){
|
|
|
|
loadMapPoi();
|
|
}else{
|
|
axios.get("/rest/districts/detail", {
|
|
params: {
|
|
city: city,
|
|
region:region,
|
|
name: name
|
|
}
|
|
}).then(function (response) {
|
|
console.log("map finish.....")
|
|
var vo = response.data.data.detail
|
|
if(vo.avgPrice){
|
|
lat = vo.lat2;
|
|
lng = vo.lng2;
|
|
loadMapPoi();
|
|
}
|
|
}).catch(function (error) {
|
|
alert(error)
|
|
console.log(error);
|
|
});
|
|
}
|
|
|
|
}
|
|
},
|
|
mounted:function(){
|
|
alert("map start.....")
|
|
this.loadMap();
|
|
}
|
|
}) |