Browse Source

1、修复消息中心的bug

2、修复登录成功后的授权状态问题
3、修复退出登录后还显示用户信息的问题
tags/0.0.3+1
PH2 4 years ago
parent
commit
a94f0d8f31
5 changed files with 13 additions and 13 deletions
  1. +1
    -4
      lib/pages/custom_page/custom_item_page.dart
  2. +2
    -2
      lib/pages/message_notice_page/bloc/message_notice_repository.dart
  3. +1
    -1
      lib/pages/message_notice_page/message_notice_page.dart
  4. +1
    -1
      lib/pages/mine_detail_page/mine_detail_bloc.dart
  5. +8
    -5
      lib/widgets/mine/mine_header/mine_header.dart

+ 1
- 4
lib/pages/custom_page/custom_item_page.dart View File

@@ -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';


///
/// 通用模块的分类导航下的子模块


+ 2
- 2
lib/pages/message_notice_page/bloc/message_notice_repository.dart View File

@@ -19,8 +19,8 @@ class MessageNoticeRepository {

MessageNoticeRepository(final Map<String, dynamic> 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';
}


+ 1
- 1
lib/pages/message_notice_page/message_notice_page.dart View File

@@ -57,7 +57,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
BlocProvider.of<MessageNoticeBloc>(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点击的公共跳转


+ 1
- 1
lib/pages/mine_detail_page/mine_detail_bloc.dart View File

@@ -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);
});


+ 8
- 5
lib/widgets/mine/mine_header/mine_header.dart View File

@@ -17,13 +17,16 @@ class MineHeader extends StatefulWidget {
}

class _MineHeaderState extends State<MineHeader> {
UserInfoModel user;

@override
Widget build(BuildContext context) {
// if (_isSketelon) {
// return MineHeaderSkeleton();
// }
void didChangeDependencies() {
user = Provider.of<UserInfoNotifier>(context).userInfo;
super.didChangeDependencies();
}

UserInfoModel user = Provider.of<UserInfoNotifier>(context).userInfo;
@override
Widget build(BuildContext context) {
if (user == null || user.token == null || user.token == '') {
// 未登录
return MineStaticContainer(widget.data);


Loading…
Cancel
Save