feat: add preset avatar picker

This commit is contained in:
Codex
2026-06-30 17:53:53 +08:00
parent c7ad3450fd
commit 727e65b554
14 changed files with 215 additions and 15 deletions

View File

@@ -48,7 +48,7 @@
- 租户后台可以接入角色模板和成员 API`/api/tenant-admin/role-templates``/api/tenant-admin/members`,用于运营、教师、销售、代理等自定义菜单/模块/字段可见性和成员模板绑定。
- 租户后台可以接入勋章管理、手动发放、积分任务、每日签到奖励、积分兑换、积分风控只读报表和反馈运营报表:`GET/PUT /api/tenant-admin/badges``GET/POST /api/tenant-admin/badge-grants``GET/PUT /api/tenant-admin/point-activity-tasks``GET /api/tenant-admin/point-activity-claims``GET/PUT /api/tenant-admin/point-exchange-items``GET /api/tenant-admin/point-exchange-orders``GET /api/tenant-admin/points-risk-report``GET /api/tenant-admin/feedbacks/report`;学生端用 `GET /api/profile/badges` 展示成就,通过 `POST /api/profile/check-in` 自动领取 `daily_check_in` 任务奖励,并通过 `GET /api/profile/activity-tasks``POST /api/profile/activity-tasks/claim``GET /api/profile/exchange-items``POST /api/profile/exchange-items/redeem` 接其它积分活动和兑换。
- 学生消息中心可以接 `GET /api/profile/notifications``POST /api/profile/notifications/status`;租户后台可用 `GET /api/tenant-admin/user-notifications` 做用户通知查看。通知只做展示、跳转和已读/归档状态,业务权限和权益仍以后端源接口为准。
- 学生头像是产品级约束:学生端只展示男女预设头像,前端不要做头像上传、裁剪、对象存储签名或微信/QQ 头像同步;排行榜也是可选活动能力,默认不请求、不展示,日常学习激励以后台配置勋章自动发放为主。
- 学生头像是产品级约束:学生端只展示男女预设头像,个人中心已接二选一保存 UI前端不要做头像上传、裁剪、对象存储签名或微信/QQ 头像同步;排行榜也是可选活动能力,默认不请求、不展示,日常学习激励以后台配置勋章自动发放为主。
## 不能误认为已商用完成的部分
@@ -85,7 +85,7 @@
| 知识手册 | `apps/taro/src/pages/student/handbook/index.tsx` | `handbook-subjects``handbook-chapters``handbook-entries`;已接 RichContent 阅读渲染第一版 |
| 分数线 | `apps/taro/src/pages/student/scoreline/index.tsx` | `scoreline/records` |
| 资料 | `apps/taro/src/pages/student/assets/index.tsx` | `assets``assets/preview``assets/download`已接短期签名、过期信息、可见水印覆盖、traceId 展示和强制水印资源外部预览限制 |
| 个人中心 | `apps/taro/src/pages/student/profile/index.tsx` | `profile/me``check-in``score-events``badges``exam-countdowns``svip-plans``orders``entitlements``activation-codes``learning/stats``learning/trend``practice-sessions/history``profile/activity-tasks``profile/activity-tasks/claim``profile/exchange-items``profile/exchange-items/redeem``profile/notifications``profile/notifications/status`;已接学习报告、练习趋势、最近练习、会员订单、激活码、积分任务/兑换/积分明细和消息中心第一版 |
| 个人中心 | `apps/taro/src/pages/student/profile/index.tsx` | `profile/me``PATCH profile/me.avatarPreset``check-in``score-events``badges``exam-countdowns``svip-plans``orders``entitlements``activation-codes``learning/stats``learning/trend``practice-sessions/history``profile/activity-tasks``profile/activity-tasks/claim``profile/exchange-items``profile/exchange-items/redeem``profile/notifications``profile/notifications/status`;已接学习报告、练习趋势、最近练习、男女预设头像选择、会员订单、激活码、积分任务/兑换/积分明细和消息中心第一版 |
当前页面主要用于打通接口和路由。学生端第一版学习闭环已经覆盖“选地区 -> 进题库 -> 创建 session -> 答题卡/答题/主观题自评/复合题多小题/收藏/反馈/视频 -> 交卷报告逐题复盘 -> 错题/收藏复习”,背单词已经覆盖“单元 -> 今日计划/全单元/收藏练习 -> 卡片翻转 -> 发音 -> 认识/再记上报 -> 本地恢复”,资料页已经覆盖“列表 -> 申请预览/下载短签名 -> 展示水印 traceId -> H5 水印容器预览或确认下载”,个人中心已经覆盖“基础资料 -> 学习报告 -> 14 天趋势 -> 题型表现 -> 最近练习 -> 勋章/签到 -> 会员/订单/激活码 -> 积分任务/兑换/明细 -> 消息筛选/已读/归档”,会员闭环已经覆盖“选套餐 -> 领优惠券 -> 下单 -> 创建支付参数 -> 状态轮询 -> 订单详情/售后入口”。`apps/taro/src/components/RichContent.tsx` 是学生端题干、选项、解析和知识手册的统一安全渲染组件:它只支持受控 Markdown 图片、基础表格、粗体、代码和被 parser 识别出的公式 tokenH5 端用 KaTeX 渲染 `$...$``$$...$$``\(...\)``\[...\]`,私有题图可用 `asset:<uuid>``content_asset:<uuid>``/asset/<uuid>` 资源引用向后端申请短期预览签名。组件不执行导入内容中的任意 HTML/JS也会拒绝 `javascript:``data:` 等危险图片地址。后续 UI 需要继续按旧题库视觉和 Taro H5/小程序限制优化,并重点补独立消息中心增强、小程序公式真机验收、题图资源字段化、小程序分享/支付容器体验。