mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-09 02:01:31 +08:00
front: finish docx & back: init
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { defHttp } from '/@/utils/http/axios'
|
||||
import { getFileListModel, FilePercent, DelFile, AnalyzeFile } from './model/fileListModel'
|
||||
import { DownloadFile } from './model/fileModel'
|
||||
|
||||
enum Api {
|
||||
GetFileList = '/getFileList',
|
||||
GetFilePercent = '/getFilePercent',
|
||||
DelFile = '/delFile',
|
||||
AnalyzeFile = '/analyzeFile',
|
||||
DlFile = '/dlFile',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,3 +37,10 @@ export const delFile = (id: number) => {
|
||||
export const analyzeFile = (id: number) => {
|
||||
return defHttp.get<AnalyzeFile>({ url: Api.AnalyzeFile, params: { id: id } })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Download file
|
||||
*/
|
||||
export const downloadFile = (id: number) => {
|
||||
return defHttp.get<DownloadFile>({ url: Api.DlFile, params: { id: id } })
|
||||
}
|
||||
|
||||
3
frontend/vben/src/api/page/model/fileModel.ts
Normal file
3
frontend/vben/src/api/page/model/fileModel.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface DownloadFile {
|
||||
url: string
|
||||
}
|
||||
Reference in New Issue
Block a user