mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-10 19:10:25 +08:00
finish filelist progress
This commit is contained in:
21
frontend/vben/src/api/page/index.ts
Normal file
21
frontend/vben/src/api/page/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defHttp } from '/@/utils/http/axios'
|
||||
import { getFileListModel, FilePercent } from './model/fileListModel'
|
||||
|
||||
enum Api {
|
||||
GetFileList = '/getFileList',
|
||||
GetFilePercent = '/getFilePercent',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Get file list
|
||||
*/
|
||||
export const getFileList = (count?: number) => {
|
||||
return defHttp.get<getFileListModel>({ url: Api.GetFileList, params: { count: count } })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Get file percant
|
||||
*/
|
||||
export const getFilePercent = (id: number) => {
|
||||
return defHttp.get<FilePercent>({ url: Api.GetFilePercent, params: { id: id } })
|
||||
}
|
||||
@@ -1,13 +1,19 @@
|
||||
export interface FileListGroupItem {
|
||||
id: number
|
||||
title: string
|
||||
icon: string
|
||||
color: string
|
||||
desc: string
|
||||
date: string
|
||||
group: string
|
||||
description: string
|
||||
size: number
|
||||
questions: number
|
||||
author: string
|
||||
datetime: string
|
||||
percent: number
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Get filelist return value
|
||||
*/
|
||||
export type getFileListModel = FileListGroupItem[]
|
||||
|
||||
export interface FilePercent {
|
||||
percent: number
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { defHttp } from '/@/utils/http/axios'
|
||||
import { getFileListModel } from './model/fileListModel'
|
||||
|
||||
enum Api {
|
||||
GetFileList = '/getFileList',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: Get file list
|
||||
*/
|
||||
|
||||
export const getFileList = (count: number) => {
|
||||
return defHttp.get<getFileListModel>({ url: Api.GetFileList, params: { count: count } })
|
||||
}
|
||||
Reference in New Issue
Block a user