Files
FruitServer/docs/plans/INBOX.md
T

41 lines
1.7 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.
# INBOX
## [已处理] K70-A 开发默认地址改为公网 39.162.50.99
### 需求
开发调试阶段默认连公网服务:`http://39.162.50.99:8081`(不带结尾斜杠,避免与请求路径拼接出双斜杠)。
### 现状
`lib/core/config/app_config.dart`:
- `devHostBaseUrl = 'http://192.168.31.187:8081'`(真机默认地址)
- `lanBaseUrl = 'http://127.0.0.1:8081'`(`adb reverse` 环回)
- `publicBaseUrl = 'http://39.162.50.99:8081'`
- `_probeCandidates = [lanBaseUrl, devHostBaseUrl, publicBaseUrl]`
### 改动
1. `devHostBaseUrl` 改为 `'http://39.162.50.99:8081'`,同步更新上方文档注释
(说明当前默认指向公网,换网络时改这一行)。
2. `_probeCandidates` 去重(保留 `lanBaseUrl` 在前、其次 `devHostBaseUrl`、再 `publicBaseUrl`),
避免改完后重复探测同一地址;不改变探测顺序语义与超时。
3. 测试 `test/config/server_endpoint_test.dart` 第 66 行的字面量断言同步改为
`'http://39.162.50.99:8081'`;其余使用常量的断言无需改动。
### 验收
- `adb reverse` 存在时仍优先走 `127.0.0.1`;不存在时走公网。
- 门禁:`dart analyze lib test` 零告警、`flutter test` 全过、`flutter build apk --debug` 成功。
### Git
- 从 `develop` 拉 `chore/dev-default-public-host`。
- 提交:`chore(config): 开发默认地址改为公网 39.162.50.99`,作者 `Zhou Weidong <502333560@qq.com>`。
- `--no-ff` 合回 `develop` 并 push;`FruitServer/docs/plans/PROGRESS.md` 追加 K70-A 留痕。
### 约束
- 全程中文;禁止 `git add -A`;不改 `API_BASE_URL` 覆盖逻辑与运行时地址优先级;完成后停住等待验收。