From 177ca7fbd68e15fdf5b92d18309cd1bbe9190cc6 Mon Sep 17 00:00:00 2001 From: ljh Date: Wed, 1 Apr 2026 16:08:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D/api/platforms=20?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E9=89=B4=E6=9D=83=E5=90=8E=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1f8d362..a6d0c72 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -20,7 +20,7 @@ import Settings from '@/pages/Settings' import TaskHistory from '@/pages/TaskHistory' import Login from '@/pages/Login' import { darkTheme, lightTheme } from './theme' -import { clearToken, getToken } from '@/lib/utils' +import { apiFetch, clearToken, getToken } from '@/lib/utils' const { Sider, Content } = Layout @@ -77,11 +77,11 @@ function AppContent() { }, []) useEffect(() => { - fetch('/api/platforms') - .then(r => r.json()) + apiFetch('/platforms') .then(d => setPlatforms((d || []) .filter((p: any) => !['tavily', 'cursor'].includes(p.name)) .map((p: any) => ({ key: p.name, label: p.display_name })))) + .catch(() => {}) }, []) const isLight = themeMode === 'light'