auth/profile接口用BASE_URL

This commit is contained in:
qikongjian 2025-09-19 21:47:21 +08:00
parent 0ea5fd6cd6
commit cdd315af90

View File

@ -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<any> => {
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',