Browse Source

不错不错

dev-天地图
dai 3 years ago
parent
commit
208586f9e1
  1. 4
      .env.development
  2. 15
      src/utils/dai-map.js

4
.env.development

@ -8,7 +8,7 @@ VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api
VUE_APP_NODE_ENV=dev_sdtdt
# VUE_APP_NODE_ENV=dev
# VUE_APP_NODE_ENV=dev_sdtdt
VUE_APP_NODE_ENV=dev
#项目根路径
VUE_APP_PUBLIC_PATH=epmet-oper

15
src/utils/dai-map.js

@ -49,9 +49,13 @@ export function searchNearby(map, keyword) {
lng,
lat,
address,
resultList: data.map((item) => {
resultList: data.map((item, index) => {
const {
location: { lat, lng },
} = item;
item.lonlat = lng + " " + lat;
item.name = item.name || "";
item.hotPointID = "hotPointID" + index;
return item;
}),
},
@ -93,7 +97,10 @@ export function searchNearby(map, keyword) {
lng,
lat,
address: address + name,
resultList: data,
resultList: data.map((item, index) => {
item.hotPointID = "hotPointID" + index;
return item;
}),
},
});
} else {
@ -129,9 +136,11 @@ export function searchNearby(map, keyword) {
lng,
lat,
address: address + name,
resultList: result.features.map((item) => {
resultList: result.features.map((item, index) => {
const { lng, lat } = item;
item.lonlat = lng + " " + lat;
item.name = item.name || "";
item.hotPointID = "hotPointID" + index;
return item;
}),
},

Loading…
Cancel
Save