素材列表添加多选功能
This commit is contained in:
@@ -449,53 +449,45 @@ export async function getOAuthList(params: OAuthListParams): Promise<any> {
|
||||
}
|
||||
|
||||
// 前测模板列表
|
||||
// /api/pre-test-template/list
|
||||
export interface PreTestListParams {
|
||||
platform?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export async function getPreTestList(params?: PreTestListParams): Promise<any> {
|
||||
if (USE_MOCK) return mock.mockGetPreTestList(params);
|
||||
const page = params?.page || 1;
|
||||
const pageSize = Math.min(params?.pageSize || 10, 100);
|
||||
return api.get(`/pre-test-template/list?page=${page}&page_size=${pageSize}`);
|
||||
const query = new URLSearchParams();
|
||||
if (params.platform) query.set('platform', params.platform);
|
||||
if (params.page !== undefined) query.set('page', String(params.page));
|
||||
if (params.pageSize !== undefined) query.set('page_size', String(params.pageSize));
|
||||
return api.get(`/pre-test-template/list?${query.toString()}`);
|
||||
}
|
||||
|
||||
// 获取前测字段列表
|
||||
// /api/pre-test-template/fields
|
||||
export async function getPreTestFields(): Promise<any> {
|
||||
if (USE_MOCK) return mock.mockGetPreTestFields();
|
||||
return api.get(`/pre-test-template/fields`);
|
||||
}
|
||||
|
||||
// 创建前测模板
|
||||
// /api/pre-test-template/create
|
||||
export async function createPreTest(params: any): Promise<any> {
|
||||
if (USE_MOCK) return mock.mockCreatePreTest(params);
|
||||
return api.post(`/pre-test-template/create`, params);
|
||||
}
|
||||
|
||||
// 前测模板详情
|
||||
// /api/pre-test-template/select/{template_id}
|
||||
export async function getPreTestDetail(templateId: string): Promise<any> {
|
||||
return api.get(`/pre-test-template/select/${templateId}`);
|
||||
}
|
||||
|
||||
// 更新前测模板
|
||||
// /api/pre-test-template/update/{template_id}
|
||||
export async function updatePreTest(templateId: string, params: any): Promise<any> {
|
||||
return api.post(`/pre-test-template/update/${templateId}`, params);
|
||||
}
|
||||
|
||||
// 删除前测模板
|
||||
// /api/pre-test-template/delete/{template_id}
|
||||
export async function deletePreTest(templateId: string): Promise<any> {
|
||||
return api.get(`/pre-test-template/delete/${templateId}`);
|
||||
}
|
||||
|
||||
// 获取默认前测模板
|
||||
// /api/pre-test-template/default
|
||||
export async function getDefaultPreTest(): Promise<any> {
|
||||
return api.get(`/pre-test-template/default`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user