1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-11 03:20:24 +08:00

implement delfile

This commit is contained in:
源文雨
2023-04-11 16:02:29 +08:00
parent d317aba2d0
commit 27834d7292
9 changed files with 107 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
import { defHttp } from '/@/utils/http/axios'
import { getFileListModel, DelFile, AnalyzeFile, FileListGroupItem } from './model/fileListModel'
import { getFileListModel, AnalyzeFile, FileListGroupItem } from './model/fileListModel'
import { DownloadFile, FileStatus } from './model/fileModel'
enum Api {
@@ -37,7 +37,7 @@ export const getFilePercent = (id: number) => {
* @description: Get file percent
*/
export const delFile = (id: number) => {
return defHttp.get<DelFile>({ url: Api.DelFile, params: { id: id } })
return defHttp.get<string>({ url: Api.DelFile, params: { id: id } })
}
/**

View File

@@ -14,10 +14,6 @@ export interface FileListGroupItem {
*/
export type getFileListModel = FileListGroupItem[]
export interface DelFile {
msg: string
}
export interface AnalyzeFile {
code: number
msg: string

View File

@@ -130,7 +130,7 @@
item.delloading = true
const msg = await delFile(item.id)
if (msg) {
createMessage.success(msg.msg)
createMessage.success(msg)
setTimeout(() => {
deleteFileByID(item.id)
}, 1000)