diff --git a/lib/pages/custom_page/custom_item_page.dart b/lib/pages/custom_page/custom_item_page.dart index fa98bdf..1b146c2 100644 --- a/lib/pages/custom_page/custom_item_page.dart +++ b/lib/pages/custom_page/custom_item_page.dart @@ -6,16 +6,13 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart'; import 'package:zhiying_base_widget/widgets/empty/empty_widget.dart'; import 'package:zhiying_base_widget/widgets/home/home_auth/home_auth.dart'; -import 'package:zhiying_base_widget/widgets/refresh/refresh_footer/refresh_footer.dart'; import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_gif_header.dart'; -import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_header.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; import 'bloc/custom_item_page_bloc.dart'; import 'bloc/custom_item_page_state.dart'; import 'bloc/custom_item_page_event.dart'; import 'bloc/custom_item_page_repository.dart'; -import 'dart:ui'; -import 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart'; + /// /// 通用模块的分类导航下的子模块 diff --git a/lib/pages/message_notice_page/bloc/message_notice_repository.dart b/lib/pages/message_notice_page/bloc/message_notice_repository.dart index ee653a0..113b0d9 100644 --- a/lib/pages/message_notice_page/bloc/message_notice_repository.dart +++ b/lib/pages/message_notice_page/bloc/message_notice_repository.dart @@ -19,8 +19,8 @@ class MessageNoticeRepository { MessageNoticeRepository(final Map data) { try { - _type = !EmptyUtil.isEmpty(data) ? data.containsKey('type') ? data['type'] : 'main' : 'main'; - _title = !EmptyUtil.isEmpty(data) ? data.containsKey('title') ? data['title'] : '消息中心' : '消息中心'; + _type = !EmptyUtil.isEmpty(data) ? data.containsKey('NoticePageType') ? data['NoticePageType'] : 'main' : 'main'; + _title = !EmptyUtil.isEmpty(data) ? data.containsKey('NoticePageTitle') ? data['NoticePageTitle'] : '消息中心' : '消息中心'; } catch (e, s) { _type = 'main'; } diff --git a/lib/pages/message_notice_page/message_notice_page.dart b/lib/pages/message_notice_page/message_notice_page.dart index 4d1e672..0e82d56 100644 --- a/lib/pages/message_notice_page/message_notice_page.dart +++ b/lib/pages/message_notice_page/message_notice_page.dart @@ -57,7 +57,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine BlocProvider.of(context).add(MessageNoticeClearPointEvent(selectId: dataModel?.id)); /// 如果是消息中心,则重新打开页面加载 - Navigator.push(context, CupertinoPageRoute(builder: (_) => MessageNoticePage({'type': styleModel?.type, 'title': styleModel?.name}))); + Navigator.push(context, CupertinoPageRoute(builder: (_) => MessageNoticePage({'NoticePageType': styleModel?.type, 'NoticePageTitle': styleModel?.name}))); } /// 子item点击的公共跳转 diff --git a/lib/pages/mine_detail_page/mine_detail_bloc.dart b/lib/pages/mine_detail_page/mine_detail_bloc.dart index 7e5bf99..ae9e232 100644 --- a/lib/pages/mine_detail_page/mine_detail_bloc.dart +++ b/lib/pages/mine_detail_page/mine_detail_bloc.dart @@ -25,7 +25,7 @@ class MineDetailBloc extends BlocBase { void loadData() { NetUtil.request('/api/v1/user/info', method: NetMethod.GET, onCache: (data) { - if (_user == null) _loadData(data); + // if (_user == null) _loadData(data); }, onSuccess: (data) { _loadData(data); }); diff --git a/lib/widgets/mine/mine_header/mine_header.dart b/lib/widgets/mine/mine_header/mine_header.dart index 8587099..21e6794 100644 --- a/lib/widgets/mine/mine_header/mine_header.dart +++ b/lib/widgets/mine/mine_header/mine_header.dart @@ -17,13 +17,16 @@ class MineHeader extends StatefulWidget { } class _MineHeaderState extends State { + UserInfoModel user; + @override - Widget build(BuildContext context) { - // if (_isSketelon) { - // return MineHeaderSkeleton(); - // } + void didChangeDependencies() { + user = Provider.of(context).userInfo; + super.didChangeDependencies(); + } - UserInfoModel user = Provider.of(context).userInfo; + @override + Widget build(BuildContext context) { if (user == null || user.token == null || user.token == '') { // 未登录 return MineStaticContainer(widget.data);