优化定时器 弹窗

This commit is contained in:
2026-01-15 13:29:02 +08:00
parent 9b64fdfa52
commit e7a9e4483a
5 changed files with 28 additions and 7 deletions

View File

@@ -35,6 +35,7 @@ class CarInfoController extends GetxController with BaseControllerMixin {
// 如果未绑定车辆,且本次会话尚未提示过,则弹出提示
if (!StorageService.to.hasShownBindVehicleDialog &&
StorageService.to.isLoggedIn &&
StorageService.to.loginChannel == LoginChannel.driver &&
!StorageService.to.hasVehicleInfo) {
Future.delayed(const Duration(milliseconds: 500), () {
DialogX.to.showConfirmDialog(

View File

@@ -85,6 +85,7 @@ class MineController extends GetxController with BaseControllerMixin {
if (result.code == 0 && result.data != null) {
String total = result.data["total"].toString();
isNotice = int.parse(total) > 0;
updateUi();
}
}
}

View File

@@ -557,10 +557,9 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
}
@override
void dispose() {
_sheetWorker?.dispose();
void onPaused() {
stopAutoRefresh();
super.dispose();
super.onPaused();
}
void startAutoRefresh() {
@@ -757,6 +756,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
// 如果未绑定车辆,且本次会话尚未提示过,则弹出提示
if (!StorageService.to.hasShownBindVehicleDialog &&
StorageService.to.isLoggedIn &&
StorageService.to.loginChannel == LoginChannel.driver &&
!StorageService.to.hasVehicleInfo) {
Future.delayed(const Duration(milliseconds: 500), () {
DialogX.to.showConfirmDialog(
@@ -787,6 +787,8 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
if (_debounce != null) {
_debounce?.cancel();
}
_sheetWorker?.dispose();
stopAutoRefresh();
super.onClose();
}
}