修改素材云批量上传
This commit is contained in:
@@ -577,4 +577,35 @@ export async function getArea(params?: GetAreaParams): Promise<any> {
|
||||
if (params?.parent_code) query.set('parent_code', params.parent_code);
|
||||
return api.get(`/pre-test-template/getArea?${query.toString()}`);
|
||||
}
|
||||
//
|
||||
|
||||
// ── Upload Material ───────────────────────────────────────
|
||||
|
||||
export interface AsyncBatchUploadTask {
|
||||
advertiser_ids: string[];
|
||||
resource_ids: string[];
|
||||
oauth_id: string;
|
||||
}
|
||||
|
||||
export interface AsyncBatchUploadParams {
|
||||
tasks: AsyncBatchUploadTask[];
|
||||
}
|
||||
|
||||
export async function asyncBatchUploadMaterial(params: AsyncBatchUploadParams): Promise<any> {
|
||||
return api.post('/upload-material/async-batch-upload', params);
|
||||
}
|
||||
|
||||
// 获取上传历史
|
||||
// /api/upload-material/upload-history
|
||||
export interface UploadHistoryParams {
|
||||
status?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
export async function getUploadHistory(params: UploadHistoryParams): Promise<any> {
|
||||
const searchParams = new URLSearchParams();
|
||||
if (params.status) searchParams.set('status', params.status);
|
||||
if (params.page) searchParams.set('page', String(params.page));
|
||||
if (params.pageSize) searchParams.set('page_size', String(params.pageSize));
|
||||
const query = searchParams.toString();
|
||||
return api.get(`/upload-material/upload-history${query ? `?${query}` : ''}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user