From 1b4901ea686d6df03c6bedd6fb45a95cbb2620a5 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 7 Dec 2025 10:57:38 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile-app):=20=E4=BF=AE=E5=A4=8DdeviceName?= =?UTF-8?q?=E5=8F=AA=E5=8F=91=E9=80=81=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=97?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后端DeviceNameDto只接受model/platform/osVersion三个字段 移除brand/manufacturer/device/product/hardware/sdkInt/isPhysicalDevice 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../mobile-app/lib/core/services/account_service.dart | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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