feat(admin-v2): add billing management page

- Plan cards with feature comparison and pricing
- Usage progress bars with quota visualization
- Alipay/WeChat Pay method selection modal
- Payment status polling with auto-refresh on success
- Navigation + route registration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-02 00:48:35 +08:00
parent b1e3a27043
commit c8dc654fd4
4 changed files with 457 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ import {
MoonOutlined,
ApiOutlined,
BookOutlined,
CrownOutlined,
} from '@ant-design/icons'
import { Avatar, Dropdown, Tooltip, Drawer } from 'antd'
import { useAuthStore } from '@/stores/authStore'
@@ -44,6 +45,7 @@ const navItems: NavItem[] = [
{ path: '/usage', name: '用量统计', icon: <BarChartOutlined />, permission: 'admin:full', group: '运维' },
{ path: '/relay', name: '中转任务', icon: <SwapOutlined />, permission: 'relay:use', group: '运维' },
{ path: '/knowledge', name: '知识库', icon: <BookOutlined />, permission: 'knowledge:read', group: '资源管理' },
{ path: '/billing', name: '计费管理', icon: <CrownOutlined />, permission: 'billing:read', group: '核心' },
{ path: '/logs', name: '操作日志', icon: <FileTextOutlined />, permission: 'admin:full', group: '运维' },
{ path: '/config', name: '系统配置', icon: <SettingOutlined />, permission: 'config:read', group: '系统' },
{ path: '/prompts', name: '提示词管理', icon: <MessageOutlined />, permission: 'prompt:read', group: '系统' },
@@ -207,6 +209,7 @@ const breadcrumbMap: Record<string, string> = {
'/usage': '用量统计',
'/relay': '中转任务',
'/knowledge': '知识库',
'/billing': '计费管理',
'/config': '系统配置',
'/prompts': '提示词管理',
'/logs': '操作日志',