补充空显示

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"];