Files
FruitServer/docs/plans/INBOX.md
T

20 lines
1.6 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 | K56-A 失败页增加「手动设置服务地址」(仅 debug,仅 App 端)
**背景**
iOS 真机日志显示:`127.0.0.1` 拒绝、`192.168.31.187:8081` 与 `39.162.50.99:8081` 均 `No route to host (errno 65)`。Mac 侧后端正常、防火墙已放行 java。属于设备网络不可达(不同网段 / 本地网络权限被拒 / 无互联网),需要让用户能不改包直接切换服务地址排查。
**口径(只改 Flutter,不动后端、不改接口)**
1. `kDebugMode` 下,首页/剧场失败页在重试按钮下方增加「设置服务地址」文字按钮(Key `catalog-debug-endpoint-edit`):
- 打开对话框:预填 `AppConfig.apiBaseUrl`,用户可输入 `http://IP:端口`;
- 确认后 `ServerEndpoint.save(input)` → `AppConfig.probeAndApplyBaseUrl()` → `catalog.load()`;
- 校验非法地址时对话框内红字提示(`ServerEndpoint.normalize` 为空)。
2. 对话框附提示文字:「手机需与电脑同一 Wi-Fi,并在 iOS 设置-隐私与安全性-本地网络 中允许本应用」。
3. release 构建不显示该入口。
4. 现有 debug 信息两行(K55-A)保留。
**测试/门禁**
- 单测:debug 模式失败页出现入口,输入合法地址后调用 save + probe + load;非法地址不保存并提示;
- `dart analyze lib test` 零告警 + `flutter test` 全过 + `flutter build apk --debug`。
**流程**:从 `develop` 拉 `feature/flutter-k56-endpoint-editor`;作者 `Zhou Weidong <502333560@qq.com>`;`--no-ff` 合回 develop 并 push;PROGRESS 留痕;真机验收由用户执行。