From 7a0e83dac5ce84897a16cea4d1593be1ba860c11 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 7 Dec 2025 10:58:24 -0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(mobile-app):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?deviceName=E5=8F=AA=E5=8F=91=E9=80=81=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=97=E7=9A=84=E5=AD=97=E6=AE=B5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1b4901ea686d6df03c6bedd6fb45a95cbb2620a5. --- .../mobile-app/lib/core/services/account_service.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/mobile-app/lib/core/services/account_service.dart b/frontend/mobile-app/lib/core/services/account_service.dart index 4f45aa02..c9bfee6b 100644 --- a/frontend/mobile-app/lib/core/services/account_service.dart +++ b/frontend/mobile-app/lib/core/services/account_service.dart @@ -33,12 +33,17 @@ 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 (platform != null) 'platform': platform, + 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, }; @override