From cdd315af9063d64eb9862450390cf042d3c009ed Mon Sep 17 00:00:00 2001 From: qikongjian Date: Fri, 19 Sep 2025 21:47:21 +0800 Subject: [PATCH] =?UTF-8?q?auth/profile=E6=8E=A5=E5=8F=A3=E7=94=A8BASE=5FU?= =?UTF-8?q?RL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/auth.ts b/lib/auth.ts index 1596337..2887784 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -11,6 +11,8 @@ import type { // API配置 //const JAVA_BASE_URL = 'http://192.168.120.36:8080'; const JAVA_BASE_URL = process.env.NEXT_PUBLIC_JAVA_URL || 'https://77.app.java.auth.qikongjian.com'; +const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL + // Token存储键 const TOKEN_KEY = 'token'; const USER_KEY = 'currentUser'; @@ -398,7 +400,7 @@ export const getUserProfile = async (): Promise => { throw new Error('No token available'); } - const response = await fetch(`${JAVA_BASE_URL}/auth/profile`, { + const response = await fetch(`${BASE_URL}/auth/profile`, { method: 'GET', headers: { 'Accept': 'application/json',