Commit Graph
9 Commits
Author SHA1 Message Date
bwstudio cab4d6a9bd refactor(web): 前台代码全面改进
- 搜索逻辑改为后端关键词搜索(修复前端100条限制)
- 合并重复的 handleSelectType/handleDrawerSelectType
- 提取 getLevelText 到公共工具 utils/joke.js
- 删除废弃组件 Header.vue
- 删除重复 API searchJokes
- 修复 AppHeader 滚动事件监听未清理
- 统一 Rightbar URL 参数为 type_ids/crowd_ids
- 清除调试 console.log 代码
- 清理未使用导入 watchEffect
- onMounted 请求并行化(Promise.allSettled)
2026-06-12 08:58:23 +08:00
bwstudio 076812f1aa feat: 当月热门笑话 + 统计面板,删除首页清除筛选按钮
- 后端新增 GET /api/jokes/hot-monthly(当月浏览量 top 10)
- 后端新增 GET /api/jokes/stats(公开统计:总数/审核/待审/浏览等)
- 右侧栏热门改为当月热门笑话
- 右侧栏新增网站统计区(笑话总数/已审核/待审核/总浏览)
- 首页删除清除筛选按钮
2026-06-12 05:48:32 +08:00
bwstudio fde86b90d2 feat: 新增点踩功能,列表卡片和详情页支持 👍/👎 投票
- 后端: 新增 dislike_count 字段(模型/Schema/数据库迁移)
- 后端: 新增 POST /api/jokes/{id}/dislike 端点
- 后端: 管理后台统计新增 total_dislikes
- 前端: 新增 useVote 组合函数(localStorage 持久化防重复)
- 前端: JokeCard 列表卡片新增 👍/👎 可点击投票按钮
- 前端: 详情页 ❤️ 改为 👍 赞一下 / 👎 踩一脚 双按钮
2026-06-11 19:17:12 +08:00
bwstudio 595394fcb7 feat: 前后台静态资源路径冲突修复 + 用户管理功能
- 修改 admin/vite.config.js 添加 base: '/admin/' 解决静态资源路径问题
- 修复后台 index.html 资源引用从 /assets/ → /admin/assets/
- 更新优化器默认 API 地址为服务器地址
- 添加友链管理相关代码
- 修复多处分类管理页面
2026-06-10 07:30:49 +08:00
bwstudioandClaude Opus 4.8 aecf1f1f15 feat: add user role system and public joke submission API
- Add AdminUser role field (admin/submitter)
- User management in admin panel
- Public joke submission API (no auth required)
- Document submission methods for external workers

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:48:35 +08:00
bwstudio ceed63fcb0 fix: resolve 10 code review issues
High priority:
- Fix concurrent race condition for view_count/like_count (atomic update)
- Add route request ID tracking to prevent race conditions
- Filter get_joke by status=approved (no pending content leak)
- Add error feedback for like button

Performance:
- Optimize random joke query (avoid full table sort)
- Limit page_size max to 100 (DoS prevention)

Medium:
- Add localStorage quota error handling
- Handle empty AI response gracefully
- Fix generate content title extraction

Low:
- Add rejected_jokes to stats API
- Update dashboard to show rejected count
2026-06-02 20:35:08 +08:00
bwstudio f28c413351 feat(api): add joke generate endpoint with AI 2026-06-02 20:00:41 +08:00
bwstudio 4651781bc3 fix(api): use bcrypt directly instead of passlib for compatibility 2026-05-21 22:18:36 +08:00
bwstudioandClaude Opus 4.7 c3a8e3e311 feat(api): implement FastAPI routes with JWT authentication
- jokes.py: Public joke listing, detail, and random endpoints
- categories.py: Type and crowd listing endpoints
- auth.py: Login endpoint with JWT token generation
- admin.py: Full CRUD for jokes, types, crowds with JWT protection
- Fix request body schemas to use Create DTOs instead of Response models

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 21:02:59 +08:00