75 lines
2.6 KiB
TypeScript
75 lines
2.6 KiB
TypeScript
import { useEffect } from 'react';
|
||
import { useRouter } from 'next/router';
|
||
import Link from 'next/link';
|
||
|
||
export default function Home() {
|
||
const router = useRouter();
|
||
|
||
useEffect(() => {
|
||
// 检查是否有用户登录,如果有则重定向到仪表盘
|
||
const checkAuth = async () => {
|
||
try {
|
||
// 这里可以添加用户认证检查
|
||
// 暂时跳过自动重定向
|
||
} catch (error) {
|
||
console.error('Auth check error:', error);
|
||
}
|
||
};
|
||
|
||
checkAuth();
|
||
}, [router]);
|
||
|
||
return (
|
||
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
|
||
<div className="container mx-auto px-4 py-16">
|
||
<div className="text-center">
|
||
<h1 className="text-4xl font-bold text-gray-900 mb-8">
|
||
口译服务后台管理系统
|
||
</h1>
|
||
<p className="text-xl text-gray-600 mb-12">
|
||
专业的口译服务管理平台,提供完整的用户管理和通话监控功能
|
||
</p>
|
||
|
||
<div className="grid md:grid-cols-2 gap-8 max-w-4xl mx-auto">
|
||
<div className="bg-white rounded-lg shadow-lg p-8">
|
||
<h2 className="text-2xl font-semibold text-gray-800 mb-4">
|
||
管理员登录
|
||
</h2>
|
||
<p className="text-gray-600 mb-6">
|
||
访问完整的管理功能,包括用户管理、通话监控和数据统计
|
||
</p>
|
||
<Link
|
||
href="/auth/login"
|
||
className="inline-block bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition-colors"
|
||
>
|
||
立即登录
|
||
</Link>
|
||
</div>
|
||
|
||
<div className="bg-white rounded-lg shadow-lg p-8">
|
||
<h2 className="text-2xl font-semibold text-gray-800 mb-4">
|
||
系统功能
|
||
</h2>
|
||
<ul className="text-left text-gray-600 space-y-2">
|
||
<li>• 实时通话监控</li>
|
||
<li>• 用户管理与权限控制</li>
|
||
<li>• 翻译员管理</li>
|
||
<li>• 数据统计与报表</li>
|
||
<li>• 订单与财务管理</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="mt-12">
|
||
<Link
|
||
href="/dashboard"
|
||
className="inline-block bg-green-600 text-white px-8 py-4 rounded-lg hover:bg-green-700 transition-colors text-lg"
|
||
>
|
||
进入仪表盘(演示模式)
|
||
</Link>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|