证件接口
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import 'package:getx_scaffold/getx_scaffold.dart';
|
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/common/model/vehicle_info.dart';
|
||||||
import 'package:ln_jq_app/storage_service.dart';
|
import 'package:ln_jq_app/storage_service.dart';
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ class CarInfoController extends GetxController with BaseControllerMixin {
|
|||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getUserBindCarInfo() {
|
void getUserBindCarInfo() async {
|
||||||
if (StorageService.to.hasVehicleInfo) {
|
if (StorageService.to.hasVehicleInfo) {
|
||||||
VehicleInfo? bean = StorageService.to.vehicleInfo;
|
VehicleInfo? bean = StorageService.to.vehicleInfo;
|
||||||
if (bean == null) {
|
if (bean == null) {
|
||||||
@@ -35,6 +36,36 @@ class CarInfoController extends GetxController with BaseControllerMixin {
|
|||||||
modelName = bean.modelName;
|
modelName = bean.modelName;
|
||||||
brandName = bean.brandName;
|
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();
|
updateUi();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:getx_scaffold/getx_scaffold.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/pages/qr_code/view.dart';
|
||||||
import 'package:ln_jq_app/storage_service.dart';
|
import 'package:ln_jq_app/storage_service.dart';
|
||||||
// import 'package:getx_scaffold/getx_scaffold.dart'; // 如果不使用其中的扩展,可以注释掉
|
// import 'package:getx_scaffold/getx_scaffold.dart'; // 如果不使用其中的扩展,可以注释掉
|
||||||
@@ -256,7 +257,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
|||||||
backgroundColor: Colors.blue.withOpacity(0.1),
|
backgroundColor: Colors.blue.withOpacity(0.1),
|
||||||
child: Icon(icon, color: Colors.blue, size: 28),
|
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)),
|
subtitle: Text(subtitle, style: const TextStyle(color: Colors.grey, fontSize: 12)),
|
||||||
trailing: Container(
|
trailing: Container(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
@@ -265,7 +266,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
|||||||
borderRadius: BorderRadius.circular(8),
|
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: () {
|
onTap: () {
|
||||||
// TODO: 查看证件详情逻辑
|
// TODO: 查看证件详情逻辑
|
||||||
|
|||||||
Reference in New Issue
Block a user