feat: first-commit

This commit is contained in:
ssongliu
2022-08-17 09:37:30 +08:00
committed by ssongliu
parent c59613cf0e
commit 253015e6ff
241 changed files with 27164 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { Login } from '@/api/interface/index';
import http from '@/api';
export const loginApi = (params: Login.ReqLoginForm) => {
return http.post<Login.ResLogin>(`/auth/login`, params);
};
export const getCaptcha = () => {
return http.get<Login.ResCaptcha>(`/auth/captcha`);
};
export const logOutApi = () => {
return http.post<any>(`/auth/logout`);
};
+11
View File
@@ -0,0 +1,11 @@
import http from '@/api';
import { ResPage, ReqPage } from '../interface';
import { ResOperationLog } from '../interface/operation-log';
export const getOperationList = (info: ReqPage) => {
return http.post<ResPage<ResOperationLog>>(`/operations`, info);
};
export const deleteOperation = (params: { ids: number[] }) => {
return http.post(`/operations/del`, params);
};
+17
View File
@@ -0,0 +1,17 @@
import { Upload } from '@/api/interface/index';
import { PORT1 } from '@/api/config/service-port';
import http from '@/api';
/**
* @name 文件上传模块
*/
// * 图片上传
export const uploadImg = (params: FormData) => {
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/img`, params);
};
// * 视频上传
export const uploadVideo = (params: FormData) => {
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params);
};
+23
View File
@@ -0,0 +1,23 @@
import http from '@/api';
import { ResPage } from '../interface';
import { User } from '../interface/user';
export const getUserList = (params: User.ReqGetUserParams) => {
return http.post<ResPage<User.User>>(`/users/search`, params);
};
export const addUser = (params: User.User) => {
return http.post(`/users`, params);
};
export const getUserById = (id: number) => {
return http.get<User.User>(`/users/${id}`);
};
export const editUser = (params: User.User) => {
return http.put(`/users/` + params.id, params);
};
export const deleteUser = (params: { ids: number[] }) => {
return http.post(`/users/del`, params);
};