diff --git a/mobile/lib/config.dart b/mobile/lib/config.dart index 2b1e2b4..ad0889c 100644 --- a/mobile/lib/config.dart +++ b/mobile/lib/config.dart @@ -30,4 +30,7 @@ const String wsAddr = 'ws://$serverHost:$wsPort'; const String livekitUrl = 'ws://$serverHost:$livekitPort'; /// 公司账号登录后端地址,例:http://192.168.200.11:10010 -const String authApiBase = 'http://$serverHost:$authApiPort'; +/// +/// 仅本地联调用:`--dart-define=AUTH_HOST=127.0.0.1` 可覆盖登录服务地址(OpenIM/LiveKit +/// 仍走 [serverHost]),正式打包不带该参数则与 [serverHost] 一致。 +const String authApiBase = 'http://${String.fromEnvironment('AUTH_HOST', defaultValue: serverHost)}:$authApiPort';