From 15089938d6df797029e4206249c29a0850cdba4c Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 19 Feb 2021 17:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3=EF=BC=9A?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/model/message/message_center_model.dart | 11 ++++++++++- .../message_center_page/message_center_page.dart | 12 ++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/model/message/message_center_model.dart b/lib/model/message/message_center_model.dart index b9d9e610..affd4a98 100644 --- a/lib/model/message/message_center_model.dart +++ b/lib/model/message/message_center_model.dart @@ -1,23 +1,32 @@ class MessageCenterModel { + String commentTitle; int sysCount; String sysTitle; + int commentCount; MessageCenterModel.zero() { + commentTitle = ''; sysCount = 0; sysTitle = ''; + commentCount = 0; } - MessageCenterModel({this.sysCount, this.sysTitle}); + MessageCenterModel( + {this.commentTitle, this.sysCount, this.sysTitle, this.commentCount}); MessageCenterModel.fromJson(Map json) { + commentTitle = json['commentTitle']; sysCount = json['sysCount']; sysTitle = json['sysTitle']; + commentCount = json['commentCount']; } Map toJson() { final Map data = new Map(); + data['commentTitle'] = this.commentTitle; data['sysCount'] = this.sysCount; data['sysTitle'] = this.sysTitle; + data['commentCount'] = this.commentCount; return data; } } diff --git a/lib/pages/message_center_page/message_center_page.dart b/lib/pages/message_center_page/message_center_page.dart index 3e211d40..5454d04d 100644 --- a/lib/pages/message_center_page/message_center_page.dart +++ b/lib/pages/message_center_page/message_center_page.dart @@ -73,12 +73,12 @@ class _MessageCenterPageState extends State { count: appProvider.messageCenterModel.sysCount, onTap: SystemMessagePage().to, ), - // _buildCard( - // path: R.ASSETS_ICONS_COMMENT_NOTICE_PNG, - // title: '评论通知', - // content: '', - // count: 0, - // ), + _buildCard( + path: R.ASSETS_ICONS_COMMENT_NOTICE_PNG, + title: '评论通知', + content: appProvider.messageCenterModel.commentTitle, + count: appProvider.messageCenterModel.commentCount, + ), // _buildCard( // path: R.ASSETS_ICONS_SHOP_NOTICE_PNG, // title: '商城通知',