import request from '../../../utils/request'; interface Result { code: number; msg: string; data?: T; } interface UploadResultProps { url: string; name: string; } export const uploadFile = async (data: FormData) => { return await request>({ url: '/file/upload', data, method: 'post', }); }; // 获取文件(图片)列表 interface GetFileListProps { type: string; picType: string; } export type FileFields = { searchValue: string; createBy: string; createTime: string; updateBy: string; updateTime: string; remark: string; params: Record; fileId: string; fileName: string; filePath: string; type: string; picType: string; fileContent: string; isSvg: string; // 1 是 2 否 }; export const getFileList = async (params: GetFileListProps) => { const { data } = await request>({ url: '/file/list', method: 'get', params, }); return data || []; };