init: 初始系统模板

This commit is contained in:
TsMask
2023-09-05 14:38:23 +08:00
parent a5bc16ae4f
commit 1075c8ae4f
130 changed files with 22531 additions and 1 deletions

59
src/api/login.ts Normal file
View File

@@ -0,0 +1,59 @@
import { request } from '@/plugins/http-fetch';
// 登录方法
export function login(data: Record<string, string>) {
return request({
url: '/login',
method: 'post',
data: data,
whithToken: false,
});
}
/**
* 注册方法
* @param data 注册对象
* @returns object
*/
export function register(data: Record<string, any>) {
return request({
url: '/register',
method: 'post',
data: data,
whithToken: false,
});
}
/**
* 获取用户详细信息
* @returns object
*/
export function getInfo() {
return request({
url: '/getInfo',
method: 'get',
});
}
/**
* 退出方法
* @returns object
*/
export function logout() {
return request({
url: '/logout',
method: 'post',
});
}
/**
* 获取验证码
* @returns object
*/
export function getCaptchaImage() {
return request({
url: '/captchaImage',
method: 'get',
whithToken: false,
});
}