1
0
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:
源文雨
2023-03-15 17:28:11 +08:00
parent 513680bdb1
commit 6e49173b12
7 changed files with 122 additions and 98 deletions

View 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 } })
}

View File

@@ -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
}

View File

@@ -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 } })
}