2025-09-15
This commit is contained in:
20
api/auth.js
Normal file
20
api/auth.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { http } from "../util/api"
|
||||
|
||||
// 认证相关API
|
||||
export const authAPI = {
|
||||
// 登录
|
||||
login: (data) => http.post('/auth/login', data),
|
||||
|
||||
// 注册
|
||||
register: (data) => http.post('/auth/register', data),
|
||||
|
||||
// 获取当前用户信息
|
||||
me: () => http.get('/auth/me'),
|
||||
|
||||
// 修改密码
|
||||
changePassword: (data) => http.put('/auth/change-password', data)
|
||||
}
|
||||
|
||||
export default {
|
||||
authAPI
|
||||
}
|
||||
Reference in New Issue
Block a user