未车辆显示

This commit is contained in:
2026-02-05 14:50:03 +08:00
parent 211d0225e4
commit f68c2d0938
4 changed files with 50 additions and 23 deletions

View File

@@ -536,13 +536,13 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
}
}
String workEfficiency = "0";
String fillingWeight = "0";
String fillingTimes = "0";
String workEfficiency = "-";
String fillingWeight = "-";
String fillingTimes = "-";
String modeImage = "";
String plateNumber = "";
String vin = "";
String leftHydrogen = "0";
String leftHydrogen = "-";
num maxHydrogen = 0;
String difference = "";
var progressValue = 0.0;
@@ -691,8 +691,8 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
var result = BaseModel.fromJson(responseData.data);
leftHydrogen = result.data["leftHydrogen"].toString();
workEfficiency = result.data["workEfficiency"].toString();
leftHydrogen = "${result.data["leftHydrogen"]}Kg";
workEfficiency = "${result.data["workEfficiency"]}Kg";
final leftHydrogenNum = double.tryParse(leftHydrogen) ?? 0.0;
difference = (maxHydrogen - leftHydrogenNum).toStringAsFixed(2);

View File

@@ -179,7 +179,12 @@ class ReservationPage extends GetView<C_ReservationController> {
const SizedBox(width: 8),
_buildModernStatItem('总加氢次数', '', controller.fillingTimes, ''),
const SizedBox(width: 8),
_buildModernStatItem('今日里程', '', "7kg", ''),
_buildModernStatItem(
'今日里程',
'',
StorageService.to.hasVehicleInfo ? "7kg" : "-",
'',
),
],
),
),
@@ -258,11 +263,14 @@ class ReservationPage extends GetView<C_ReservationController> {
flex: 6,
child: Column(
children: [
_buildCarDataItem('剩余电量', '36.8%'),
_buildCarDataItem(
'剩余电量',
StorageService.to.hasVehicleInfo ? '36.8%' : '-',
),
const SizedBox(height: 8),
_buildCarDataItem('剩余氢量', '${controller.leftHydrogen}Kg'),
_buildCarDataItem('剩余氢量', controller.leftHydrogen),
const SizedBox(height: 8),
_buildCarDataItem('百公里氢耗', '${controller.workEfficiency}Kg'),
_buildCarDataItem('百公里氢耗', controller.workEfficiency),
const SizedBox(height: 12),
Column(
children: [
@@ -290,7 +298,7 @@ class ReservationPage extends GetView<C_ReservationController> {
),
),
Text(
"${controller.leftHydrogen}Kg",
controller.leftHydrogen,
style: const TextStyle(
fontSize: 10,
color: Color(0xFF006633),