From db359955ed1b6d91f6c2662f6269f5701defbaf9 Mon Sep 17 00:00:00 2001 From: Blizzard Date: Fri, 6 Mar 2026 16:53:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/api/radio.ts | 4 + src/layouts/AdminLayout.tsx | 6 +- src/pages/Dashboard/index.tsx | 428 ++++++++++------ src/pages/Login/index.tsx | 298 ++++++++---- src/pages/Radio/Category/index.tsx | 207 ++++---- src/pages/Radio/Channel/index.tsx | 416 ++++++++-------- src/pages/Radio/Program/index.tsx | 751 ++++++++++++++--------------- src/router/index.tsx | 5 + vite.config.ts | 2 +- 10 files changed, 1140 insertions(+), 979 deletions(-) diff --git a/index.html b/index.html index 4975438..a2c590e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Good Morning + 全声汇 - 广播管理系统
diff --git a/src/api/radio.ts b/src/api/radio.ts index a356df0..31dca4c 100644 --- a/src/api/radio.ts +++ b/src/api/radio.ts @@ -24,3 +24,7 @@ export const deleteProgramApi = (data: { ids: (string | number)[] }) => request. export const getAllCategoryListApi = () => request.get('/radio/category/list'); export const getCategoryTreeApi = () => request.get('/radio/category/tree'); + +// --- VIP API --- +export const getVipConfigDetailApi = () => request.post('/vip/config/detail'); +export const updateVipConfigApi = (data: any) => request.post('/vip/config/update', data); diff --git a/src/layouts/AdminLayout.tsx b/src/layouts/AdminLayout.tsx index 9a919d7..a0fcb8f 100644 --- a/src/layouts/AdminLayout.tsx +++ b/src/layouts/AdminLayout.tsx @@ -9,7 +9,8 @@ import { FolderOpen, LogOut, User as UserIcon, - ChevronDown + ChevronDown, + Crown } from 'lucide-react'; import { Button } from '../components/ui/button'; import { @@ -48,6 +49,7 @@ export default function AdminLayout() { { name: '频道分类', path: '/radio/category', icon: ListMusic }, { name: '频道管理', path: '/radio/channel', icon: Mic2 }, { name: '节目管理', path: '/radio/program', icon: Disc3 }, + { name: 'VIP配置', path: '/radio/vip', icon: Crown }, { name: '文件管理', path: '/system/oss', icon: FolderOpen }, ]; @@ -60,7 +62,7 @@ export default function AdminLayout() { logo
- 早安和傍晚 + 全声汇 广播控制台
diff --git a/src/pages/Dashboard/index.tsx b/src/pages/Dashboard/index.tsx index 2adfa1d..0e56ff3 100644 --- a/src/pages/Dashboard/index.tsx +++ b/src/pages/Dashboard/index.tsx @@ -1,5 +1,4 @@ import { - Radio, ListMusic, Mic2, Disc3, @@ -9,7 +8,11 @@ import { ArrowUpRight, ArrowDownRight, Play, - Zap + Zap, + Crown, + Star, + Heart, + Flame } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '../../components/ui/card'; import { Button } from '../../components/ui/button'; @@ -21,28 +24,39 @@ import { YAxis, CartesianGrid, Tooltip, - ResponsiveContainer + ResponsiveContainer, + BarChart, + Bar, + Cell } from 'recharts'; const chartData = [ - { name: '06:00', morning: 400, evening: 240 }, - { name: '09:00', morning: 700, evening: 300 }, - { name: '12:00', morning: 600, evening: 450 }, - { name: '15:00', morning: 800, evening: 500 }, - { name: '18:00', morning: 500, evening: 900 }, - { name: '21:00', morning: 300, evening: 1200 }, - { name: '00:00', morning: 200, evening: 800 }, + { name: '06:00', morning: 400, evening: 240, active: 300 }, + { name: '09:00', morning: 700, evening: 300, active: 550 }, + { name: '12:00', morning: 600, evening: 450, active: 480 }, + { name: '15:00', morning: 800, evening: 500, active: 720 }, + { name: '18:00', morning: 500, evening: 900, active: 680 }, + { name: '21:00', morning: 300, evening: 1200, active: 850 }, + { name: '00:00', morning: 200, evening: 800, active: 400 }, +]; + +const categoryData = [ + { name: '流行', value: 400, color: '#D28F4F' }, + { name: '爵士', value: 300, color: '#A64452' }, + { name: '民谣', value: 200, color: '#E29A66' }, + { name: '古典', value: 278, color: '#8C7E6C' }, + { name: '电音', value: 189, color: '#4A3A2C' }, ]; export default function Dashboard() { const stats = [ { - name: '总分类数', + name: '核心类目', value: '12', icon: ListMusic, change: '+2', trend: 'up', - color: 'from-[#D28F4F] to-[#A64452]', + color: 'from-[#D28F4F] to-[#E29A66]', iconColor: 'text-[#D28F4F]' }, { @@ -51,17 +65,17 @@ export default function Dashboard() { icon: Mic2, change: '+5', trend: 'up', - color: 'from-[#6C5CE7] to-[#A64452]', - iconColor: 'text-[#6C5CE7]' + color: 'from-orange-400 to-rose-400', + iconColor: 'text-orange-500' }, { - name: '节目总数', + name: '声波单元', value: '3,284', icon: Disc3, change: '+124', trend: 'up', - color: 'from-[#D28F4F] to-[#E29A66]', - iconColor: 'text-[#D28F4F]' + color: 'from-[#A64452] to-[#D28F4F]', + iconColor: 'text-[#A64452]' }, { name: '订阅用户', @@ -75,111 +89,145 @@ export default function Dashboard() { ]; return ( -
+
+ {/* Header Section */} -
-

- 欢迎回来,管理员 - -

-

-

- +
+
+ + System Control Panel + +
+ {[1, 2, 3].map(i => ( +
+ +
+ ))}
- 系统运行良好。当前有 1,248 名听众正在共度美好时光。 +
+

+ 晨间灵感,
+ 全声汇 管理系统 +

+

+ + 当前有 1,248 位听众在不同时区的频道中共振,让声音温暖每一个瞬间。

-
-
- -
+ +
+
+
+ +
+
+
+ Network Status + 高带宽低延迟运行中 +
- 实时广播中 -
-
+ {/* Stats Grid */} +
{stats.map((stat, index) => ( - -
- - {stat.name} -
- + +
+ +
+
+
- - -
{stat.value}
-
-
- - {stat.trend === 'up' ? : } - {stat.change} - -
- 增长率 +
+ + {stat.trend === 'up' ? : } + {stat.change} +
- +
+ +
+

{stat.name}

+

{stat.value}

+
+ +
+
+ +
+
))}
-
+ {/* Main Content Sections */} +
+ {/* Large Chart Card */} - - -
- -
- + +
+ +
+
+
+
- 收听热度分布 - -

监测不同时段的声波流向与用户留存

-
-
-
-
- 晨间氛围 + 声波极化趋势
-
-
- 傍晚陪伴 +

实时捕捉全网音频流的活跃度与用户共鸣度

+
+
+
+
+
+ 晨间频率 +
+

1.2M

+
+
+
+
+ 傍晚余辉 +
+

0.8M

- -
+ +
- + - + - + - + { + if (active && payload && payload.length) { + return ( +
+

{label} WAVE REPORT

+
+
+
+
+ 晨间 +
+ {payload[0].value} +
+
+
+
+ 傍晚 +
+ {payload[1].value} +
+
+
+ ); + } + return null; }} /> @@ -224,64 +292,132 @@ export default function Dashboard() { + {/* Categories & Trending */} - - - -
- -
- 热门频道排行 -
-
- -
- {[1, 2, 3, 4, 5].map(i => ( -
-
-
- -
- -
-
-
-
-

爵士小镇 #{i}

- {i <= 3 && ( -
- )} -
-
- - - - -
-
-
-
-

{(1240 / i).toFixed(0)}

-

活跃度

-
-
- ))} + + +
+ + + 热门类目共振 + +
- +
+ + {categoryData.map((item, i) => ( +
+
+
+ 0{i + 1} + {item.name} +
+ {item.value} Units +
+
+ +
+ +
+
+ ))} + + +
+ + +
+
+ +
+

VIP 专属生态
特权升级方案

+

+ 通过精细化的会员等级与多维度的定价策略,构建高粘性的听众社群,深度发掘商业潜能。 +

+ +
+
+ + {/* Recent Activity Section */} + + + +
+ +
+ 实时播报流 + +

系统内所有频道的最新动态与播控反馈

+
+ + + +
+ {[1, 2, 3, 4].map((i) => ( +
+
+
+ +
+ +
+
+

城市森林:晨间漫步 0{i}

+
+ + + 爵士之声频道 + +
+ 12:34 PM +
+
+
+
+
+
+ + +1,248 +
+ New Listeners +
+ +
+
+ ))} +
+ + +
); } diff --git a/src/pages/Login/index.tsx b/src/pages/Login/index.tsx index 91c0473..67dab61 100644 --- a/src/pages/Login/index.tsx +++ b/src/pages/Login/index.tsx @@ -6,7 +6,7 @@ import { toast } from 'sonner'; import { Button } from '../../components/ui/button'; import { Input } from '../../components/ui/input'; import { Label } from '../../components/ui/label'; -import { ShieldCheck, Disc3, ArrowRight, Heart } from 'lucide-react'; +import { ShieldCheck, Disc3, ArrowRight, Heart, Sparkles, Waves } from 'lucide-react'; import { motion } from 'framer-motion'; export default function Login() { @@ -58,7 +58,7 @@ export default function Login() { captcha, captchaId }); - toast.success('欢迎回来'); + toast.success('欢迎回来,首席播音官'); setToken(res.token); setUserInfo(res.user); navigate('/'); @@ -71,168 +71,260 @@ export default function Login() { }; return ( -
+
{/* Ambient Background Elements */} -
-
+
+
+ + {/* Animated Floating Particles */} +
+ + +
- {/* Visual Side (Twilight) */} -
-
-
+ {/* Visual Side (Japanese Zen/Retro Radio Vibe) */} +
+
+
-
- logo -
+
+ logo +
- Morning Radio - Management Console + 全声汇 +
+ QUAN SHENG HUI +
-
-

- 声音的温度
- 伴随每个
- 清晨与黄昏。 -

-

- 重新设计的管理架构,在日式简练与法式优雅间,寻找高效操作的节奏感。 -

+
+ + 听见万物
+ 汇聚共振之旅。 +
+ +

+ 专业音频管理中枢,
+ 在简约之中,掌控声音的力量。 +

+
+
+ System v2.5.0 Premium +
+
-
+
- 2.5 - Version Control +
+ + Live Interaction Index +
+
+ 99.9% + Up-time +
-
-
- - 安全加固基建 +
+
+ + + 军用级加密信道 +
- {/* Form Side (Warm Cream) */} -
-
-
-
-

欢迎回来

-
-

Control Center Access

-
-
-
+ {/* Form Side (Clean Japanese Creamy Minimalist) */} +
+
-
-
-
- +
+ +
+ + Identity Authentication +
+

管理员登入

+
+ + + +
+ +