Files
tiku-saas-web/docs/legacy-feature-gap.md

64 lines
5.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 旧版页面与 .NET 接口覆盖矩阵
更新日期2026-08-04。接口事实来源为 `tiku-backend.net` 当前 `/openapi/v1.json`;旧版页面只用于确认业务内容和信息层级,不复用 PocketBase、`MockBackend` 或浏览器伪造结果。
状态说明:
- `ready`:第一批已接入可用的 .NET 契约。
- `partial`:存在可复用基础契约,但缺少完整业务流程或公开发起配置。
- `missing`:当前 OpenAPI 没有满足该学生功能的契约;仅保留前端类型位置,生产入口隐藏。
- `deferred`:后端已有契约,但不在第一批核心学习闭环范围内。
## 第一批闭环
| 旧版能力 | SaaS 路由/位置 | 状态 | 当前 .NET 契约 | 前端模块 |
| --- | --- | --- | --- | --- |
| 密码/短信登录 | `/login` | ready | `/api/tenant/auth/browser/login/password``sms/send``login/sms` | `studentAuthApi` |
| 找回密码 | `/reset-password` | ready | `/api/tenant/auth/browser/password/reset/*` | `studentAuthApi` |
| 地区选择 | `/select-region` | ready | `/api/public/catalog/regions``PATCH /api/student/profile/me` | `catalogApi``profileApi` |
| 学习首页 | `/` | ready | Profile、learning stats/trend、exam countdowns、banners、announcements | `DashboardPage` |
| 科目/章节 | `/subjects``/subject/:subjectId` | ready | subjects、categories、practice-blueprints | `catalogApi` |
| 刷题与恢复 | `/quiz` | ready | practice-sessions create/detail、answers、submit | `learningApi` |
| 报告 | `/quiz/report/:sessionId` | ready | practice-sessions/report`PendingReview` | `PracticeReportPage` |
| 错题/收藏 | `/collections` | ready | wrong-questions、favorites/questions | `CollectionsPage` |
| 公开品牌首页 | `/`(未登录) | ready | `/api/public/runtime/bootstrap`、学生资产 preview | `PublicLandingPage``RuntimeProvider` |
| 主题建站/发布 | `/manage/site` | ready | frontend-config draft/publish、`configVersion` | `site-builder/*` |
| OSS 主题资产 | 建站资产库 | ready | uploads/sign → OSS PUT → uploads/confirm → student asset preview | `assetApi``useThemeAssets` |
| 词汇单元与词表 | `/vocabulary/*` | ready | public vocabulary units/words | `VocabularyPage``VocabularyUnitPage` |
| 知识手册阅读 | `/handbook/*` | ready | public handbook subjects/chapters/entries | `student/pages/Handbook*` |
| 院校分数线 | `/scoreline` | ready | public scoreline records/years | `ScorelinePage` |
| 个人中心基础能力 | `/profile` | ready | student profile | `ProfilePage` |
## 缺失与部分支持
| 旧版能力 | 目标路由 | 状态 | 缺少的后端契约 | 前端预留 |
| --- | --- | --- | --- | --- |
| 择校报告/志愿规划 | `/school-planning` | missing | 报告输入校验、生成、版本、查询和导出契约;公共 schools 目录不足以生成报告 | `SchoolPlanningClient`、feature `school-planning` |
| QQ OAuth | `/login` | missing | 浏览器授权发起、state/回调和租户公开 AppId 配置 | `QqOAuthClient`;不渲染按钮 |
| 学生自助激活码核销 | `/activation-code` | missing | 当前 activation/commerce 契约不能证明等价于旧版学生自助权益核销流程 | `StudentActivationCodeClient`、feature `activation-code` |
| 旧版 C/C++ 代码运行器 | `/code-runner` 或题目内 | missing | 沙箱执行、资源限制、语言版本、结果和审计契约 | `CodeRunnerClient`、feature `code-runner` |
| 微信网页登录 | `/login` | partial | 已有回调处理 `/api/tenant/auth/browser/oauth/wechat`,但 Runtime 缺少公开授权发起参数/URL | 仅记录 `loginMethods`,暂不显示不可完成入口 |
| 独立模拟考试/作业 | 待定 | partial | practice session 可承载答题和判分,但缺考试日程、限时、作业下发、班级分配、交卷策略和成绩册流程 | 后续在 learning 领域扩展,不伪装成普通练习 |
| 主题资产专用权限 | 建站资产库 | partial | 当前资产控制器复用 `tenant:question-bank:manage`,没有更细的 `tenant:theme-assets:manage` | 权限不足时只读保留资产,不回退 Data URL |
## 已有接口但延期接入
| 能力 | 旧版路由/入口 | 状态 | 已确认 .NET 契约族 | 计划前端领域 |
| --- | --- | --- | --- | --- |
| 词汇学习进度/收藏/复习 | `/vocabulary/*` | deferred | student vocabulary progress/review/favorites | `student/vocabulary` |
| 视频精讲 | 题目解析/视频中心 | deferred | student videos search/play/progress、question videos | `student/videos` |
| 分数线动态图表与字段筛选 | `/scoreline` | deferred | public scoreline fields/trend | `student/scoreline` |
| 个人中心完整能力 | `/profile` | deferred | score-events、membership、设置等 | `student/profile` |
| 排行榜 | 首页/个人中心 | deferred | `/api/student/learning/leaderboard` | `student/leaderboard` |
| 积分/兑换 | 个人中心/商城 | deferred | `/api/student/points/*` | `student/points` |
| 商城、订单与支付 | `/store` | deferred | student commerce orders/coupons支付能力需按实际支付渠道复核 | `student/commerce` |
| 优惠券 | 商城 | deferred | student commerce coupons claim/list/check | `student/commerce` |
| 推荐增长 | 邀请入口 | deferred | `/api/student/referral/*` | `student/referral` |
## 前端约束
- 正式路由和导航必须同时满足:前端注册项为 `ready`、Runtime `enabledFeatures` 已启用、租户发布配置允许显示。
- `missing``deferred` 能力可进入固定的建设中页面,但不得调用猜测接口或返回 Mock 成功;租户仍可在发布配置中隐藏入口。
- 不允许配置 JSON 注入任意 React 组件、路由或远程脚本。
- 缺失功能不调用猜测路径、不持久化 Mock 成功结果。后端补齐后,应先更新 OpenAPI 快照,再实现对应 Client。