Windows 补 .env.production 与 endpoints 兜底;Android 默认 host/端口改为内网,启动后重写 HttpUtil/ApiService,Urls 改为 getter。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
17 lines
510 B
Dart
17 lines
510 B
Dart
import 'package:openim_common/openim_common.dart';
|
|
|
|
import '../brand/apply_official_styles.dart';
|
|
import 'app_endpoints.dart';
|
|
|
|
/// 启动时注入内网地址与官方 Styles→Token 映射。不改 SDK 核心。
|
|
class CompanyBootstrap {
|
|
CompanyBootstrap._();
|
|
|
|
static Future<void> install() async {
|
|
applyOfficialStylesFromTokens();
|
|
await DataSp.putServerConfig(AppEndpoints.toServerConfig());
|
|
HttpUtil.setBaseUrl(AppEndpoints.apiAddr);
|
|
ApiService().setBaseUrl(AppEndpoints.apiAddr);
|
|
}
|
|
}
|