Phase4剩余: 推广+成就系统前后端完成 (promotion + achievement)
- 新增: Achievement.tsx 成就系统前端页面 (644行) - 新增: achievement_admin.py 成就系统后端API (9个端点) - 新增: migration SQL (achievements, user_achievements, achievement_progress_log) - 更新: api/index.ts 添加推广+成就API方法 (23个方法) - 更新: App.tsx 添加 /admin/promotion 和 /admin/achievement 路由 - 更新: AdminLayout.tsx 添加成就系统导航项和图标 - 修复: Promotion.tsx 导入路径 (@/utils/api → @/api) - 前端构建: 472 modules, 11.23s, 成功 - API测试: 全部6个端点返回 code=0
This commit is contained in:
1 parent
7daeae6fc7
commit
0886c26157
8 files changed
+2674
-447
No files matched your search
@@ -20,6 +20,8 @@ const adminNavItems = [
|
||||
{ path: '/admin/code-exec', icon: 'code', label: '代码执行沙箱' },
|
||||
{ path: '/admin/distributions', icon: 'distro', label: '发行版构建' },
|
||||
{ path: '/admin/privacy', icon: 'privacy', label: '隐私与本地代理' },
|
||||
{ path: '/admin/promotion', icon: 'promotion', label: '推广系统' },
|
||||
{ path: '/admin/achievement', icon: 'achievement', label: '成就系统' },
|
||||
{ path: '/admin/im-bots', icon: 'imbot', label: 'IM 机器人' },
|
||||
];
|
||||
|
||||
@@ -42,6 +44,14 @@ const adminIconPaths: Record<string, JSX.Element> = {
|
||||
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/>
|
||||
<path d="M7 11V7a5 5 0 0 1 10 0v4"/>
|
||||
<circle cx="12" cy="16" r="1"/>
|
||||
</svg>,
|
||||
promotion: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
||||
<circle cx="12" cy="8" r="7"/>
|
||||
<path d="M8.5 12.5L6 21l6-2 6 2-2.5-8.5"/>
|
||||
<circle cx="12" cy="8" r="3"/>
|
||||
</svg>,
|
||||
achievement: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 7.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z"/>
|
||||
</svg>,};
|
||||
|
||||
const AdminLayout: React.FC = () => {
|
||||
|
||||
Reference in new issue
Block a user