+
+
+
diff --git a/src/pages/Dashboard/index.tsx b/src/pages/Dashboard/index.tsx
index 580d2f0..2adfa1d 100644
--- a/src/pages/Dashboard/index.tsx
+++ b/src/pages/Dashboard/index.tsx
@@ -7,98 +7,280 @@ import {
Users,
Activity,
ArrowUpRight,
- ArrowDownRight
+ ArrowDownRight,
+ Play,
+ Zap
} from 'lucide-react';
import { Card, CardContent, CardHeader, CardTitle } from '../../components/ui/card';
+import { Button } from '../../components/ui/button';
+import { motion } from 'framer-motion';
+import {
+ AreaChart,
+ Area,
+ XAxis,
+ YAxis,
+ CartesianGrid,
+ Tooltip,
+ ResponsiveContainer
+} 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 },
+];
export default function Dashboard() {
const stats = [
- { name: '总分类数', value: '12', icon: ListMusic, change: '+2', trend: 'up' },
- { name: '活跃频道', value: '45', icon: Mic2, change: '+5', trend: 'up' },
- { name: '节目总数', value: '3,284', icon: Disc3, change: '+124', trend: 'up' },
- { name: '订阅用户', value: '12.4K', icon: Users, change: '-24', trend: 'down' },
+ {
+ name: '总分类数',
+ value: '12',
+ icon: ListMusic,
+ change: '+2',
+ trend: 'up',
+ color: 'from-[#D28F4F] to-[#A64452]',
+ iconColor: 'text-[#D28F4F]'
+ },
+ {
+ name: '活跃频道',
+ value: '45',
+ icon: Mic2,
+ change: '+5',
+ trend: 'up',
+ color: 'from-[#6C5CE7] to-[#A64452]',
+ iconColor: 'text-[#6C5CE7]'
+ },
+ {
+ name: '节目总数',
+ value: '3,284',
+ icon: Disc3,
+ change: '+124',
+ trend: 'up',
+ color: 'from-[#D28F4F] to-[#E29A66]',
+ iconColor: 'text-[#D28F4F]'
+ },
+ {
+ name: '订阅用户',
+ value: '12.4K',
+ icon: Users,
+ change: '-24',
+ trend: 'down',
+ color: 'from-[#8C7E6C] to-[#4A3A2C]',
+ iconColor: 'text-[#4A3A2C]'
+ },
];
return (
-
-
+
+
-
欢迎回来,管理员
-
这是早安电台管理系统的实时概览。
+
+ 欢迎回来,管理员
+ ☕
+
+
+
+
+
+ 系统运行良好。当前有
1,248 名听众正在共度美好时光。
+
-
+
-
- {stats.map((stat) => (
-
-
- {stat.name}
-
-
-
-
-
- {stat.value}
-
-
- {stat.trend === 'up' ? : }
- {stat.change}
-
- 较上月
-
-
-
+
+ {stats.map((stat, index) => (
+
+
+
+
+ {stat.name}
+
+
+
+
+
+ {stat.value}
+
+
+
+ {stat.trend === 'up' ? : }
+ {stat.change}
+
+
+
增长率
+
+
+
+
))}
-
-
-
-
-
- 增长趋势分析
-
-
-
- 图表占位 (Growth data visualization)
-
-
-
-
-
-
-
- 热门频道排行
-
-
-
-
- {[1, 2, 3, 4, 5].map(i => (
-
-
-
-
{(1000 / i).toFixed(0)}
-
收听量
+
+
+
+
+
+
+
+
+ 收听热度分布
+
+
监测不同时段的声波流向与用户留存
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 热门频道排行
+
+
+
+
+ {[1, 2, 3, 4, 5].map(i => (
+
+
+
+

+
+
+
+
+
爵士小镇 #{i}
+ {i <= 3 && (
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
{(1240 / i).toFixed(0)}
+
活跃度
+
+
+ ))}
+
+
+
+
+
);
diff --git a/src/pages/Login/index.tsx b/src/pages/Login/index.tsx
index 8dcab9d..91c0473 100644
--- a/src/pages/Login/index.tsx
+++ b/src/pages/Login/index.tsx
@@ -3,11 +3,11 @@ import { useNavigate } from 'react-router-dom';
import { useAuthStore } from '../../store/authStore';
import { loginApi, getCaptchaApi } from '../../api/auth';
import { toast } from 'sonner';
-import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../components/ui/card';
import { Button } from '../../components/ui/button';
import { Input } from '../../components/ui/input';
import { Label } from '../../components/ui/label';
-import { Radio } from 'lucide-react';
+import { ShieldCheck, Disc3, ArrowRight, Heart } from 'lucide-react';
+import { motion } from 'framer-motion';
export default function Login() {
const navigate = useNavigate();
@@ -21,7 +21,6 @@ export default function Login() {
const [captchaImage, setCaptchaImage] = useState('');
const [loading, setLoading] = useState(false);
- // Guard to ensure we only fetch on mount once
const mounted = useRef(false);
const fetchCaptcha = async () => {
@@ -48,15 +47,8 @@ export default function Login() {
const handleLogin = async (e: React.FormEvent) => {
e.preventDefault();
-
- if (!account || !password) {
- toast.error('请输入账号和密码');
- return;
- }
- if (!captcha) {
- toast.error('请输入验证码');
- return;
- }
+ if (!account || !password) return toast.error('请输入账号和密码');
+ if (!captcha) return toast.error('请输入验证码');
try {
setLoading(true);
@@ -66,7 +58,7 @@ export default function Login() {
captcha,
captchaId
});
- toast.success('登录成功');
+ toast.success('欢迎回来');
setToken(res.token);
setUserInfo(res.user);
navigate('/');
@@ -79,86 +71,169 @@ export default function Login() {
};
return (
-
-
-
-
-
-
-
- 早安电台
-
- 后台管理系统 portal
-
-
-
-
-