1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-24 04:27:09 +08:00

finish 解析

This commit is contained in:
源文雨
2023-04-09 23:30:08 +08:00
parent 2fcb3fd636
commit fe1f3b1397
9 changed files with 217 additions and 115 deletions

View File

@@ -1,9 +1,10 @@
import { defHttp } from '/@/utils/http/axios'
import { getFileListModel, FilePercent, DelFile, AnalyzeFile } from './model/fileListModel'
import { getFileListModel, DelFile, AnalyzeFile, FileListGroupItem } from './model/fileListModel'
import { DownloadFile, FileStatus } from './model/fileModel'
enum Api {
GetFileList = '/getFileList',
GetFileInfo = '/getFileInfo',
GetFilePercent = '/getFilePercent',
DelFile = '/delFile',
AnalyzeFile = '/analyzeFile',
@@ -18,11 +19,18 @@ export const getFileList = (count?: number) => {
return defHttp.get<getFileListModel>({ url: Api.GetFileList, params: { count: count } })
}
/**
* @description: Get file info
*/
export const getFileInfo = (id: number) => {
return defHttp.get<FileListGroupItem>({ url: Api.GetFileInfo, params: { id } })
}
/**
* @description: Get file percent
*/
export const getFilePercent = (id: number) => {
return defHttp.get<FilePercent>({ url: Api.GetFilePercent, params: { id: id } })
return defHttp.get<number>({ url: Api.GetFilePercent, params: { id: id } })
}
/**