1
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<script type="module" crossorigin src="/assets/index-oaHVVvP0.js"></script>
|
<script type="module" crossorigin src="/assets/index-BpU4LxvO.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -10,16 +10,16 @@ import { formatDate } from '../utils/formatDate';
|
|||||||
|
|
||||||
interface OAuthApp {
|
interface OAuthApp {
|
||||||
id: string;
|
id: string;
|
||||||
appId: string;
|
app_id: string;
|
||||||
secret: string;
|
secret: string;
|
||||||
status: number;
|
status: number;
|
||||||
count: number;
|
max_count: number;
|
||||||
openType: number;
|
open_type: number;
|
||||||
authUrl?: string;
|
auth_url?: string;
|
||||||
company?: string;
|
company?: string;
|
||||||
createBy: string;
|
create_by: string;
|
||||||
createdAt: string;
|
created_at: string;
|
||||||
updatedAt: string;
|
updated_at: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AdminOauthAppList: React.FC = () => {
|
const AdminOauthAppList: React.FC = () => {
|
||||||
@@ -82,11 +82,11 @@ const AdminOauthAppList: React.FC = () => {
|
|||||||
const app = await getOauthApp(id);
|
const app = await getOauthApp(id);
|
||||||
setCurrentApp(app);
|
setCurrentApp(app);
|
||||||
updateForm.setFieldsValue({
|
updateForm.setFieldsValue({
|
||||||
app_id: app.appId,
|
app_id: app.app_id,
|
||||||
secret: app.secret,
|
secret: app.secret,
|
||||||
open_type: app.openType,
|
open_type: app.open_type,
|
||||||
count: app.count,
|
count: app.max_count,
|
||||||
auth_url: app.authUrl,
|
auth_url: app.auth_url,
|
||||||
company: app.company,
|
company: app.company,
|
||||||
});
|
});
|
||||||
setUpdateModalVisible(true);
|
setUpdateModalVisible(true);
|
||||||
@@ -140,13 +140,13 @@ const AdminOauthAppList: React.FC = () => {
|
|||||||
{ title: 'ID', dataIndex: 'id',
|
{ title: 'ID', dataIndex: 'id',
|
||||||
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '应用ID', dataIndex: 'appId',
|
{ title: '应用ID', dataIndex: 'app_id',
|
||||||
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '应用密钥', dataIndex: 'secret',
|
{ title: '应用密钥', dataIndex: 'secret',
|
||||||
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '开户方式', dataIndex: 'openType',
|
{ title: '开户方式', dataIndex: 'open_type',
|
||||||
render: (v: number) => {
|
render: (v: number) => {
|
||||||
const typeMap: Record<number, string> = {
|
const typeMap: Record<number, string> = {
|
||||||
1: '千川', 2: '广告', 3: '本地推', 4: '星图', 5: '快手代理商',
|
1: '千川', 2: '广告', 3: '本地推', 4: '星图', 5: '快手代理商',
|
||||||
@@ -158,23 +158,22 @@ const AdminOauthAppList: React.FC = () => {
|
|||||||
{ title: '归属公司', dataIndex: 'company',
|
{ title: '归属公司', dataIndex: 'company',
|
||||||
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
||||||
},
|
},
|
||||||
|
{ title: '授权次数', dataIndex: 'max_count',
|
||||||
{ title: '授权次数', dataIndex: 'count',
|
|
||||||
render: (v: number) => <Typography.Text>{v}</Typography.Text>,
|
render: (v: number) => <Typography.Text>{v}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '状态', dataIndex: 'status',
|
{ title: '状态', dataIndex: 'status',
|
||||||
render: (v: number) => <Tag color={v === 1 ? 'green' : 'red'}>{v === 1 ? '正常' : '禁用'}</Tag>,
|
render: (v: number) => <Tag color={v === 1 ? 'green' : 'red'}>{v === 1 ? '正常' : '禁用'}</Tag>,
|
||||||
},
|
},
|
||||||
{ title: '授权URL', dataIndex: 'authUrl',
|
{ title: '授权URL', dataIndex: 'auth_url',
|
||||||
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
|
||||||
},
|
|
||||||
{ title: '创建人', dataIndex: 'createBy',
|
|
||||||
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '创建时间', dataIndex: 'createdAt',
|
{ title: '创建人', dataIndex: 'create_by',
|
||||||
|
render: (v: string) => <Typography.Text>{v}</Typography.Text>,
|
||||||
|
},
|
||||||
|
{ title: '创建时间', dataIndex: 'created_at',
|
||||||
render: (v: string) => <Typography.Text>{formatDate(v)}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{formatDate(v)}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '更新时间', dataIndex: 'updatedAt',
|
{ title: '更新时间', dataIndex: 'updated_at',
|
||||||
render: (v: string) => <Typography.Text>{formatDate(v)}</Typography.Text>,
|
render: (v: string) => <Typography.Text>{formatDate(v)}</Typography.Text>,
|
||||||
},
|
},
|
||||||
{ title: '操作',
|
{ title: '操作',
|
||||||
@@ -312,22 +311,22 @@ const AdminOauthAppList: React.FC = () => {
|
|||||||
{currentApp && (
|
{currentApp && (
|
||||||
<div style={{ lineHeight: '2' }}>
|
<div style={{ lineHeight: '2' }}>
|
||||||
<p><strong>ID:</strong> {currentApp.id}</p>
|
<p><strong>ID:</strong> {currentApp.id}</p>
|
||||||
<p><strong>应用ID:</strong> {currentApp.appId}</p>
|
<p><strong>应用ID:</strong> {currentApp.app_id}</p>
|
||||||
<p><strong>应用密钥:</strong> {currentApp.secret}</p>
|
<p><strong>应用密钥:</strong> {currentApp.secret}</p>
|
||||||
<p><strong>开户方式:</strong> {(() => {
|
<p><strong>开户方式:</strong> {(() => {
|
||||||
const typeMap: Record<number, string> = {
|
const typeMap: Record<number, string> = {
|
||||||
1: '千川', 2: '广告', 3: '本地推', 4: '星图', 5: '快手代理商',
|
1: '千川', 2: '广告', 3: '本地推', 4: '星图', 5: '快手代理商',
|
||||||
6: '巨量星图', 7: '巨量服务单', 8: '腾讯服务单', 9: '腾讯营销K2', 10: '腾讯营销K3'
|
6: '巨量星图', 7: '巨量服务单', 8: '腾讯服务单', 9: '腾讯营销K2', 10: '腾讯营销K3'
|
||||||
};
|
};
|
||||||
return typeMap[currentApp.openType] || currentApp.openType;
|
return typeMap[currentApp.open_type] || currentApp.open_type;
|
||||||
})()}</p>
|
})()}</p>
|
||||||
<p><strong>归属公司:</strong> {currentApp.company || '-'}</p>
|
<p><strong>归属公司:</strong> {currentApp.company || '-'}</p>
|
||||||
<p><strong>授权次数:</strong> {currentApp.count}</p>
|
<p><strong>授权次数:</strong> {currentApp.max_count}</p>
|
||||||
<p><strong>状态:</strong> {currentApp.status === 1 ? '正常' : '禁用'}</p>
|
<p><strong>状态:</strong> {currentApp.status === 1 ? '正常' : '禁用'}</p>
|
||||||
<p><strong>授权URL:</strong> {currentApp.authUrl || '-'}</p>
|
<p><strong>授权URL:</strong> {currentApp.auth_url || '-'}</p>
|
||||||
<p><strong>创建人:</strong> {currentApp.createBy}</p>
|
<p><strong>创建人:</strong> {currentApp.create_by}</p>
|
||||||
<p><strong>创建时间:</strong> {formatDate(currentApp.createdAt)}</p>
|
<p><strong>创建时间:</strong> {formatDate(currentApp.created_at)}</p>
|
||||||
<p><strong>更新时间:</strong> {formatDate(currentApp.updatedAt)}</p>
|
<p><strong>更新时间:</strong> {formatDate(currentApp.updated_at)}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user