优化
This commit is contained in:
@@ -177,6 +177,7 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
var scanResult = await Get.to(() => const QrCodePage());
|
||||
if (scanResult == true) {
|
||||
controller.getUserBindCarInfo();
|
||||
refreshAppui();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
@@ -233,13 +234,13 @@ class CarInfoPage extends GetView<CarInfoController> {
|
||||
const Divider(),
|
||||
_buildCertificateRow(
|
||||
icon: Icons.article_rounded,
|
||||
title: '运营证',
|
||||
title: '营运证',
|
||||
attachments: controller.operationAttachments,
|
||||
),
|
||||
const Divider(),
|
||||
_buildCertificateRow(
|
||||
icon: Icons.propane_tank_rounded,
|
||||
title: '氢瓶证',
|
||||
title: '加氢证',
|
||||
attachments: controller.hydrogenationAttachments,
|
||||
),
|
||||
const Divider(),
|
||||
|
||||
@@ -561,8 +561,6 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
);
|
||||
}
|
||||
|
||||
String phone = "";
|
||||
String name = "";
|
||||
String leftHydrogen = "0";
|
||||
String workEfficiency = "0";
|
||||
String fillingWeight = "0";
|
||||
@@ -570,13 +568,14 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
String plateNumber = "";
|
||||
String vin = "";
|
||||
|
||||
@override
|
||||
bool get listenLifecycleEvent => true;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
phone = StorageService.to.phone ?? "";
|
||||
name = StorageService.to.name ?? "";
|
||||
super.onInit();
|
||||
getUserBindCarInfo();
|
||||
getSiteList();
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
void getUserBindCarInfo() {
|
||||
|
||||
@@ -13,8 +13,8 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(C_ReservationController());
|
||||
return GetBuilder<C_ReservationController>(
|
||||
init: C_ReservationController(),
|
||||
id: 'reservation',
|
||||
builder: (_) {
|
||||
return Scaffold(
|
||||
@@ -99,12 +99,12 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
controller.name,
|
||||
"${StorageService.to.name}",
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 6),
|
||||
Text(
|
||||
controller.phone,
|
||||
"${StorageService.to.phone}",
|
||||
style: TextStyle(color: Colors.grey, fontSize: 11),
|
||||
),
|
||||
],
|
||||
@@ -204,6 +204,7 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
var scanResult = await Get.to(() => const QrCodePage());
|
||||
if (scanResult == true) {
|
||||
controller.getUserBindCarInfo();
|
||||
refreshAppui();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
@@ -484,7 +485,7 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
|
||||
/// 构建下拉菜单中的每一项
|
||||
Widget _buildDropdownItem(StationModel station) {
|
||||
bool isMaintenance = station.siteStatusName == '维修中';
|
||||
bool isMaintenance = (station.siteStatusName != '营运中');
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Row(
|
||||
@@ -495,11 +496,20 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
station.name,
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${station.name} | ¥${station.price}/kg',
|
||||
' | ¥${station.price}/kg',
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
if (isMaintenance) const SizedBox(width: 8),
|
||||
if (isMaintenance)
|
||||
@@ -509,8 +519,8 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
color: Colors.orange[100],
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: const Text(
|
||||
'维修中',
|
||||
child: Text(
|
||||
station.siteStatusName,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.orange,
|
||||
|
||||
Reference in New Issue
Block a user