1
This commit is contained in:
@@ -500,7 +500,7 @@ export async function createOauthApp(data: {
|
||||
app_id: string;
|
||||
secret: string;
|
||||
open_type: number;
|
||||
count?: number;
|
||||
max_count?: number;
|
||||
auth_url?: string;
|
||||
company?: string;
|
||||
}): Promise<any> {
|
||||
@@ -945,3 +945,55 @@ export async function regenerateHomeMaterialWatermark(id: string, payload: HomeM
|
||||
export async function deleteHomeMaterialAsset(id: string): Promise<void> {
|
||||
await api.delete(`/admin/home-material/assets/${id}`);
|
||||
}
|
||||
|
||||
export interface OAuthAccountParams {
|
||||
id?: string;
|
||||
phone?: string;
|
||||
account_id?: string;
|
||||
account_userid?: string;
|
||||
created_at?: [string, string];
|
||||
appid?: string;
|
||||
open_type?: number;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
}
|
||||
export async function getOAuthAccountList(params: OAuthAccountParams): Promise<any> {
|
||||
const query = new URLSearchParams();
|
||||
if (params.id) query.set('id', params.id);
|
||||
if (params.phone) query.set('phone', params.phone);
|
||||
if (params.account_id) query.set('account_id', params.account_id);
|
||||
if (params.account_userid) query.set('account_userid', params.account_userid);
|
||||
if (params.created_at !== undefined) query.set('created_at', params.created_at[0] + ',' + params.created_at[1]);
|
||||
if (params.appid) query.set('appid', params.appid);
|
||||
if (params.open_type !== undefined) query.set('open_type', String(params.open_type));
|
||||
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(`/material-admin/oauth-list?${query.toString()}`);
|
||||
}
|
||||
|
||||
export interface MaterialListParams {
|
||||
id?: string;
|
||||
phone?: string;
|
||||
resource_type?: string;
|
||||
advertiser_id?: string;
|
||||
material_id?: string;
|
||||
upload_id?: string;
|
||||
created_at?: [string, string];
|
||||
status?: string;
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
}
|
||||
export async function getMaterialList(params: MaterialListParams): Promise<any> {
|
||||
const query = new URLSearchParams();
|
||||
if (params.id) query.set('id', params.id);
|
||||
if (params.phone) query.set('phone', params.phone);
|
||||
if (params.resource_type) query.set('resource_type', params.resource_type);
|
||||
if (params.advertiser_id) query.set('advertiser_id', params.advertiser_id);
|
||||
if (params.material_id) query.set('material_id', params.material_id);
|
||||
if (params.upload_id) query.set('upload_id', params.upload_id);
|
||||
if (params.created_at !== undefined) query.set('created_at', params.created_at[0] + ',' + params.created_at[1]);
|
||||
if (params.status) query.set('status', params.status);
|
||||
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(`/material-admin/material-list?${query.toString()}`);
|
||||
}
|
||||
Reference in New Issue
Block a user