first commit

This commit is contained in:
闫旭隆
2025-10-17 09:31:28 +08:00
commit 4698145045
589 changed files with 196795 additions and 0 deletions

View File

@ -0,0 +1,41 @@
/**
* API配置文件 - 用于连接到Spring Boot后端
*/
const API_CONFIG = {
// Spring Boot 后端服务地址
BASE_URL: 'http://101.200.154.78:8080',
// API 路径配置
ENDPOINTS: {
// 认证相关
AUTH: {
SEND_CODE: '/api/auth/send-code',
LOGIN: '/api/auth/login',
REGISTER: '/api/auth/register',
LOGOUT: '/api/auth/logout',
REFRESH: '/api/auth/refresh',
FORGOT_PASSWORD: '/api/auth/forgot-password',
RESET_PASSWORD: '/api/auth/reset-password'
},
// 用户相关
USER: {
ME: '/api/users/me', // 注意backserver使用/api/users而不是/api/user
UPDATE_PROFILE: '/api/users/profile'
}
},
// 请求超时设置
TIMEOUT: 30000,
// 获取完整的API URL
getUrl(endpoint) {
return `${this.BASE_URL}${endpoint}`;
}
};
// 导出配置
if (typeof module !== 'undefined' && module.exports) {
module.exports = API_CONFIG;
}