This commit is contained in:
2025-11-19 15:54:41 +08:00
parent 02937f85cc
commit 797afb63b1
5 changed files with 33 additions and 23 deletions

View File

@@ -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,