From a94f0d8f315decc606c3e205b387189781f7a654 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Thu, 24 Dec 2020 22:04:02 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E7=9A=84bug=202=E3=80=81=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E5=90=8E=E7=9A=84=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98=203=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95=E5=90=8E?= =?UTF-8?q?=E8=BF=98=E6=98=BE=E7=A4=BA=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/custom_page/custom_item_page.dart | 5 +---- .../bloc/message_notice_repository.dart | 4 ++-- .../message_notice_page/message_notice_page.dart | 2 +- lib/pages/mine_detail_page/mine_detail_bloc.dart | 2 +- lib/widgets/mine/mine_header/mine_header.dart | 13 ++++++++----- 5 files changed, 13 insertions(+), 13 deletions(-) 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);