2022-08-24 11:10:50 +08:00
|
|
|
import { File } from '@/api/interface/file';
|
|
|
|
import http from '@/api';
|
2022-08-19 16:02:58 +08:00
|
|
|
|
2022-08-24 11:10:50 +08:00
|
|
|
export const GetFilesList = (params: File.ReqFile) => {
|
2022-08-24 15:33:38 +08:00
|
|
|
return http.post<File.File>('files/search', params);
|
2022-08-19 16:02:58 +08:00
|
|
|
};
|
2022-08-24 17:34:21 +08:00
|
|
|
|
|
|
|
export const GetFilesTree = (params: File.ReqFile) => {
|
|
|
|
return http.post<File.FileTree[]>('files/tree', params);
|
|
|
|
};
|
2022-08-25 17:54:52 +08:00
|
|
|
|
|
|
|
export const CreateFile = (form: File.FileCreate) => {
|
|
|
|
return http.post<File.File>('files', form);
|
|
|
|
};
|
2022-08-25 18:48:03 +08:00
|
|
|
|
|
|
|
export const DeleteFile = (form: File.FileDelete) => {
|
|
|
|
return http.post<File.File>('files/del', form);
|
|
|
|
};
|
2022-08-29 15:26:36 +08:00
|
|
|
|
|
|
|
export const ChangeFileMode = (form: File.FileCreate) => {
|
2022-09-01 19:02:33 +08:00
|
|
|
return http.post<File.File>('files/mode', form);
|
2022-08-30 17:59:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export const CompressFile = (form: File.FileCompress) => {
|
2022-09-01 19:02:33 +08:00
|
|
|
return http.post<File.File>('files/compress', form);
|
2022-08-29 15:26:36 +08:00
|
|
|
};
|
2022-09-01 19:02:33 +08:00
|
|
|
|
2022-08-31 13:59:02 +08:00
|
|
|
export const DeCompressFile = (form: File.FileDeCompress) => {
|
2022-09-01 19:02:33 +08:00
|
|
|
return http.post<File.File>('files/decompress', form);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const GetFileContent = (params: File.ReqFile) => {
|
|
|
|
return http.post<File.File>('files/content', params);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const SaveFileContent = (params: File.FileEdit) => {
|
|
|
|
return http.post<File.File>('files/save', params);
|
2022-08-31 13:59:02 +08:00
|
|
|
};
|