This commit is contained in:
2026-07-02 17:17:32 +08:00
parent 6190236fc0
commit 0d5534dbca
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -189,6 +189,8 @@ async def _seed_data():
("user_register_credits", "100", "用户注册赠送积分"),
("user_login_credits", "0", "用户每日登录赠送积分"),
("user_login_credits_enabled", "false", "启用每日登录赠送积分"),
# Operation manual
("operation_manual", "", "操作手册链接"),
]
for key, value, desc in configs:
existing = await db.execute(
@@ -600,6 +600,7 @@ const AppLayout: React.FC = () => {
{ key: 'myCredits', icon: <WalletOutlined />, label: '积分明细' },
{ key: 'orderRecords', icon: <FileTextOutlined />, label: '订单记录' },
{ key: 'messages', icon: <BellOutlined />, label: `消息中心${unreadCount > 0 ? `(${unreadCount})` : ''}` },
...(operationManualUrl ? [{ key: 'manual' as const, icon: <FileTextOutlined />, label: '操作手册' }] : []),
{ type: 'divider' as const },
{ key: 'changePwd', icon: <LockOutlined />, label: '修改密码' },
{ type: 'divider' as const },
@@ -613,6 +614,7 @@ const AppLayout: React.FC = () => {
else if (key === 'recharge') { setRechargeModalOpen(true); }
else if (key === 'myCredits') { navigate('/user-center?tab=credits'); }
else if (key === 'orderRecords') { navigate('/user-center?tab=orders'); }
else if (key === 'manual') { window.open(operationManualUrl, '_blank'); }
};
const handleChangePwd = async () => {