refactor(douyu): 完成阶段5旧链路清理

This commit is contained in:
yml
2026-11-22 21:40:53 +08:00
parent 94de1d167b
commit 5393b668e0
20 changed files with 155 additions and 559 deletions
@@ -414,10 +414,10 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
return map;
}, [isEsportsHandbook, tasks]);
const latestLimitedGoodsTaskByAccount = useMemo(() => {
const latestOverviewTaskByAccount = useMemo(() => {
const map = new Map<number, DouyuTaskItem>();
for (const task of tasks) {
if (task.task_type !== 'query_limited_goods') continue;
if (task.task_type !== 'query_account_overview') continue;
if (!['success', 'failed', 'error'].includes(task.status)) continue;
const previous = map.get(task.account_id);
if (!previous || task.id > previous.id) map.set(task.account_id, task);
@@ -1786,7 +1786,7 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
{
title: '限制兑换', dataIndex: 'exchange_balance', width: 160, ellipsis: true,
render: (_, record) => {
const latestLimitedTask = latestLimitedGoodsTaskByAccount.get(record.id);
const latestLimitedTask = latestOverviewTaskByAccount.get(record.id);
const text = limitedGoodsTaskText(latestLimitedTask);
if (!text) return <Text type="secondary">未查</Text>;
if (latestLimitedTask?.status !== 'success') {
@@ -2479,7 +2479,6 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
style={{ width: '100%' }}
/>
<div style={actionGridStyle}>
{renderActionButton('refresh_goods')}
{renderActionButton('lock_goods')}
{renderActionButton('exchange_goods', 'primary')}
</div>
@@ -45,7 +45,6 @@ export const ELITE_QUICK_ACTIONS = [
{ key: 'query_points', icon: <SearchOutlined /> },
{ key: 'query_game_name', icon: <SearchOutlined /> },
{ key: 'query_change_bind_time', icon: <FieldTimeOutlined /> },
{ key: 'query_limited_goods', icon: <SearchOutlined /> },
{ key: 'query_gold_balance', icon: <SearchOutlined /> },
{ key: 'lock_goods', icon: <ShoppingOutlined /> },
{ key: 'exchange_goods', icon: <ShoppingOutlined /> },
@@ -59,7 +58,6 @@ export const ESPORTS_QUICK_ACTIONS = [
{ key: 'create_esports_qr', icon: <CreditCardOutlined /> },
{ key: 'query_esports_points', icon: <SearchOutlined /> },
{ key: 'query_change_bind_time', icon: <FieldTimeOutlined /> },
{ key: 'query_limited_goods', icon: <SearchOutlined /> },
{ key: 'query_gold_balance', icon: <SearchOutlined /> },
{ key: 'refresh_esports_goods', icon: <ReloadOutlined /> },
{ key: 'exchange_esports_goods', icon: <ShoppingOutlined /> },
@@ -93,9 +91,7 @@ export const ELITE_TASK_TYPES = new Set([
'exchange_goods',
'query_game_name',
'query_change_bind_time',
'query_limited_goods',
'query_gold_balance',
'refresh_goods',
'query_exchange_records',
'prefetch_csrf_token',
'query_account_overview',
@@ -109,7 +105,6 @@ export const ESPORTS_TASK_TYPES = new Set([
'query_esports_points',
'query_gold_balance',
'query_change_bind_time',
'query_limited_goods',
'refresh_esports_goods',
'exchange_esports_goods',
'create_gold_qr',