diff --git a/web/frontend/src/App.tsx b/web/frontend/src/App.tsx
index 6cc1ab8..7c61d3b 100644
--- a/web/frontend/src/App.tsx
+++ b/web/frontend/src/App.tsx
@@ -20,7 +20,7 @@ const PlatformFulfillmentPage = lazy(() => import('./pages/PlatformFulfillmentPa
const AutomationPage = lazy(() => import('./pages/AutomationPage'));
const UsersPage = lazy(() => import('./pages/UsersPage'));
const CookiePage = lazy(() => import('./pages/CookiePage'));
-const DouyuTasksPage = lazy(() => import('./pages/DouyuTasksPage'));
+const DouyuWorkbenchPage = lazy(() => import('./pages/DouyuWorkbenchPage'));
const DouyuCollabPage = lazy(() => import('./pages/DouyuCollabPage'));
const HuyaAccountsPage = lazy(() => import('./pages/HuyaAccountsPage'));
const HuyaAssignmentsPage = lazy(() => import('./pages/HuyaAssignmentsPage'));
@@ -93,10 +93,12 @@ function AppContent() {
)} />
)} />
)} />
- } />
- )} />
- )} />
- )} />
+ } />
+ } />
+ )} />
+ } />
+ } />
+ } />
)} />
)} />
)} />
diff --git a/web/frontend/src/layouts/MainLayout.tsx b/web/frontend/src/layouts/MainLayout.tsx
index 5637c13..ba1b529 100644
--- a/web/frontend/src/layouts/MainLayout.tsx
+++ b/web/frontend/src/layouts/MainLayout.tsx
@@ -6,7 +6,7 @@ import {
CloudServerOutlined, TeamOutlined, ApiOutlined, KeyOutlined,
MenuFoldOutlined, MenuUnfoldOutlined, SwapOutlined,
SunOutlined, MoonOutlined, DesktopOutlined, GiftOutlined, ApartmentOutlined, MobileOutlined, ShoppingCartOutlined,
- BookOutlined, TrophyOutlined, ShopOutlined, GlobalOutlined,
+ BookOutlined, GlobalOutlined,
SafetyCertificateOutlined, FileSearchOutlined, RobotOutlined, FileExcelOutlined, ThunderboltOutlined,
} from '@ant-design/icons';
import { useNavigate, useLocation, Outlet } from 'react-router-dom';
@@ -78,9 +78,7 @@ export default function MainLayout({ onLogout }: { onLogout?: () => void }) {
douyuItems.push({ key: '/automation', label: '斗鱼自动化', icon: });
}
if (can('douyu:task')) {
- douyuItems.push({ key: '/douyu/elite', label: '精英宝典', icon: });
- douyuItems.push({ key: '/douyu/esports', label: '电竞手册', icon: });
- douyuItems.push({ key: '/douyu/peace', label: '和平小店', icon: });
+ douyuItems.push({ key: '/douyu/workbench', label: '斗鱼总工作台', icon: });
}
// 外部单协作:权限独立,客服没有 douyu:task 也要能进共享台账。
diff --git a/web/frontend/src/pages/DouyuTasksPage.tsx b/web/frontend/src/pages/DouyuTasksPage.tsx
deleted file mode 100644
index 5d4502d..0000000
--- a/web/frontend/src/pages/DouyuTasksPage.tsx
+++ /dev/null
@@ -1,2 +0,0 @@
-export { default } from './douyu-tasks/DouyuTasksPage';
-export type { HandbookKind } from './douyu-tasks/config';
diff --git a/web/frontend/src/pages/DouyuWorkbenchPage.tsx b/web/frontend/src/pages/DouyuWorkbenchPage.tsx
new file mode 100644
index 0000000..f22625e
--- /dev/null
+++ b/web/frontend/src/pages/DouyuWorkbenchPage.tsx
@@ -0,0 +1,140 @@
+import { useEffect } from 'react';
+import { Tabs, Typography } from 'antd';
+import {
+ BookOutlined,
+ ShopOutlined,
+ TrophyOutlined,
+} from '@ant-design/icons';
+import { useSearchParams } from 'react-router-dom';
+
+import DouyuTasksPage from './douyu-tasks/DouyuTasksPage';
+import type { HandbookKind } from './douyu-tasks/config';
+
+const { Text } = Typography;
+
+const ACTIVE_HANDBOOK_STORAGE_KEY = 'douyu_workbench_active_handbook';
+const DEFAULT_HANDBOOK: HandbookKind = 'elite';
+
+const WORKBENCH_TABS: Array<{
+ key: HandbookKind;
+ label: React.ReactNode;
+}> = [
+ {
+ key: 'elite',
+ label: (
+ <>
+
+ 精英宝典
+ >
+ ),
+ },
+ {
+ key: 'esports',
+ label: (
+ <>
+
+ 电竞手册
+ >
+ ),
+ },
+ {
+ key: 'peace',
+ label: (
+ <>
+
+ 和平小店
+ >
+ ),
+ },
+];
+
+function normalizeHandbook(value: string | null): HandbookKind | null {
+ if (value === 'elite' || value === 'esports' || value === 'peace') {
+ return value;
+ }
+ return null;
+}
+
+function readStoredHandbook(): HandbookKind {
+ try {
+ return normalizeHandbook(localStorage.getItem(ACTIVE_HANDBOOK_STORAGE_KEY))
+ || DEFAULT_HANDBOOK;
+ } catch {
+ return DEFAULT_HANDBOOK;
+ }
+}
+
+export default function DouyuWorkbenchPage() {
+ const [searchParams, setSearchParams] = useSearchParams();
+ const activeHandbook =
+ normalizeHandbook(searchParams.get('tab')) || readStoredHandbook();
+
+ useEffect(() => {
+ try {
+ localStorage.setItem(ACTIVE_HANDBOOK_STORAGE_KEY, activeHandbook);
+ } catch {
+ // 隐私模式下仍允许本次页面内切换。
+ }
+ }, [activeHandbook]);
+
+ const changeHandbook = (key: string) => {
+ const next = normalizeHandbook(key);
+ if (!next) return;
+ const params = new URLSearchParams(searchParams);
+ params.set('tab', next);
+ setSearchParams(params, { replace: true });
+ };
+
+ return (
+
+
+
+
斗鱼总工作台
+ 统一处理精英宝典、电竞手册与和平小店任务
+
+
({
+ key: tab.key,
+ label: tab.label,
+ children: ,
+ }))}
+ />
+
+ );
+}
diff --git a/web/frontend/src/pages/douyu-tasks/DouyuTasksPage.tsx b/web/frontend/src/pages/douyu-tasks/DouyuTasksPage.tsx
index aa982cd..85db3de 100644
--- a/web/frontend/src/pages/douyu-tasks/DouyuTasksPage.tsx
+++ b/web/frontend/src/pages/douyu-tasks/DouyuTasksPage.tsx
@@ -196,7 +196,13 @@ function BindStatusTag({ status, label }: { status?: string; label?: string }) {
return {label || status};
}
-export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind }) {
+export default function DouyuTasksPage({
+ handbook,
+ showTitle = true,
+}: {
+ handbook: HandbookKind;
+ showTitle?: boolean;
+}) {
const isPeaceHandbook = handbook === 'peace';
const isEsportsHandbook = handbook === 'esports';
const isEliteHandbook = handbook === 'elite';
@@ -2914,7 +2920,7 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
{/* 头部 */}
-
{handbookTitle}
+ {showTitle ? {handbookTitle}
: null}
{handbookDescription}