1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-09 02:01:31 +08:00

finish del of filelist

This commit is contained in:
源文雨
2023-03-15 20:26:43 +08:00
parent 6e49173b12
commit 8a63418dab
5 changed files with 125 additions and 48 deletions

View File

@@ -1,9 +1,10 @@
import { defHttp } from '/@/utils/http/axios'
import { getFileListModel, FilePercent } from './model/fileListModel'
import { getFileListModel, FilePercent, DelFile } from './model/fileListModel'
enum Api {
GetFileList = '/getFileList',
GetFilePercent = '/getFilePercent',
DelFile = '/delFile',
}
/**
@@ -14,8 +15,15 @@ export const getFileList = (count?: number) => {
}
/**
* @description: Get file percant
* @description: Get file percent
*/
export const getFilePercent = (id: number) => {
return defHttp.get<FilePercent>({ url: Api.GetFilePercent, params: { id: id } })
}
/**
* @description: Get file percant
*/
export const delFile = (id: number) => {
return defHttp.get<DelFile>({ url: Api.DelFile, params: { id: id } })
}

View File

@@ -17,3 +17,7 @@ export type getFileListModel = FileListGroupItem[]
export interface FilePercent {
percent: number
}
export interface DelFile {
msg: string
}