Files
erp/apps/web/src/pages/Home.tsx
iven 4a03a639a6 feat(web): add login page, auth store, API client, and route guard
- API client with axios interceptors: JWT attach + 401 auto-refresh
- Auth store (Zustand): login/logout/loadFromStorage with localStorage
- Login page: gradient background, Ant Design form, error handling
- Home page: dashboard with statistics cards
- App.tsx: PrivateRoute guard, /login route, auth state restoration
- MainLayout: dynamic user display, logout dropdown, menu navigation
- Users API service: CRUD with pagination support
2026-04-11 03:38:29 +08:00

38 lines
1.0 KiB
TypeScript

import { Typography, Card, Row, Col, Statistic } from 'antd';
import {
UserOutlined,
TeamOutlined,
FileTextOutlined,
BellOutlined,
} from '@ant-design/icons';
export default function Home() {
return (
<div>
<Typography.Title level={4}></Typography.Title>
<Row gutter={[16, 16]}>
<Col xs={24} sm={12} md={6}>
<Card>
<Statistic title="用户总数" value={0} prefix={<UserOutlined />} />
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card>
<Statistic title="角色数量" value={0} prefix={<TeamOutlined />} />
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card>
<Statistic title="流程实例" value={0} prefix={<FileTextOutlined />} />
</Card>
</Col>
<Col xs={24} sm={12} md={6}>
<Card>
<Statistic title="未读消息" value={0} prefix={<BellOutlined />} />
</Card>
</Col>
</Row>
</div>
);
}