Commit fd42dd7446a25874dd011a74285d045430b20b2c

Authored by wdn127929
1 parent 9002f6aa

null

... ... @@ -183,6 +183,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}, showToast: false);
}
});
timer = Timer.periodic(Duration(minutes: 3), (_) {
_getAllUnMessages();
});
... ...
... ... @@ -101,9 +101,7 @@ class NoteBookPageState extends State<NoteBookPage> {
userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;
noon = userModel.user.noon.isEmpty ? "00:00-00:00" : userModel.user.noon;
night = userModel.user.night.isEmpty ? "00:00-00:00" : userModel.user.night;
if (widget.solt != null) {
currTimeIndex = int.parse(widget.solt);
} else {
if (widget.solt == null || widget.solt == "null") {
if (morning != '' &&
dateTimeNow.isBefore(DateTime.parse(dateTimeNow.year.toString() +
"-" +
... ... @@ -157,6 +155,8 @@ class NoteBookPageState extends State<NoteBookPage> {
//过了晚市
currTimeIndex = 3;
}
} else {
currTimeIndex = int.parse(widget.solt);
}
}
... ...
... ... @@ -60,9 +60,15 @@ class NavigatorUtil {
mine = false,
int dateTime,
String solt}) {
_navigateTo(context,
"${Routes.home}?initialIndex=$initialIndex&needRefresh=$needRefresh&mine=$mine&dateTime=$dateTime&solt=$solt",
clearStack: true);
// if (dateTime == null) {
// _navigateTo(context,
// "${Routes.home}?initialIndex=$initialIndex&needRefresh=$needRefresh&mine=$mine&dateTime=&solt=$solt",
// clearStack: true);
// } else {
_navigateTo(context,
"${Routes.home}?initialIndex=$initialIndex&needRefresh=$needRefresh&mine=$mine&dateTime=$dateTime&solt=$solt",
clearStack: true);
// }
}
/// 订单详情
... ...
... ... @@ -151,8 +151,11 @@ var homeHandler = new Handler(
String solt = params["solt"].first;
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(params["dateTime"].first));
DateTime dateTime = params["dateTime"].first == "null"
? null
: DateTime.fromMillisecondsSinceEpoch(
int.parse(params["dateTime"].first));
return HomePage(
initialIndex: int.parse(initialIndex),
... ...