import { http } from '@/api/service/request'; import type { BaseResult, ResultTable } from '@/api/service/types'; /** 系统文件管理---获取系统文件管理列表 */ export const getFilesPage = (data: any) => { return http.request>('get', `files/${data.currentPage}/${data.pageSize}`, { params: data, }); }; /** 系统文件管理---添加系统文件 */ export const fetchAddFiles = (data: any) => { return http.request>('post', 'files', { data }, { headers: { 'Content-Type': 'multipart/form-data' } }); }; /** 系统文件管理---更新系统文件 */ export const updateFiles = (data: any) => { return http.request>('put', 'files', { data }, { headers: { 'Content-Type': 'multipart/form-data' } }); }; /** 系统文件管理---删除系统文件 */ export const deleteFiles = (data: any) => { return http.request>('delete', 'files', { data }); }; /** 系统文件管理---根据文件id下载文件 */ export const downloadFilesByFileId = (data: any) => { return http.request('get', `files/file/${data.id}`, { responseType: 'blob', }); }; /** 系统文件管理---获取所有文件类型 */ export const getMediaTypeList = () => { return http.request>('get', `files/private/getMediaTypeList`); }; /** 系统文件管理---获取所有文件存储基础路径 */ export const getFilesStoragePath = () => { return http.request>('get', `files/private/getAllFilesStoragePath`); };