补充空显示

This commit is contained in:
2025-11-18 17:52:04 +08:00
parent 12cd42fbf1
commit 02937f85cc
3 changed files with 9 additions and 5 deletions

View File

@@ -23,7 +23,6 @@ class ReservationController extends GetxController with BaseControllerMixin {
@override
void onInit() {
super.onInit();
// 可以在这里从服务器加载站点的初始信息
renderData();
}
@@ -58,8 +57,13 @@ class ReservationController extends GetxController with BaseControllerMixin {
name = result.data["name"];
hydrogenId = result.data["hydrogenId"].toString();
address = result.data["address"];
costPrice = result.data["costPrice"].toString();
customerPrice = result.data["customerPrice"].toString();
var rawCostPrice = result.data["costPrice"];
if (rawCostPrice != null && rawCostPrice.toString().isNotEmpty) {
costPrice = "¥$rawCostPrice";
} else {
costPrice = "暂无价格";
}
customerPrice = result.data["customerPrice"] ?? "暂无价格";
phone = result.data["phone"];
startBusiness = result.data["startBusiness"];
endBusiness = result.data["endBusiness"];

View File

@@ -71,7 +71,7 @@ class ReservationPage extends GetView<ReservationController> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_buildHeaderStat('¥${controller.costPrice}', '氢气价格'),
_buildHeaderStat(controller.costPrice, '氢气价格'),
_buildHeaderStat(controller.timeStr, '营业时间'),
_buildHeaderStat('98%', '设备状态'),
],

View File

@@ -452,7 +452,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
itemBuilder: (context, index) {
final ReservationModel reservation = reservationList[index];
return Card(
color: Color.fromARGB(255, 246, 248, 250),
color: Colors.white,
margin: const EdgeInsets.only(bottom: 12.0),
elevation: 1,
shape: RoundedRectangleBorder(