From 3a9efab8ad080818200f73910a84d807750b29c6 Mon Sep 17 00:00:00 2001 From: userGyl Date: Tue, 18 Nov 2025 13:18:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=81=E4=BB=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/pages/c_page/car_info/controller.dart | 33 ++++++++++++++++++- ln_jq_app/lib/pages/c_page/car_info/view.dart | 5 +-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/ln_jq_app/lib/pages/c_page/car_info/controller.dart b/ln_jq_app/lib/pages/c_page/car_info/controller.dart index a60f2cb..c294b07 100644 --- a/ln_jq_app/lib/pages/c_page/car_info/controller.dart +++ b/ln_jq_app/lib/pages/c_page/car_info/controller.dart @@ -1,4 +1,5 @@ import 'package:getx_scaffold/getx_scaffold.dart'; +import 'package:ln_jq_app/common/model/base_model.dart'; import 'package:ln_jq_app/common/model/vehicle_info.dart'; import 'package:ln_jq_app/storage_service.dart'; @@ -24,7 +25,7 @@ class CarInfoController extends GetxController with BaseControllerMixin { super.onClose(); } - void getUserBindCarInfo() { + void getUserBindCarInfo() async { if (StorageService.to.hasVehicleInfo) { VehicleInfo? bean = StorageService.to.vehicleInfo; if (bean == null) { @@ -35,6 +36,36 @@ class CarInfoController extends GetxController with BaseControllerMixin { modelName = bean.modelName; brandName = bean.brandName; + final response = await HttpService.to.get( + 'appointment/vehicle/getPicInfoByVin?vin=${vin}', + ); + if (response != null) { + final result = BaseModel.fromJson(response.data); + if (result.code == 0 && result.data != null) { + result.data; + /*{ + "plateNumber": "浙F08860F", + "vin": "LA9GG64L9NBAF4174", + "drivingAttachment": [ + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/05/202405162107520002.pdf", + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/05/202405162107530002.jpg", + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/12/202412101043260001.jpg" + ], + "operationAttachment": [ + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/05/202405162107530003.pdf", + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/12/202412101043460001.jpg", + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/12/202412181551190001.pdf" + ], + "hydrogenationAttachment": [ + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/05/202405162107570001.pdf" + ], + "registerAttachment": [ + "https://lnh2e.com/api/lingniu-export-v1/v1/resource/file/2024/05/202405162108010001.pdf" + ] + }*/ + } + } + updateUi(); } } diff --git a/ln_jq_app/lib/pages/c_page/car_info/view.dart b/ln_jq_app/lib/pages/c_page/car_info/view.dart index dc13768..5a111a4 100644 --- a/ln_jq_app/lib/pages/c_page/car_info/view.dart +++ b/ln_jq_app/lib/pages/c_page/car_info/view.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:getx_scaffold/getx_scaffold.dart'; +import 'package:ln_jq_app/common/styles/theme.dart'; import 'package:ln_jq_app/pages/qr_code/view.dart'; import 'package:ln_jq_app/storage_service.dart'; // import 'package:getx_scaffold/getx_scaffold.dart'; // 如果不使用其中的扩展,可以注释掉 @@ -256,7 +257,7 @@ class CarInfoPage extends GetView { backgroundColor: Colors.blue.withOpacity(0.1), child: Icon(icon, color: Colors.blue, size: 28), ), - title: Text(title, style: const TextStyle(fontWeight: FontWeight.bold)), + title: Text(title, style: const TextStyle(fontWeight: FontWeight.bold,fontSize: 14)), subtitle: Text(subtitle, style: const TextStyle(color: Colors.grey, fontSize: 12)), trailing: Container( padding: const EdgeInsets.all(8), @@ -265,7 +266,7 @@ class CarInfoPage extends GetView { borderRadius: BorderRadius.circular(8), ), // 图片中的图标是“查看”的意思,这里用一个类似的图标代替 - child: const Icon(Icons.find_in_page_outlined, color: Colors.black54), + child: const Icon(Icons.find_in_page_outlined, color: AppTheme.themeColor), ), onTap: () { // TODO: 查看证件详情逻辑