feat: 修复BUG

This commit is contained in:
zhang1106
2026-03-16 17:07:20 +08:00
parent 8dcbe9948b
commit e5d20820dc
26 changed files with 2363 additions and 1004 deletions
@@ -12,7 +12,7 @@ import {
SettingOutlined,
} from '@ant-design/icons';
import PortPanel from './PortPanel';
import axios from 'axios';
import api from '../api';
import { designTokens } from '../config/theme';
import CloseButton from './CloseButton';
@@ -47,8 +47,8 @@ const ServerBackplanePanel = ({
try {
setLoading(true);
const response = await axios.get(`/api/network-cards/device/${deviceId}/with-ports`);
const cardsData = response.data || [];
const response = await api.get(`/network-cards/device/${deviceId}/with-ports`);
const cardsData = response.data || response || [];
setCards(cardsData);
} catch (error) {
console.error('获取网卡数据失败:', error);