feat: 1. 完善起草合同页面的逻辑交互,对接minio的接口操作
This commit is contained in:
@@ -497,7 +497,7 @@ export async function getTodayDocuments(
|
||||
}
|
||||
|
||||
// console.log('发送请求参数:', params);
|
||||
const response = await postgrestGet<Document[]>('documents', { ...params, token });
|
||||
const response = await postgrestGet<Document[]>('/api/postgrest/proxy/documents', { ...params, token });
|
||||
// console.log('API 响应:', response);
|
||||
|
||||
if (response.error) {
|
||||
@@ -552,7 +552,7 @@ export async function getDocumentTypes(token?: string): Promise<{data: DocumentT
|
||||
}
|
||||
// 如果没有 documentTypeIds,返回所有文档类型(不添加过滤条件)
|
||||
|
||||
const response = await postgrestGet<DocumentType[]>('document_types', { ...params, token });
|
||||
const response = await postgrestGet<DocumentType[]>('/api/postgrest/proxy/ocument_types', { ...params, token });
|
||||
|
||||
if (response.error) {
|
||||
return { error: response.error, status: response.status };
|
||||
@@ -600,7 +600,7 @@ export async function getDocumentsStatus(
|
||||
'id': `in.(${documentIds.join(',')})`
|
||||
}
|
||||
};
|
||||
documentsResponse = await postgrestGet<Document[]>('documents', { ...documentsParams, token });
|
||||
documentsResponse = await postgrestGet<Document[]>('/api/postgrest/proxy/documents', { ...documentsParams, token });
|
||||
}
|
||||
|
||||
// 查询合同附件状态
|
||||
@@ -613,7 +613,7 @@ export async function getDocumentsStatus(
|
||||
'id': `in.(${attachmentIds.join(',')})`
|
||||
}
|
||||
};
|
||||
attachmentResponse = await postgrestGet<ContractStructureComparison[]>('contract_structure_comparison', { ...attachmentParams, token });
|
||||
attachmentResponse = await postgrestGet<ContractStructureComparison[]>('/api/postgrest/proxy/contract_structure_comparison', { ...attachmentParams, token });
|
||||
}
|
||||
|
||||
if (documentsResponse.error && attachmentResponse.error) {
|
||||
|
||||
Reference in New Issue
Block a user