文件上传下载修正
This commit is contained in:
@@ -80,14 +80,19 @@ export const aiKnowledgeAPI = {
|
||||
// ====================== 文件管理 ======================
|
||||
|
||||
/**
|
||||
* 获取知识库文档列表
|
||||
* 获取知识库文档列表(查询本地数据库文件)
|
||||
* @param knowledgeId 知识库ID
|
||||
* @param page 页码
|
||||
* @param limit 每页条数
|
||||
* @param pageSize 每页条数
|
||||
*/
|
||||
async getDocumentList(knowledgeId: string, page = 1, limit = 20): Promise<ResultDomain<Record<string, any>>> {
|
||||
const response = await api.get<Record<string, any>>(`${this.baseUrl}/${knowledgeId}/documents`, {
|
||||
params: { page, limit }
|
||||
async getDocumentList(knowledgeId: string, page = 1, pageSize = 20): Promise<ResultDomain<any>> {
|
||||
const response = await api.post<any>(`${this.baseUrl}/${knowledgeId}/documents`, {
|
||||
filter: { knowledgeId },
|
||||
pageParam: {
|
||||
page,
|
||||
pageSize,
|
||||
total: 0
|
||||
}
|
||||
})
|
||||
return response.data
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import { api } from '@/api/index'
|
||||
import { BatchFileUploadParam, FileUploadParam, ResultDomain, TbSysFileDTO } from '@/types';
|
||||
|
||||
export const fileAPI = {
|
||||
baseUrl: "/file",
|
||||
baseUrl: "/urban-lifeline/file",
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
|
||||
Reference in New Issue
Block a user