Implemented a Zustand-based project_id store, expanded project selection/switching to persist project_id,

and centralized backend requests via api/apiFetch (including data provider updates) to inject X-Project-ID.
This commit is contained in:
JIANG
2026-02-11 16:29:18 +08:00
parent a2e6c1f416
commit 9d06226cb4
25 changed files with 192 additions and 62 deletions
@@ -23,7 +23,7 @@ import { Style, Stroke, Icon } from "ol/style";
import { handleMapClickSelectFeatures as mapClickSelectFeatures } from "@/utils/mapQueryService";
import Feature, { FeatureLike } from "ol/Feature";
import { useNotification } from "@refinedev/core";
import axios from "axios";
import { api } from "@/lib/api";
import { config, NETWORK_NAME } from "@/config/config";
import { along, lineString, length, toMercator } from "@turf/turf";
import { Point } from "ol/geom";
@@ -283,7 +283,7 @@ const AnalysisParameters: React.FC = () => {
};
try {
await axios.get(`${config.BACKEND_URL}/api/v1/burst_analysis/`, {
await api.get(`${config.BACKEND_URL}/api/v1/burst_analysis/`, {
params,
paramsSerializer: {
indexes: null, // 移除数组索引,即由 burst_ID[] 变为 burst_ID