修复眠花糖设置闹钟无效
This commit is contained in:
@@ -269,7 +269,6 @@
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
@@ -286,6 +285,7 @@ import 'package:vbvs_app/controller/main_bottom/main_page_controller.dart';
|
||||
import 'package:vbvs_app/controller/message/message_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
import 'package:vbvs_app/enum/LoginStatus.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/main_bottom/e_page.dart';
|
||||
@@ -315,12 +315,10 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
bottomItems = [
|
||||
getBottomNavigationBarItem("assets/img/menu/home.svg",
|
||||
"assets/img/menu/n_home.svg", "菜单.首页".tr),
|
||||
getBottomNavigationBarItem("assets/img/menu/e.svg",
|
||||
"assets/img/menu/n_e.svg", "菜单.小e".tr),
|
||||
getBottomNavigationBarItem(
|
||||
"assets/img/menu/message.svg",
|
||||
"assets/img/menu/n_message.svg",
|
||||
"菜单.消息".tr,
|
||||
"assets/img/menu/e.svg", "assets/img/menu/n_e.svg", "菜单.小e".tr),
|
||||
getBottomNavigationBarItem("assets/img/menu/message.svg",
|
||||
"assets/img/menu/n_message.svg", "菜单.消息".tr,
|
||||
showBadge: (messageController.model.body_message_read == 1 ||
|
||||
messageController.model.system_message_read == 1)),
|
||||
getBottomNavigationBarItem("assets/img/menu/mine.svg",
|
||||
@@ -335,10 +333,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
bottomItems = [
|
||||
getBottomNavigationBarItem("assets/img/menu/home.svg",
|
||||
"assets/img/menu/n_home.svg", "菜单.首页".tr),
|
||||
getBottomNavigationBarItem(
|
||||
"assets/img/menu/message.svg",
|
||||
"assets/img/menu/n_message.svg",
|
||||
"菜单.消息".tr,
|
||||
getBottomNavigationBarItem("assets/img/menu/message.svg",
|
||||
"assets/img/menu/n_message.svg", "菜单.消息".tr,
|
||||
showBadge: (messageController.model.body_message_read == 1 ||
|
||||
messageController.model.system_message_read == 1)),
|
||||
getBottomNavigationBarItem("assets/img/menu/mine.svg",
|
||||
@@ -391,24 +387,26 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Future.delayed(const Duration(milliseconds: 0), () {
|
||||
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
|
||||
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
|
||||
String btnName = "同意".tr;
|
||||
String cancelName = "取消".tr;
|
||||
if (Platform.isAndroid) cancelName = "退出".tr;
|
||||
if (AppConstants().ent_type == APPPackageType.TH.code) {
|
||||
Future.delayed(const Duration(milliseconds: 0), () {
|
||||
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
|
||||
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
|
||||
String btnName = "同意".tr;
|
||||
String cancelName = "取消".tr;
|
||||
if (Platform.isAndroid) cancelName = "退出".tr;
|
||||
|
||||
showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1),
|
||||
btnName: btnName, showCancel: true, cancelName: cancelName)
|
||||
.then((e) {
|
||||
if (e == "confirm") {
|
||||
getStorage.write("isShowYingShiDialog", "true");
|
||||
} else {
|
||||
if (cancelName == "退出") SystemNavigator.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1),
|
||||
btnName: btnName, showCancel: true, cancelName: cancelName)
|
||||
.then((e) {
|
||||
if (e == "confirm") {
|
||||
getStorage.write("isShowYingShiDialog", "true");
|
||||
} else {
|
||||
if (cancelName == "退出") SystemNavigator.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
@@ -436,7 +434,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
return Scaffold(
|
||||
body: IndexedStack(
|
||||
index: currentIndex,
|
||||
children: arr.map((page) => SizedBox.expand(child: page)).toList(),
|
||||
children:
|
||||
arr.map((page) => SizedBox.expand(child: page)).toList(),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
@@ -451,7 +450,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
backgroundColor: Colors.transparent,
|
||||
body: IndexedStack(
|
||||
index: currentIndex,
|
||||
children: arr.map((page) => SizedBox.expand(child: page)).toList(),
|
||||
children:
|
||||
arr.map((page) => SizedBox.expand(child: page)).toList(),
|
||||
),
|
||||
bottomNavigationBar: Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
@@ -497,7 +497,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
Get.currentRoute == '/messagePage') {
|
||||
Get.back();
|
||||
}
|
||||
Future.delayed(const Duration(milliseconds: 100), () {
|
||||
Future.delayed(const Duration(milliseconds: 100),
|
||||
() {
|
||||
Get.toNamed("/otherLoginPage");
|
||||
});
|
||||
});
|
||||
@@ -505,7 +506,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
}
|
||||
|
||||
if (controller.model.currentIndex != index) {
|
||||
globalController.model.hideBottomNavigationBar = false;
|
||||
globalController.model.hideBottomNavigationBar =
|
||||
false;
|
||||
globalController.updateAll();
|
||||
}
|
||||
|
||||
@@ -527,7 +529,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
Future<bool> _handleBackPressed(BuildContext context) async {
|
||||
final currentTime = DateTime.now();
|
||||
if (_lastBackPressedTime == null ||
|
||||
currentTime.difference(_lastBackPressedTime!) > const Duration(seconds: 2)) {
|
||||
currentTime.difference(_lastBackPressedTime!) >
|
||||
const Duration(seconds: 2)) {
|
||||
_lastBackPressedTime = currentTime;
|
||||
TopSlideNotification.show(context, text: "滑动退出提醒".tr);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user