diff --git a/lib/ui/community/community_views/event_detail_page.dart b/lib/ui/community/community_views/event_detail_page.dart index e96c9032..a70b9b06 100644 --- a/lib/ui/community/community_views/event_detail_page.dart +++ b/lib/ui/community/community_views/event_detail_page.dart @@ -605,21 +605,26 @@ class _EventDetailPageState extends State { minWidth: 120.w, height: 55.w, onPressed: () async { - var res = await NetUtil() - .post(SAASAPI.community.commentInsert, params: params); - if (res.success) { - _textEditingController.clear(); - if (_rootId == 0) { - _refreshController.callRefresh(); + if (_textEditingController.text.trim().isEmptyOrNull) { + BotToast.showText(text: '请填写内容'); + return; + }else{ + var res = await NetUtil() + .post(SAASAPI.community.commentInsert, params: params); + if (res.success) { + _textEditingController.clear(); + if (_rootId == 0) { + _refreshController.callRefresh(); + } else { + await updateComments(); + _focusNode.unfocus(); + } + setState(() {}); } else { - await updateComments(); - _focusNode.unfocus(); + BotToast.showText(text: res.msg); } - setState(() {}); - } else { - BotToast.showText(text: res.msg); + FocusScope.of(context).requestFocus(FocusNode()); } - FocusScope.of(context).requestFocus(FocusNode()); }, child: Text( '发布', diff --git a/lib/ui/community/community_views/my_community_view.dart b/lib/ui/community/community_views/my_community_view.dart index fc85cc52..ef635f79 100644 --- a/lib/ui/community/community_views/my_community_view.dart +++ b/lib/ui/community/community_views/my_community_view.dart @@ -224,6 +224,7 @@ class MyCommunityViewState extends State ), 50.wb, Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( width: 552.w,