1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-18 00:40: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

@@ -70,7 +70,7 @@ export default [
})
},
},*/
{
/*{
url: '/api/delFile',
timeout: 200,
method: 'get',
@@ -84,7 +84,7 @@ export default [
msg: '已成功删除文件' + id + '.',
})
},
},
},*/
/*{
url: '/api/analyzeFile',
timeout: 1000,

View File

@@ -29,7 +29,6 @@
"test:gzip": "npx http-server dist --cors --gzip -c-1",
"test:br": "npx http-server dist --cors --brotli -c-1",
"reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && pnpm run bootstrap",
"prepare": "husky install",
"gen:icon": "esno ./build/generate/icon/index.ts"
},
"dependencies": {
@@ -108,7 +107,6 @@
"eslint-plugin-vue": "^8.6.0",
"esno": "^0.14.1",
"fs-extra": "^10.1.0",
"husky": "^7.0.4",
"inquirer": "^8.2.2",
"less": "^4.1.2",
"lint-staged": "12.3.7",

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)

View File

@@ -5174,11 +5174,6 @@
"resolved" "https://registry.npmmirror.com/human-signals/-/human-signals-2.1.0.tgz"
"version" "2.1.0"
"husky@^7.0.4":
"integrity" "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ=="
"resolved" "https://registry.npmmirror.com/husky/-/husky-7.0.4.tgz"
"version" "7.0.4"
"iconv-lite@^0.4.24":
"integrity" "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="
"resolved" "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz"