diff --git a/frontend/mobile-app/lib/core/services/account_service.dart b/frontend/mobile-app/lib/core/services/account_service.dart index c9bfee6b..4f45aa02 100644 --- a/frontend/mobile-app/lib/core/services/account_service.dart +++ b/frontend/mobile-app/lib/core/services/account_service.dart @@ -33,17 +33,12 @@ class DeviceHardwareInfo { this.isPhysicalDevice, }); + /// 转换为 API 请求格式 + /// 注意: 后端只接受 model, platform, osVersion 三个字段 Map toJson() => { - if (brand != null) 'brand': brand, - if (manufacturer != null) 'manufacturer': manufacturer, if (model != null) 'model': model, - if (device != null) 'device': device, - if (product != null) 'product': product, - if (hardware != null) 'hardware': hardware, - if (osVersion != null) 'osVersion': osVersion, if (platform != null) 'platform': platform, - if (sdkInt != null) 'sdkInt': sdkInt, - if (isPhysicalDevice != null) 'isPhysicalDevice': isPhysicalDevice, + if (osVersion != null) 'osVersion': osVersion, }; @override