From 06c82314254669095360d5ecf085a59e16e823e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=BB=AB?= <486494914@qq.com> Date: Wed, 9 Sep 2026 18:19:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AD=A3=E5=BC=8F=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E4=B8=8B=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A3=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/admin/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/admin/page.tsx b/frontend/src/app/admin/page.tsx index dad5e91..09e7a1b 100644 --- a/frontend/src/app/admin/page.tsx +++ b/frontend/src/app/admin/page.tsx @@ -2,7 +2,9 @@ import { FormEvent, useEffect, useState } from 'react'; -const API_URL = process.env.API_URL || 'http://localhost:24731'; +const API_URL = typeof window !== 'undefined' + ? (process.env.NEXT_PUBLIC_API_URL ?? '') + : (process.env.API_URL || 'http://localhost:24731'); const contentTypes = [ { value: 'page', label: '页面' }, { value: 'article', label: '文章' }, { value: 'case', label: '案例' }, { value: 'faq', label: '常见问题' }, { value: 'capability', label: '企业能力' }, { value: 'service', label: '服务' },