|
|
|
@ -15,6 +15,7 @@ import '../../data/models/appconfig.dart'; |
|
|
|
import '../../core/utils/logger.dart'; |
|
|
|
import 'bluetooth_manager.dart'; |
|
|
|
import 'language_manager.dart'; |
|
|
|
import 'network/dio_manager.dart'; |
|
|
|
|
|
|
|
// 重新导出BLE连接状态常量,让外部可以通过BleManager访问 |
|
|
|
export 'package:ble_service/ble_service.dart' show BleConnectionState; |
|
|
|
@ -753,10 +754,7 @@ class BleManager extends GetxService { |
|
|
|
Future<bool> startAgentService() async { |
|
|
|
try { |
|
|
|
// 从.env文件直接读取环境变量 |
|
|
|
var serverurl = dotenv.env['SERVER_URL'] ?? ''; |
|
|
|
if (Get.locale?.countryCode != 'CN') { |
|
|
|
serverurl = dotenv.env['HW_SERVER_URL'] ?? ''; |
|
|
|
} |
|
|
|
var serverurl = DioManager().baseUrl; |
|
|
|
|
|
|
|
var jsonString = _storage.read<String>("logintoken"); |
|
|
|
|
|
|
|
|