Commit 2bfb23bc authored by leidahong's avatar leidahong

社区图标修复

parent ccce3f01
...@@ -83,16 +83,15 @@ function getUserTypeInfo() { ...@@ -83,16 +83,15 @@ function getUserTypeInfo() {
getHouseListFunc(userTypeInfo.value.communityId); getHouseListFunc(userTypeInfo.value.communityId);
} else if (userTypeInfo.value.type === 5) { } else if (userTypeInfo.value.type === 5) {
// 小区管理员 // 小区管理员
getHouseInfoFunc(userTypeInfo.value.houseId); getHouseInfoFunc(userTypeInfo.value.houseId, 1);
} }
}); });
} }
// 获取小区列表 // 获取小区列表
function getHouseListFunc(communityId) { function getHouseListFunc(communityId) {
getHouseList(communityId).then((res) => { getHouseList(communityId).then((res) => {
console.log("getHouseList", res.data);
drawHouseMarker(res.data); drawHouseMarker(res.data);
getHouseInfoFunc(res.data[0].id); getHouseInfoFunc(res.data[0].id, 0);
}); });
} }
// 绘制社区标记 // 绘制社区标记
...@@ -109,6 +108,7 @@ function drawCommunityMarker(arr) { ...@@ -109,6 +108,7 @@ function drawCommunityMarker(arr) {
function drawHouseMarker(arr) { function drawHouseMarker(arr) {
arr.forEach((item) => { arr.forEach((item) => {
let position = JSON.parse(item.solid); let position = JSON.parse(item.solid);
console.log("position", position);
drawLabel(position, item.name, "#003860", "blue_dw_icon", { drawLabel(position, item.name, "#003860", "blue_dw_icon", {
...item, ...item,
type: "house", type: "house",
...@@ -116,9 +116,11 @@ function drawHouseMarker(arr) { ...@@ -116,9 +116,11 @@ function drawHouseMarker(arr) {
}); });
} }
// 获取小区信息 // 获取小区信息
function getHouseInfoFunc(houseId) { function getHouseInfoFunc(houseId, onlyHouse = false) {
getHouseInfo(houseId).then((res) => { getHouseInfo(houseId).then((res) => {
currentHouseInfo.value = res.data; currentHouseInfo.value = res.data;
if (onlyHouse) drawHouseMarker([res.data]);
let { solid, coordinates } = currentHouseInfo.value; let { solid, coordinates } = currentHouseInfo.value;
// drawLabel( // drawLabel(
......
...@@ -25,7 +25,7 @@ export default defineConfig({ ...@@ -25,7 +25,7 @@ export default defineConfig({
// target: "http://192.168.10.4:10024", // target: "http://192.168.10.4:10024",
target: "https://xcsq.zjhmit.com", target: "https://xcsq.zjhmit.com",
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""), // rewrite: (path) => path.replace(/^\/prod-api/, ""),
}, },
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment