补充空显示
This commit is contained in:
@@ -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"];
|
||||
|
||||
@@ -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%', '设备状态'),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user