优化问题修改
This commit is contained in:
@@ -19,6 +19,10 @@ class MessageController extends GetxController {
|
||||
_loadData(isRefresh: true);
|
||||
}
|
||||
|
||||
void onRefresh() => _loadData(isRefresh: true);
|
||||
|
||||
void onLoading() => _loadData(isRefresh: false);
|
||||
|
||||
Future<void> _loadData({bool isRefresh = false}) async {
|
||||
final int targetPage = isRefresh ? 1 : _pageNum + 1;
|
||||
|
||||
@@ -100,9 +104,7 @@ class MessageController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
void onRefresh() => _loadData(isRefresh: true);
|
||||
|
||||
void onLoading() => _loadData(isRefresh: false);
|
||||
|
||||
// 标记全部已读
|
||||
void markAllRead() async {
|
||||
|
||||
@@ -401,6 +401,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
|
||||
lastSuccessfulReservation = ReservationModel(
|
||||
id: selectedStationId.value!,
|
||||
stationId: '',
|
||||
hydAmount: ampuntStr,
|
||||
startTime: startTimeStr,
|
||||
endTime: endTimeStr,
|
||||
|
||||
@@ -74,8 +74,8 @@ class ReservationEditController extends GetxController with BaseControllerMixin
|
||||
final now = DateTime.now();
|
||||
final isToday =
|
||||
selectedDate.value.year == now.year &&
|
||||
selectedDate.value.month == now.month &&
|
||||
selectedDate.value.day == now.day;
|
||||
selectedDate.value.month == now.month &&
|
||||
selectedDate.value.day == now.day;
|
||||
|
||||
final List<TimeSlot> availableSlots = [];
|
||||
for (int i = 0; i < 24; i++) {
|
||||
@@ -123,7 +123,7 @@ class ReservationEditController extends GetxController with BaseControllerMixin
|
||||
|
||||
// 查找当前选中的时间对应的新列表中的索引
|
||||
int initialItem = availableSlots.indexWhere(
|
||||
(slot) => slot.start.hour == startTime.value.hour,
|
||||
(slot) => slot.start.hour == startTime.value.hour,
|
||||
);
|
||||
|
||||
if (initialItem == -1) {
|
||||
@@ -132,7 +132,6 @@ class ReservationEditController extends GetxController with BaseControllerMixin
|
||||
|
||||
TimeSlot tempSlot = availableSlots[initialItem];
|
||||
|
||||
|
||||
Get.bottomSheet(
|
||||
Container(
|
||||
height: 300,
|
||||
@@ -228,6 +227,7 @@ class ReservationEditController extends GetxController with BaseControllerMixin
|
||||
'appointment/orderAddHyd/saveOrUpdate',
|
||||
data: {
|
||||
'id': reservation.id,
|
||||
'stationId': reservation.stationId,
|
||||
'startTime': startTimeStr,
|
||||
'endTime': endTimeStr,
|
||||
'hydAmount': amountStr,
|
||||
|
||||
Reference in New Issue
Block a user