20 lines
387 B
JavaScript
20 lines
387 B
JavaScript
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
|
|
} |