chore(config): 开发默认地址改为公网 39.162.50.99

This commit is contained in:
Zhou Weidong committed 2026-10-20 21:55:51 +08:00
1 parent 51c363540a
commit 0c6a103c1c
2 files changed
+14 -36

No files matched your search

+4 -5
View File
@@ -11,11 +11,10 @@ import 'package:flutter/foundation.dart';
class AppConfig {
const AppConfig._();
/// 真机默认使用的开发机局域网地址。
/// 开发调试默认服务地址,当前直接指向公网。
///
/// 这个地址跟着电脑所在的网络走,换网络后要用
/// `ipconfig getifaddr en0` 重新确认。默认值只改这一行。
static const String devHostBaseUrl = 'http://192.168.31.187:8081';
/// 需要切换局域网联调时只改这一行,地址不要带结尾斜杠。
static const String devHostBaseUrl = 'http://39.162.50.99:8081';
/// 本机后端地址:通过 `adb reverse tcp:8081 tcp:8081` 映射到开发机,
/// 探测可达时 App 直连本机服务;不可达时回落到公网地址。
@@ -38,7 +37,7 @@ class AppConfig {
static const List<String> _probeCandidates = [
lanBaseUrl,
devHostBaseUrl,
publicBaseUrl,
if (devHostBaseUrl != publicBaseUrl) publicBaseUrl,
];
/// Build-time server URL supplied through `--dart-define=API_BASE_URL`.