Files
FruitServer/docs/plans/INBOX.md
T

28 lines
2.2 KiB
Markdown
Raw 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.
## [已处理] 2026-10-20 | K46-A 榜单/新剧/预约页支持下拉刷新与上拉加载(仅 App 端)
**用户指令(2026-10-20,原文)**:
> 「榜单 新剧 预约页面都要下拉刷新 上拉加载功能」
**口径(只改 Flutter,不动后端、不改接口;数据源仍是本地 `CatalogController.dramas`,客户端分页,不伪造接口)**
1. 复用 K45-A 的 `AppPullToRefresh`(若 K45-A 尚未完成,先完成它)。
2. 通用分页逻辑(抽到 `lib/core/widgets/paged_local_list.dart` 或页面内复用):
- 每页 20 条,`visible = all.take(pageCount * 20)`;
- 滚动到距底 ≤200 时自动加载下一页:`pageCount++`,底部先显示 20px 主题色转圈(≥300ms,避免闪烁),加载完若已到底显示「没有更多了」(新增 l10n `noMore`:没有更多了 / No more / Tidak ada lagi),Key `<page>-no-more`;
- 下拉刷新:`catalog.refresh()`(静默)后 `pageCount = 1`,保持当前滚动位置回到顶部;
- 刷新中/加载中防重复触发。
3. 榜单页:`AppPullToRefresh` 包裹整页滚动(三强 + 第 4 名起列表),第 4 名起列表使用上述分页;底部加载态 Key `ranking-load-more`。
4. 新剧页:
- `AppPullToRefresh` 包裹;
- 「今日首映」取自第一页第一条;「更多新剧」横滑区保留前 12 条;
- 其下新增「全部新剧」双列网格(复用 `DramaGrid`),使用上述分页;底部 Key `new-releases-load-more`。
5. 预约页:`AppPullToRefresh` 包裹(下拉调用 `catalog.refresh()`),空态仍为票根卡;无列表时不显示加载更多。
6. 三页滚动体统一 `AlwaysScrollableScrollPhysics`,空列表/短列表也能下拉。
**测试/门禁**
- 榜单/新剧:首屏 20 条,滚到底出现加载态并追加到 40 条;全部加载完显示 `<page>-no-more`;下拉刷新后回到 20 条;
- 预约页:下拉触发 refresh,不出现加载更多;
- `dart analyze lib test` 零告警 + `flutter test` 全过 + `flutter build apk --debug`。
**流程**:从 `develop` 拉 `feature/flutter-k46-paged-pages`;作者 `Zhou Weidong <502333560@qq.com>`;`--no-ff` 合回 develop 并 push;PROGRESS 留痕;真机验收由用户执行。