From fa1ea74f97bf1c1494bf806ce05144b4fc4d863a Mon Sep 17 00:00:00 2001 From: Kevin Wong Date: Wed, 14 Jan 2026 17:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAPI=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/next.config.ts | 2 +- frontend/src/app/page.tsx | 2 +- frontend/src/app/publish/page.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/next.config.ts b/frontend/next.config.ts index 507b0f9..40a8570 100644 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -6,7 +6,7 @@ const nextConfig: NextConfig = { return [ { source: '/api/:path*', - destination: 'http://127.0.0.1:8006/api/:path*', + destination: 'http://localhost:8006/api/:path*', // 服务器本地代理 }, ]; }, diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index e19ed4a..f17ee5b 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -3,7 +3,7 @@ import { useState, useEffect } from "react"; -const API_BASE = "http://127.0.0.1:8006"; +const API_BASE = ""; // 使用相对路径,由 Next.js rewrite 代理到后端 // 类型定义 interface Material { diff --git a/frontend/src/app/publish/page.tsx b/frontend/src/app/publish/page.tsx index f551090..62b2a51 100644 --- a/frontend/src/app/publish/page.tsx +++ b/frontend/src/app/publish/page.tsx @@ -3,7 +3,7 @@ import { useState, useEffect } from "react"; import Link from "next/link"; -const API_BASE = "http://127.0.0.1:8006"; +const API_BASE = ""; // 使用相对路径,由 Next.js rewrite 代理到后端 interface Account { platform: string;