init
This commit is contained in:
commit
1ab9f9c458
1319 files changed
+137505
No files matched your search
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* 认证相关API
|
||||
*/
|
||||
|
||||
import { post, get } from '@/utils/request.js';
|
||||
|
||||
/**
|
||||
* 用户登录
|
||||
*/
|
||||
export function loginApi(data) {
|
||||
return post('/auth/login', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户退出
|
||||
*/
|
||||
export function logoutApi() {
|
||||
return post('/auth/logout');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
export function getUserInfoApi() {
|
||||
return get('/auth/userinfo');
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新Token
|
||||
*/
|
||||
export function refreshTokenApi(refreshToken) {
|
||||
return post('/auth/refresh', { refreshToken });
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
export function changePasswordApi(data) {
|
||||
return post('/auth/change-password', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
export function resetPasswordApi(data) {
|
||||
return post('/auth/reset-password', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
export function sendCodeApi(data) {
|
||||
return post('/auth/send-code', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定手机号
|
||||
*/
|
||||
export function bindPhoneApi(data) {
|
||||
return post('/auth/bind-phone', data);
|
||||
}
|
||||
Reference in new issue
Block a user