Explorar o código

fix: stationStatus/businessPolicy鉴权失败时降级展示基本电站数据

- _fetchStationStatus 增加兜底catch,接口失败时返回listStation已获取的基本数据
- 确保即使后端未部署@SaIgnore,首页也能展示电站列表和地图标记

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline hai 1 día
pai
achega
5bcf494fd5
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      charge-front/src/api/charge.ts

+ 3 - 2
charge-front/src/api/charge.ts

@@ -527,8 +527,6 @@ function _fetchStationStatus(list: any[]) {
                                     (costatus: any) => costatus.connectorId === coInfo.connectorId
                                 );
                             if (connectorStatusInfo) {
-                                // debug
-                                // connectorStatusInfo.status = 255
                                 coInfo.connectorStatusInfo = connectorStatusInfo;
                             }
                         }
@@ -564,6 +562,9 @@ function _fetchStationStatus(list: any[]) {
                 });
             }
             return _list;
+        })
+        .catch(() => {
+            return list;
         });