Переглянути джерело

fix: 从mock数据加载路口名称

sequoia tungfang 3 тижнів тому
батько
коміт
92c672af94
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      src/components/TongzhouTrafficMap.vue

+ 4 - 1
src/components/TongzhouTrafficMap.vue

@@ -336,7 +336,10 @@ export default {
         if (!realRouteConfigs[config.name]) {
           const intersections = this.statusIntersections[config.name] || [];
           const markers = intersections.map(item =>
-            this.createTrafficLightMarker([item["位置-经度"], item["位置-纬度"]], config)
+            this.createTrafficLightMarker([item["位置-经度"], item["位置-纬度"]], {
+              ...config,
+              road: item["路口名称"] || '规划路口'
+            })
           ).filter(Boolean);
           this.routeGroups[config.name] = markers;
           if (this.activeLegends.includes(config.name)) this.map.add(markers);