This commit is contained in:
2026-06-26 17:42:35 +08:00
parent a986ddf037
commit 54cd7c0e19
3 changed files with 152 additions and 76 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
}
})();
</script>
<script type="module" crossorigin src="/assets/index-BcsIh6lR.js"></script>
<script type="module" crossorigin src="/assets/index-CEkBiD-W.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-TmZWd4w9.css">
</head>
<body>
@@ -709,6 +709,23 @@ const AppLayout: React.FC = () => {
}}
>
<div style={{ flex: 1, overflow: 'auto', paddingBottom: 12 }}>
<div style={{ padding: '12px 8px 16px' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12, marginBottom: 16 }}>
<Avatar size={44} style={{ background: 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)', flexShrink: 0 }}>
<UserOutlined />
</Avatar>
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{ fontSize: 15, fontWeight: 600, color: '#1e293b', marginBottom: 2 }}>
{user?.username || '用户'}
</div>
<div style={{ fontSize: 13, color: '#64748b' }}>
<WalletOutlined style={{ color: '#f59e0b', marginRight: 4 }} />
: <span style={{ color: '#f59e0b', fontWeight: 600 }}>{user?.credits ?? 0}</span>
</div>
</div>
</div>
</div>
{topLevelItems.map(item => {
const menuType = item.menu_type ?? item.menuType;
const hasChildren = childMap[item.id] && childMap[item.id].length > 0;
@@ -780,6 +797,65 @@ const AppLayout: React.FC = () => {
</div>
<div style={{ padding: '8px 0', borderTop: '1px solid #f1f5f9' }}>
<div
className="mobile-menu-item"
onClick={() => {
navigate('/user-center?tab=credits');
setMobileMenuOpen(false);
}}
>
<span className="mobile-menu-icon" style={{ color: '#f59e0b' }}>
<WalletOutlined />
</span>
<span className="mobile-menu-label" style={{ color: '#475569' }}></span>
</div>
<div
className="mobile-menu-item"
onClick={() => {
navigate('/user-center?tab=orders');
setMobileMenuOpen(false);
}}
>
<span className="mobile-menu-icon" style={{ color: '#6366f1' }}>
<FileTextOutlined />
</span>
<span className="mobile-menu-label" style={{ color: '#475569' }}></span>
</div>
<div
className="mobile-menu-item"
onClick={() => {
navigate('/messages');
setMobileMenuOpen(false);
}}
>
<span className="mobile-menu-icon" style={{ color: '#8b5cf6' }}>
<BellOutlined />
</span>
<span className="mobile-menu-label" style={{ color: '#475569' }}>
{unreadCount > 0 && (
<Tag color="red" style={{ marginLeft: 8, fontSize: 11 }}>{unreadCount}</Tag>
)}
</span>
</div>
<div
className="mobile-menu-item"
onClick={() => {
setPwdModalOpen(true);
setMobileMenuOpen(false);
}}
>
<span className="mobile-menu-icon" style={{ color: '#0ea5e9' }}>
<LockOutlined />
</span>
<span className="mobile-menu-label" style={{ color: '#475569' }}></span>
</div>
<div style={{ height: 8 }} />
<div
className="mobile-menu-item mobile-recharge-item"
onClick={() => {