54 lines
874 B
JavaScript
54 lines
874 B
JavaScript
|
|
||
|
import request from "@/utils/request.js";
|
||
|
import Cache from '@/utils/cache'
|
||
|
|
||
|
/**
|
||
|
* 登录
|
||
|
* @param object
|
||
|
*/
|
||
|
export function login(data) {
|
||
|
return request.post(`login/login`, data, {noAuth: true});
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 注册
|
||
|
* @param object
|
||
|
*/
|
||
|
export function register(data) {
|
||
|
return request.post(`login/register`, data, {noAuth: true});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 验证码
|
||
|
* @param object
|
||
|
*/
|
||
|
export function indexCode(data) {
|
||
|
return request.post(`index/code`, data, {noAuth: true});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 退出登录
|
||
|
* @param object
|
||
|
*/
|
||
|
export function logout(data) {
|
||
|
return request.post(`login/logout`, data);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 修改密码
|
||
|
* @param object
|
||
|
*/
|
||
|
export function changePassword(data) {
|
||
|
return request.post(`user.user/changePassword`, data);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 重置密码
|
||
|
* @param object
|
||
|
*/
|
||
|
export function resetPassword(data) {
|
||
|
return request.post(`/user.user/resetPassword`, data);
|
||
|
}
|
||
|
|