fix: 修复生产环境登录双/api路径问题

API_BASE为空时用||替代??,确保fallback到localhost:4000

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Sisyphus 2026-06-26 17:12:19 +08:00
parent 481d01c89f
commit d8d49f7e88
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
NEXT_PUBLIC_API_URL=/api
NEXT_PUBLIC_API_URL=

View File

@ -81,7 +81,7 @@ export default function Sidebar({
}`}
>
<span>📋</span>
<span>线索池</span>
<span>询价发布助手</span>
</button>
{[

View File

@ -1 +1 @@
export const API_BASE: string = process.env.NEXT_PUBLIC_API_URL ?? 'http://localhost:4000'
export const API_BASE: string = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:4000'