2025-09-28

This commit is contained in:
2025-09-28 09:21:15 +08:00
parent d2a0584ee5
commit 5110537d73
24 changed files with 819 additions and 365 deletions

View File

@@ -2,19 +2,21 @@ import {
http
} from "../util/api"
const baseURL = "http://192.168.0.4:3005"
// 认证相关API
export const authAPI = {
// 登录
login: (data) => http.post('/auth/login', data),
login: (data) => http.post(baseURL + '/auth/login', data),
// 注册
register: (data) => http.post('/auth/register', data),
register: (data) => http.post(baseURL + '/auth/register', data),
// 获取当前用户信息
me: () => http.get('/auth/me'),
me: () => http.get(baseURL + '/auth/me'),
// 修改密码
changePassword: (data) => http.put('/auth/change-password', data)
changePassword: (data) => http.put(baseURL + '/auth/change-password', data)
}
export default {