多角色的配置适配

This commit is contained in:
2026-09-14 12:35:20 +08:00
parent 3547f80383
commit a1e01da241
11 changed files with 333 additions and 187 deletions

View File

@@ -24,4 +24,8 @@ class EnvConfig {
// ─── HTTP 接口 ───
static int get httpPort => isProduction ? 8081 : 59003;
static String get baseUrl => 'http://$serverHost:$httpPort';
// ─── MQTT(一方后端:任务消息 / 割草机实时状态,prod=1883 / test=59007)───
// 注:第三方无人机 OSD(droneOsd,WebSocket 8083)不纳入环境管理,保持硬编码
static int get mqttPort => isProduction ? 1883 : 59007;
}