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
@@ -12,7 +12,7 @@ import {
import { PlayArrow as PlayArrowIcon } from "@mui/icons-material";
import { useNotification } from "@refinedev/core";
import { useGetIdentity } from "@refinedev/core";
import axios from "axios";
import { api } from "@/lib/api";
import { config, NETWORK_NAME } from "@/config/config";
type IUser = {
@@ -93,7 +93,7 @@ const OptimizationParameters: React.FC = () => {
try {
// 发送优化请求
const response = await axios.post(
const response = await api.post(
`${config.BACKEND_URL}/api/v1/sensorplacementscheme/create`,
null,
{