修复正式域名下后台接口地址

This commit is contained in:
amb
2026-09-09 18:19:03 +08:00
parent d0bcff2311
commit 06c8231425
+3 -1
View File
@@ -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: '服务' },