完成素材云列表添加历史功能
This commit is contained in:
+112
-112
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-CyfX-OBY.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-DscF86oa.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-eLRg4pQk.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Button, Table, Tag, Modal, Select, App, Input, Pagination, Typography } from 'antd';
|
||||
import { Button, Table, Tag, Modal, Select, App, Input, Pagination, Typography, Space } from 'antd';
|
||||
import { PlusOutlined, LockOutlined } from '@ant-design/icons';
|
||||
import { getOAuthList, requestOAuth, getOpenTypeAll } from '../api';
|
||||
|
||||
@@ -151,13 +151,13 @@ const AuthorizationPage: React.FC = () => {
|
||||
},
|
||||
{
|
||||
title: '授权账户ID',
|
||||
dataIndex: 'accountId',
|
||||
key: 'accountId',
|
||||
dataIndex: 'advertiserId',
|
||||
key: 'advertiserId',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '授权账户名称',
|
||||
dataIndex: 'accountName',
|
||||
dataIndex: 'advertiserName',
|
||||
key: 'accountName',
|
||||
},
|
||||
{
|
||||
@@ -247,6 +247,19 @@ const AuthorizationPage: React.FC = () => {
|
||||
width: 160,
|
||||
render: (text: string) => <span style={{ color: '#64748b' }}>{formatDateTime(text)}</span>,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
width: 140,
|
||||
render: (text: string) => (
|
||||
<Space>
|
||||
<Button type="primary" size="small" >
|
||||
查看授权账户
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const tableData = authorizations.map((item, index) => ({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user