完成素材云列表添加历史功能

This commit is contained in:
Lrd
2026-06-26 18:03:55 +08:00
parent 6120e03183
commit b26b9e6af1
6 changed files with 2736 additions and 395 deletions
+32 -1
View File
@@ -701,6 +701,7 @@ export async function getResourcesMaterialList(params: ResourcesMaterialListPara
return api.get(`/resources-material/list?${query.toString()}`);
}
// 全部开户方式列表
export interface OpenTypeItem {
id: string;
openType: number;
@@ -708,7 +709,37 @@ export interface OpenTypeItem {
description: string;
thumb?: string;
}
export async function getOpenTypeAll(): Promise<{ data: OpenTypeItem[] }> {
return api.get('/open-type/open_type_all');
}
// 获取授权账户列表,支持按广告主ID、授权ID、广告账户名称筛选
export interface OAuthAccountParams {
advertiser_id: string;
oauth_id: string;
advertiser_name: string;
page?: number;
page_size?: number;
}
export async function getOAuthAccountList(params: OAuthAccountParams): Promise<any> {
const query = new URLSearchParams();
if (params.advertiser_id) query.set('advertiser_id', params.advertiser_id);
if (params.oauth_id) query.set('oauth_id', params.oauth_id);
if (params.advertiser_name) query.set('advertiser_name', params.advertiser_name);
if (params.page !== undefined) query.set('page', String(params.page));
if (params.page_size !== undefined) query.set('page_size', String(params.page_size));
return api.get(`/oauth-account/list?${query.toString()}`);
}
// 软删除授权账户
export interface DeleteOAuthAccountParams {
id: string;
}
export async function deleteOAuthAccount(params: DeleteOAuthAccountParams): Promise<any> {
const query = new URLSearchParams();
if (params.id) query.set('id', params.id);
return api.get(`/oauth-account/delete?${query.toString()}`);
}
// 获取用户全部授权账户列表
export async function getAllOAuthAccountList(): Promise<any> {
return api.post(`/upload-material/oauth_account_list`);
}