数据列表查询对接完成

This commit is contained in:
2025-05-30 18:20:19 +08:00
parent d292dcfccf
commit c169d718c5
6 changed files with 215 additions and 58 deletions
+2 -2
View File
@@ -177,7 +177,7 @@ export async function getContractTemplates(searchParams: TemplateSearchParams =
// 构建查询参数
const params: PostgrestParams = {
select: 'id,template_code,title,category_id,description,file_format,is_featured,created_at,updated_at,contract_categories(id,name,icon)',
select: 'id,template_code,title,category_id,description,file_path,file_format,is_featured,created_at,updated_at,pdf_file_path,contract_categories(id,name,icon,description)',
limit: pageSize,
offset: (page - 1) * pageSize,
order: `${sortBy}.${sortOrder}`
@@ -303,7 +303,7 @@ export async function getContractTemplate(id: string | number) {
export async function getFeaturedTemplates(limit: number = 6) {
try {
const params: PostgrestParams = {
select: 'id,template_code,title,category_id,description,file_format,is_featured,created_at,updated_at,contract_categories(id,name,icon)',
select: 'id,template_code,title,category_id,description,file_path,file_format,is_featured,created_at,updated_at,pdf_file_path,contract_categories(id,name,icon,description)',
filter: { 'is_featured': 'eq.true' },
order: 'updated_at.desc',
limit