mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-24 16:00:53 +00:00
feat: first-commit
This commit is contained in:
@@ -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`);
|
||||
};
|
||||
@@ -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);
|
||||
};
|
||||
@@ -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);
|
||||
};
|
||||
@@ -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);
|
||||
};
|
||||
Reference in New Issue
Block a user