diff --git a/.env.development b/.env.development index e6abb72d8..d1c8a3e7c 100644 --- a/.env.development +++ b/.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 \ No newline at end of file diff --git a/src/utils/dai-map.js b/src/utils/dai-map.js index 1d2f4bb07..51da6ae52 100644 --- a/src/utils/dai-map.js +++ b/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; }), },