iven
263ddf31a6
feat(app): 数据层集成 — RemoteJournalRepository + ClassRepository + SSE 通知
数据层新增:
- RemoteJournalRepository: 日记 CRUD + 元素管理,通过 ApiClient 连接后端
- ClassRepository: 班级/主题/评语 API 操作(getMyClasses/joinClass/assignTopic/createComment)
- SseNotificationService: SSE 实时通知监听 + 自动重连 + 事件流
- ApiException: 统一 API 错误封装
- DTO: ClassMemberDto + TopicDto + CommentDto
设计:
- Repository 模式: 抽象接口 + 远程实现 + 内存实现
- SSE: Dio stream + SSE 协议解析 + 3秒自动重连
- 所有 Repository 通过 ApiClient 注入,依赖现有 JWT 拦截器
验证: flutter analyze 0 error
2026-06-01 10:11:47 +08:00
..
2026-06-01 00:55:51 +08:00
2026-06-01 01:22:53 +08:00
2026-06-01 00:55:51 +08:00
2026-06-01 10:11:47 +08:00
2026-06-01 10:11:47 +08:00