|
|
|
@ -23,6 +23,7 @@ class SystemDetails extends StatefulWidget {
|
|
|
|
|
final Map<String, dynamic> arguments; |
|
|
|
|
|
|
|
|
|
SystemDetails({this.arguments}); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
|
return _SystemDetails(); |
|
|
|
@ -34,6 +35,7 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
int pageNum = 1; |
|
|
|
|
List<Message> messages = []; |
|
|
|
|
int msgType = 0; |
|
|
|
|
|
|
|
|
|
// String parenId = "0"; |
|
|
|
|
var commentFocus = FocusNode(); |
|
|
|
|
String hintText = S.current.liuxianinjingcaidepinglunba; |
|
|
|
@ -43,7 +45,6 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
final TextEditingController commentTextController = TextEditingController(); |
|
|
|
|
int indexMsg = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
void initState() { |
|
|
|
|
super.initState(); |
|
|
|
@ -56,7 +57,6 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_refresh() { |
|
|
|
|
pageNum = 1; |
|
|
|
|
queryMessage(); |
|
|
|
@ -93,12 +93,13 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///关注/取关会员 |
|
|
|
|
_vipFollow(followId,isFollow) async { |
|
|
|
|
_vipFollow(followId, isFollow) async { |
|
|
|
|
BaseData baseData = await apiService.follow(followId); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
// widget.refresh(); |
|
|
|
|
queryMessage(); |
|
|
|
|
SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast(isFollow ? "取关成功" : "关注成功", |
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
@ -117,16 +118,15 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
BaseData baseData = await apiService.memberComment({ |
|
|
|
|
"content": content, |
|
|
|
|
"parentId": messageRelational["additionId"].toString(), |
|
|
|
|
"relationalId":messageRelational["businessId"].toString(), |
|
|
|
|
"relationalType":4 |
|
|
|
|
"relationalId": messageRelational["businessId"].toString(), |
|
|
|
|
"relationalType": 4 |
|
|
|
|
}).catchError((error) {}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
commentTextController.text = ""; |
|
|
|
|
FocusScope.of(context).unfocus(); |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
SmartDialog.showToast("发布成功", alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -139,11 +139,19 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
appBar: MyAppBar( |
|
|
|
|
background: Colors.white, |
|
|
|
|
leadingColor: Colors.black, |
|
|
|
|
title: (msgType == 2) ? S.of(context).dingdantongzhi:(msgType == 3) ? S.of(context).chongzhixiaoxi:(msgType == 4) ?"关注":(msgType == 5) ?"点赞":"评论", |
|
|
|
|
title: (msgType == 2) |
|
|
|
|
? S.of(context).dingdantongzhi |
|
|
|
|
: (msgType == 3) |
|
|
|
|
? S.of(context).chongzhixiaoxi |
|
|
|
|
: (msgType == 4) |
|
|
|
|
? S.of(context).guanzhu |
|
|
|
|
: (msgType == 5) |
|
|
|
|
? S.of(context).dianzan |
|
|
|
|
: S.of(context).pinglun, |
|
|
|
|
titleSize: 18.sp, |
|
|
|
|
titleColor: Colors.black, |
|
|
|
|
), |
|
|
|
|
body:SmartRefresher( |
|
|
|
|
body: SmartRefresher( |
|
|
|
|
enablePullDown: true, |
|
|
|
|
enablePullUp: true, |
|
|
|
|
header: MyHeader(), |
|
|
|
@ -151,7 +159,7 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
footer: CustomFooter( |
|
|
|
|
loadStyle: LoadStyle.ShowWhenLoading, |
|
|
|
|
builder: (BuildContext context, LoadStatus mode) { |
|
|
|
|
return (messages.length == 0)?Container():MyFooter(mode); |
|
|
|
|
return (messages.length == 0) ? Container() : MyFooter(mode); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
controller: _refreshController, |
|
|
|
@ -159,24 +167,17 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
onLoading: () { |
|
|
|
|
queryMessage(); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
Container( |
|
|
|
|
child: Container( |
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
child: |
|
|
|
|
Container( |
|
|
|
|
child: Container( |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
if(msgType == 2) |
|
|
|
|
orderMessage(), |
|
|
|
|
if(msgType == 3) |
|
|
|
|
rechargeMessage(), |
|
|
|
|
if(msgType == 5) |
|
|
|
|
fabulousMessage(), |
|
|
|
|
if(msgType == 6) |
|
|
|
|
commentMessage(), |
|
|
|
|
if(msgType == 4) |
|
|
|
|
followMessage(), |
|
|
|
|
if (msgType == 2) orderMessage(), |
|
|
|
|
if (msgType == 3) rechargeMessage(), |
|
|
|
|
if (msgType == 5) fabulousMessage(), |
|
|
|
|
if (msgType == 6) commentMessage(), |
|
|
|
|
if (msgType == 4) followMessage(), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -187,12 +188,13 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///订单通知 |
|
|
|
|
Widget orderMessage(){ |
|
|
|
|
Widget orderMessage() { |
|
|
|
|
return Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.only(top:10.h,bottom:20.h,left: 20.w,right: 20.w), |
|
|
|
|
child:Column( |
|
|
|
|
padding: |
|
|
|
|
EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -221,14 +223,13 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
); |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget orderMessageItem(Message message) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), |
|
|
|
|
child: |
|
|
|
|
Column( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -248,7 +249,7 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width:8.w, |
|
|
|
|
width: 8.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
(message.typed == 1) |
|
|
|
@ -275,22 +276,24 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
margin: EdgeInsets.only(left:30.w, top:20.h), |
|
|
|
|
margin: EdgeInsets.only(left: 30.w, top: 20.h), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
message.content, |
|
|
|
|
maxLines: 2, |
|
|
|
|
overflow:TextOverflow.ellipsis, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Icon( |
|
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
|
color: Colors.black, |
|
|
|
@ -312,18 +315,19 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///充值消息通知 |
|
|
|
|
Widget rechargeMessage(){ |
|
|
|
|
Widget rechargeMessage() { |
|
|
|
|
return Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.only(top:10.h,bottom:20.h,left: 20.w,right: 20.w), |
|
|
|
|
child:Column( |
|
|
|
|
padding: |
|
|
|
|
EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
(messages == null || messages.length == 0) |
|
|
|
|
? NoDataView( |
|
|
|
|
src:"assets/image/icon_empty.webp", |
|
|
|
|
src: "assets/image/icon_empty.webp", |
|
|
|
|
isShowBtn: false, |
|
|
|
|
text: S.of(context).haimeiyouxiaoxi, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
@ -346,14 +350,13 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
); |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget rechargeMessageItem(Message message) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), |
|
|
|
|
child: |
|
|
|
|
Column( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -373,7 +376,7 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width:8.w, |
|
|
|
|
width: 8.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
(message.typed == 1) |
|
|
|
@ -400,7 +403,7 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
margin: EdgeInsets.only(left:30.w, top:20.h), |
|
|
|
|
margin: EdgeInsets.only(left: 30.w, top: 20.h), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
@ -413,20 +416,24 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height:8.h,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8.h, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
message.content, |
|
|
|
|
maxLines: 2, |
|
|
|
|
overflow:TextOverflow.ellipsis, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Icon( |
|
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
|
color: Colors.black, |
|
|
|
@ -448,18 +455,18 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///点赞通知 |
|
|
|
|
Widget fabulousMessage(){ |
|
|
|
|
Widget fabulousMessage() { |
|
|
|
|
return Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.only(bottom:20.h,left: 20.w,right: 20.w), |
|
|
|
|
child:Column( |
|
|
|
|
padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
(messages == null || messages.length == 0) |
|
|
|
|
? NoDataView( |
|
|
|
|
src:"assets/image/icon_empty.webp", |
|
|
|
|
src: "assets/image/icon_empty.webp", |
|
|
|
|
isShowBtn: false, |
|
|
|
|
text: S.of(context).haimeiyouxiaoxi, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
@ -476,8 +483,11 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/community_details', |
|
|
|
|
arguments: { |
|
|
|
|
"businessId":jsonDecode(messages[position].relational)["businessId"].toString(), |
|
|
|
|
"mid":messages[position].mid |
|
|
|
|
"businessId": |
|
|
|
|
jsonDecode(messages[position].relational)[ |
|
|
|
|
"businessId"] |
|
|
|
|
.toString(), |
|
|
|
|
"mid": messages[position].mid |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
@ -485,14 +495,13 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
); |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget fabulousMessageItem(Message message) { |
|
|
|
|
var messageRelational = jsonDecode(message.relational); |
|
|
|
|
return Container( |
|
|
|
|
child: |
|
|
|
|
Row( |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -505,24 +514,27 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox(width: 8,), |
|
|
|
|
Expanded(child:Column( |
|
|
|
|
SizedBox( |
|
|
|
|
width: 8, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
messageRelational["nickname"] ?? "", |
|
|
|
|
Text(messageRelational["nickname"] ?? "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF1A1A1A)) |
|
|
|
|
color: Color(0xFF1A1A1A))), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 8.w, |
|
|
|
|
), |
|
|
|
|
SizedBox(width:8.w,), |
|
|
|
|
Text( |
|
|
|
|
"点赞了", |
|
|
|
|
style:TextStyle( |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
@ -530,7 +542,9 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 8,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
message.updateTime, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -538,11 +552,13 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
color: Color(0xFFA29E9E), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height:12.h,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
color:Color(0xFFF2F2F2), |
|
|
|
|
padding:EdgeInsets.all(5), |
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
padding: EdgeInsets.all(5), |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
@ -557,7 +573,7 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
MImage( |
|
|
|
|
messageRelational["nickname"] , |
|
|
|
|
messageRelational["nickname"], |
|
|
|
|
width: 38, |
|
|
|
|
height: 38, |
|
|
|
|
isCircle: true, |
|
|
|
@ -566,23 +582,25 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox(width:2.w), |
|
|
|
|
Expanded(child:Text( |
|
|
|
|
SizedBox(width: 2.w), |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
messageRelational["content"] ?? "", |
|
|
|
|
maxLines: 2, |
|
|
|
|
overflow:TextOverflow.ellipsis, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
height: 1.3, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(0xFF808080), |
|
|
|
|
), |
|
|
|
|
),) |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(top: 16.h,bottom:16.h), |
|
|
|
|
margin: EdgeInsets.only(top: 16.h, bottom: 16.h), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
color: Color(0xFFF7F7F7), |
|
|
|
@ -595,18 +613,18 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///评论通知 |
|
|
|
|
Widget commentMessage(){ |
|
|
|
|
Widget commentMessage() { |
|
|
|
|
return Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.only(bottom:20.h,left: 20.w,right: 20.w), |
|
|
|
|
child:Column( |
|
|
|
|
padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
(messages == null || messages.length == 0) |
|
|
|
|
? NoDataView( |
|
|
|
|
src:"assets/image/icon_empty.webp", |
|
|
|
|
src: "assets/image/icon_empty.webp", |
|
|
|
|
isShowBtn: false, |
|
|
|
|
text: S.of(context).haimeiyouxiaoxi, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
@ -623,23 +641,25 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/community_details', |
|
|
|
|
arguments: { |
|
|
|
|
"businessId":jsonDecode(messages[position].relational)["businessId"].toString(), |
|
|
|
|
"mid":messages[position].mid |
|
|
|
|
"businessId": |
|
|
|
|
jsonDecode(messages[position].relational)[ |
|
|
|
|
"businessId"] |
|
|
|
|
.toString(), |
|
|
|
|
"mid": messages[position].mid |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
child: commentMessageItem(messages[position],position), |
|
|
|
|
child: commentMessageItem(messages[position], position), |
|
|
|
|
); |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
Widget commentMessageItem(Message message,index) { |
|
|
|
|
|
|
|
|
|
Widget commentMessageItem(Message message, index) { |
|
|
|
|
var messageRelational = jsonDecode(message.relational); |
|
|
|
|
return Container( |
|
|
|
|
child: |
|
|
|
|
Row( |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -652,8 +672,11 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox(width: 8,), |
|
|
|
|
Expanded(child:Column( |
|
|
|
|
SizedBox( |
|
|
|
|
width: 8, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -661,23 +684,24 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: Column( |
|
|
|
|
Expanded( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
messageRelational["nickname"], |
|
|
|
|
Text(messageRelational["nickname"], |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF1A1A1A)) |
|
|
|
|
color: Color(0xFF1A1A1A))), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 8.w, |
|
|
|
|
), |
|
|
|
|
SizedBox(width:8.w,), |
|
|
|
|
Text( |
|
|
|
|
"评论了", |
|
|
|
|
style:TextStyle( |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
@ -685,7 +709,9 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 8,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
message.updateTime, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -694,9 +720,10 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
indexMsg = index; |
|
|
|
|
showDeleteDialog(); |
|
|
|
@ -704,9 +731,9 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
height:22.h, |
|
|
|
|
height: 22.h, |
|
|
|
|
width: 40.w, |
|
|
|
|
padding:EdgeInsets.only(left:2,right:2), |
|
|
|
|
padding: EdgeInsets.only(left: 2, right: 2), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(11), |
|
|
|
@ -728,7 +755,9 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height:8.h,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8.h, |
|
|
|
|
), |
|
|
|
|
// Text( |
|
|
|
|
// messageRelational["content"], |
|
|
|
|
// maxLines: 2, |
|
|
|
@ -785,8 +814,8 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
// ), |
|
|
|
|
Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
color:Color(0xFFF2F2F2), |
|
|
|
|
padding:EdgeInsets.all(5), |
|
|
|
|
color: Color(0xFFF2F2F2), |
|
|
|
|
padding: EdgeInsets.all(5), |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
@ -810,23 +839,25 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox(width:2.w), |
|
|
|
|
Expanded(child:Text( |
|
|
|
|
SizedBox(width: 2.w), |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
messageRelational["content"], |
|
|
|
|
maxLines: 2, |
|
|
|
|
overflow:TextOverflow.ellipsis, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
height: 1.3, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(0xFF808080), |
|
|
|
|
), |
|
|
|
|
),) |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(top: 16.h,bottom:16.h), |
|
|
|
|
margin: EdgeInsets.only(top: 16.h, bottom: 16.h), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
color: Color(0xFFF7F7F7), |
|
|
|
@ -839,18 +870,18 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///关注通知 |
|
|
|
|
Widget followMessage(){ |
|
|
|
|
Widget followMessage() { |
|
|
|
|
return Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.only(bottom:20.h,left: 20.w,right: 20.w), |
|
|
|
|
child:Column( |
|
|
|
|
padding: EdgeInsets.only(bottom: 20.h, left: 20.w, right: 20.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
(messages == null || messages.length == 0) |
|
|
|
|
? NoDataView( |
|
|
|
|
src:"assets/image/icon_empty.webp", |
|
|
|
|
src: "assets/image/icon_empty.webp", |
|
|
|
|
isShowBtn: false, |
|
|
|
|
text: S.of(context).haimeiyouxiaoxi, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
@ -873,19 +904,17 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
); |
|
|
|
|
}), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget followMessageItem(Message message) { |
|
|
|
|
var messageRelational = jsonDecode(message.relational); |
|
|
|
|
if(message.relational.startsWith("{")) |
|
|
|
|
if (message.relational.startsWith("{")) |
|
|
|
|
return Container( |
|
|
|
|
child: |
|
|
|
|
Row( |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
|
|
|
|
|
MImage( |
|
|
|
|
messageRelational["avatar"], |
|
|
|
|
width: 44, |
|
|
|
@ -895,8 +924,11 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox(width: 8,), |
|
|
|
|
Expanded(child:Column( |
|
|
|
|
SizedBox( |
|
|
|
|
width: 8, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -904,23 +936,24 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: Column( |
|
|
|
|
Expanded( |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
messageRelational["nickname"], |
|
|
|
|
Text(messageRelational["nickname"], |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF1A1A1A)) |
|
|
|
|
color: Color(0xFF1A1A1A))), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 8.w, |
|
|
|
|
), |
|
|
|
|
SizedBox(width:8.w,), |
|
|
|
|
Text( |
|
|
|
|
"关注了你", |
|
|
|
|
style:TextStyle( |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
@ -928,7 +961,9 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 8,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
message.updateTime, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -937,17 +972,18 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
_vipFollow(messageRelational["mid"].toString(),message?.followed ?? false); |
|
|
|
|
_vipFollow(messageRelational["mid"].toString(), |
|
|
|
|
message?.followed ?? false); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
RoundButton( |
|
|
|
|
child: RoundButton( |
|
|
|
|
height: 21.h, |
|
|
|
|
width:56.w, |
|
|
|
|
width: 56.w, |
|
|
|
|
padding: EdgeInsets.all(2), |
|
|
|
|
backgroup: (message?.followed ?? false) |
|
|
|
|
? Color(0xFFE6E6E6) |
|
|
|
@ -956,12 +992,12 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
? Color(0xFF808080) |
|
|
|
|
: Colors.white, |
|
|
|
|
text: (message?.followed ?? false) ? "已关注" : "回关", |
|
|
|
|
radius:20, |
|
|
|
|
radius: 20, |
|
|
|
|
icons: Icon( |
|
|
|
|
(message?.followed ?? false) |
|
|
|
|
? Icons.check |
|
|
|
|
: Icons.add, |
|
|
|
|
color: (message?.followed?? false) |
|
|
|
|
color: (message?.followed ?? false) |
|
|
|
|
? Color(0xFF808080) |
|
|
|
|
: Colors.white, |
|
|
|
|
size: 12, |
|
|
|
@ -1009,9 +1045,11 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox(height:8.h,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8.h, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(top: 16.h,bottom:16.h), |
|
|
|
|
margin: EdgeInsets.only(top: 16.h, bottom: 16.h), |
|
|
|
|
height: 1.h, |
|
|
|
|
width: double.infinity, |
|
|
|
|
color: Color(0xFFF7F7F7), |
|
|
|
@ -1061,11 +1099,11 @@ class _SystemDetails extends State<SystemDetails> {
|
|
|
|
|
child: TextField( |
|
|
|
|
maxLines: 8, |
|
|
|
|
minLines: 1, |
|
|
|
|
focusNode:commentFocus, |
|
|
|
|
controller:commentTextController, |
|
|
|
|
focusNode: commentFocus, |
|
|
|
|
controller: commentTextController, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
border: InputBorder.none, |
|
|
|
|
hintText:hintText, |
|
|
|
|
hintText: hintText, |
|
|
|
|
hintStyle: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF868686), |
|
|
|
|