Pārlūkot izejas kodu

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

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

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 1 dienu atpakaļ
vecāks
revīzija
5bcf494fd5
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  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;
         });