From 7db39ef7894a24ef7a0f00047fa8695ef668e042 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Fri, 18 Mar 2022 10:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=A4=BE=E7=BE=A4=E6=8A=AC?= =?UTF-8?q?=E5=A4=B4,=E4=B8=BE=E6=8A=A5,=E9=A6=96=E9=A1=B5=E5=87=80?= =?UTF-8?q?=E5=BC=BC=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/community/community_page.dart | 18 +- .../community_view/community_dynamic.dart | 41 +-- lib/community/report/report_page.dart | 283 +++++++----------- lib/generated/intl/messages_en.dart | 2 +- lib/generated/intl/messages_zh_CN.dart | 2 +- lib/generated/intl/messages_zh_Hans_CN.dart | 2 +- lib/generated/intl/messages_zh_Hant_CN.dart | 2 +- lib/generated/intl/messages_zh_TW.dart | 2 +- lib/generated/l10n.dart | 4 +- lib/l10n/intl_en.arb | 2 +- lib/l10n/intl_zh_CN.arb | 2 +- lib/l10n/intl_zh_Hans_CN.arb | 2 +- lib/l10n/intl_zh_Hant_CN.arb | 2 +- lib/l10n/intl_zh_TW.arb | 2 +- lib/message/system_details.dart | 10 +- 15 files changed, 149 insertions(+), 227 deletions(-) diff --git a/lib/community/community_page.dart b/lib/community/community_page.dart index 61ea508c..421c89d0 100644 --- a/lib/community/community_page.dart +++ b/lib/community/community_page.dart @@ -24,10 +24,10 @@ class _CommunityPage extends State List lables = [ "关注", - "推荐", - "头条", - "课程", - "关于我们", + "分享健康", + "了解健康", + "学习健康", + "关于回乡", // "直播", ]; @@ -94,16 +94,16 @@ class _CommunityPage extends State child: TabBarView( physics: BouncingScrollPhysics(), children: lables.map((e) { - if (e == "关于我们") { + if (e == "关于回乡") { return BrandPage(); - }else if(e == "头条"){ + }else if(e == "了解健康"){ return ArticlePage(); - }else if(e == "课程"){ + }else if(e == "学习健康"){ return CommunityCourse(); } - else if(e == "推荐"){ + else if(e == "分享健康"){ if (tuijian == null){ - tuijian = CommunityChildPage("推荐"); + tuijian = CommunityChildPage("分享健康"); } return tuijian; }else if(e == "关注"){ diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index fd256b4b..7e081cec 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -410,26 +410,27 @@ class _CommunityDynamic extends State { ], ), ), - // if (widget?.article?.author != widget.userId ?? "") - // Expanded( - // child: GestureDetector( - // behavior: HitTestBehavior.opaque, - // onTap: () { - // setState(() { - // choiceShowBottomSheet(); - // }); - // }, - // child: Container( - // alignment: Alignment.center, - // child: Text( - // "...", - // style: TextStyle( - // fontSize: 18.sp, - // fontWeight: MyFontWeight.medium, - // color: Colors.black, - // ), - // ), - // ))), + if (widget?.article?.author != widget.userId ?? "") + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + choiceShowBottomSheet(); + }); + }, + child: Container( + padding: EdgeInsets.only(top:3), + alignment: Alignment.center, + child: Text( + "...", + style: TextStyle( + fontSize: 18.sp, + fontWeight: MyFontWeight.medium, + color: Colors.black, + ), + ), + ))), ], ), ], diff --git a/lib/community/report/report_page.dart b/lib/community/report/report_page.dart index 49b0a300..0b10e0d9 100644 --- a/lib/community/report/report_page.dart +++ b/lib/community/report/report_page.dart @@ -27,7 +27,7 @@ class _ReportPage extends State { ApiService apiService; int textLength = 0; final TextEditingController editingController = TextEditingController(); - String textContext; + String textCon; String userName; String authorId; @@ -48,14 +48,13 @@ class _ReportPage extends State { ); } BaseData baseData = await apiService.complaint({ - "content": editingController.text, - "informationId":authorId, + "content": checkIndex == 9 ? editingController.text : textCon, + "informationId": authorId, }).catchError((onError) {}); if (baseData != null && baseData.isSuccess) { - Navigator.of(context) - .pushNamed('/router/report_success'); + Navigator.of(context).popAndPushNamed('/router/report_success'); } else { - SmartDialog.showToast(baseData.msg,alignment: Alignment.center); + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } } @@ -117,39 +116,40 @@ class _ReportPage extends State { ), reportContent(), SizedBox(height: 12), - if(checkIndex == 9) - Container( - width: double.infinity, - height: 186.h, - margin: EdgeInsets.only(right: 16, left: 40, bottom: 100), - decoration: new BoxDecoration( - color: Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(4.0), - ), - child: Container( - margin: EdgeInsets.fromLTRB(20.w, 5.h, 20.w, 0), - alignment: Alignment.topLeft, - child: TextField( - maxLines: 5, - controller: editingController, - onChanged: (value) { - setState(() { - textLength = value.length; - }); - }, - maxLength: 100, - decoration: InputDecoration( - border: InputBorder.none, - hintText: "请输入举报原因,以便我们更快定位问题,快速处理", - hintStyle: TextStyle( - fontSize: 12.sp, - height: 1.2, - fontWeight: MyFontWeight.regular, - color: Color(0xFF999999), + if (checkIndex == 9) + Container( + width: double.infinity, + height: 186.h, + margin: + EdgeInsets.only(right: 16, left: 40, bottom: 100), + decoration: new BoxDecoration( + color: Color(0xFFF7F7F7), + borderRadius: BorderRadius.circular(4.0), + ), + child: Container( + margin: EdgeInsets.fromLTRB(20.w, 5.h, 20.w, 0), + alignment: Alignment.topLeft, + child: TextField( + maxLines: 5, + controller: editingController, + onChanged: (value) { + setState(() { + textLength = value.length; + }); + }, + maxLength: 100, + decoration: InputDecoration( + border: InputBorder.none, + hintText: "请输入举报原因,以便我们更快定位问题,快速处理", + hintStyle: TextStyle( + fontSize: 12.sp, + height: 1.2, + fontWeight: MyFontWeight.regular, + color: Color(0xFF999999), + ), ), ), - ), - )) + )) ], ), ), @@ -180,7 +180,11 @@ class _ReportPage extends State { Expanded( child: GestureDetector( onTap: () { - report(); + if(checkIndex == 9 && editingController.text == ""){ + SmartDialog.showToast("请输入举报原因", alignment: Alignment.center); + return; + } + report(); }, child: Opacity( opacity: checkIndex == 0 ? 0.3 : 0.9, @@ -211,135 +215,43 @@ class _ReportPage extends State { Widget reportContent() { return Container( - width: double.infinity, - padding: EdgeInsets.only(left:16, right:16,top:20), + width: double.infinity, + padding: EdgeInsets.only(left: 16, right: 16, top: 20), child: Column( children: [ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 1; - }); - }, - child: - content( - "色情低俗", - 1 - ), + content("色情低俗", 1), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 2; - }); - }, - child: - content( - "政治宗教", - 2 - ), + content("政治宗教", 2), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector ( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 3; - }); - }, - child: - content( - "广告骚扰", - 3 - ), + content("广告骚扰", 3), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 4; - }); - }, - child: - content( - "虚假欺骗", - 4 - ), + content("虚假欺骗", 4), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 5; - }); - }, - child: - content( - "侵权(诽谤、抄袭、冒用)", - 5 - ), + content("侵权(诽谤、抄袭、冒用)", 5), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 6; - }); - }, - child: - content( - "不良封面/标题", - 6 - ), - ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 7; - }); - }, - child: - content( - "赌博诈骗", - 7 - ), + content("不良封面/标题", 6), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 8; - }); - }, - child: - content( - "违禁内容(暴利恐怖、令人不适、宣言仇恨)", - 8 - ), + content("赌博诈骗", 7), + SizedBox( + height: 18, ), - SizedBox(height: 18,), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 9; - }); - }, - child: - content( - "其他", - 9 - ), + content("违禁内容(暴利恐怖、令人不适、宣言仇恨)", 8), + SizedBox( + height: 18, ), + content("其他", 9), ], )); } @@ -348,39 +260,48 @@ class _ReportPage extends State { Widget checkView(var index) { return Container( - padding: EdgeInsets.only(right: 16.w,left: 5), + padding: EdgeInsets.only(right: 16.w, left: 5), alignment: Alignment.center, // color: Colors.red, child: Image.asset( checkIndex != index ? "assets/image/icon_radio_unselected.webp" : "assets/image/icon_radio_selected.webp", - width:20.w, - height:20.h, + width: 20.w, + height: 20.h, ), ); } - Widget content(textContext,var index) { - return Container( - alignment: Alignment.center, - child:Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - checkView(index), - Container(), - Expanded(child: - Text( - textContext, - style: TextStyle( - fontSize: 16.sp, - color: Color(0xFF353535), - fontWeight: MyFontWeight.regular, - ), - ),) - ], - ), - ); + Widget content(textContext, var index) { + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + checkIndex = index; + textCon = textContext; + }); + }, + child: Container( + alignment: Alignment.center, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + checkView(index), + Container(), + Expanded( + child: Text( + textContext, + style: TextStyle( + fontSize: 16.sp, + color: Color(0xFF353535), + fontWeight: MyFontWeight.regular, + ), + ), + ) + ], + ), + )); } } diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 56650179..1a4a0838 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -290,7 +290,7 @@ class MessageLookup extends MessageLookupByLibrary { "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("积分的计算说明"), "jifendidaogao" : MessageLookupByLibrary.simpleMessage("积分从低到高"), "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("积分从高到低"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("积分商城"), + "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("净弼积分商城"), "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("积分详情"), "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index e1d59ac9..2d94046a 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -288,7 +288,7 @@ class MessageLookup extends MessageLookupByLibrary { "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("积分的计算说明"), "jifendidaogao" : MessageLookupByLibrary.simpleMessage("积分从低到高"), "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("积分从高到低"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("积分商城"), + "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("净弼积分商城"), "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("积分详情"), "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 63b3f40c..c441640b 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -288,7 +288,7 @@ class MessageLookup extends MessageLookupByLibrary { "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("积分的计算说明"), "jifendidaogao" : MessageLookupByLibrary.simpleMessage("积分从低到高"), "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("积分从高到低"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("积分商城"), + "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("净弼积分商城"), "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("积分详情"), "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("净弼联盟会员店"), "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index c5161822..9306dfd3 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -288,7 +288,7 @@ class MessageLookup extends MessageLookupByLibrary { "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("積分的計算説明"), "jifendidaogao" : MessageLookupByLibrary.simpleMessage("積分從低到高"), "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("積分從高到低"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("積分商城"), + "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("淨弼積分商城"), "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("積分詳情"), "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("淨弼聯盟會員店"), "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 2d174d30..026f8527 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -288,7 +288,7 @@ class MessageLookup extends MessageLookupByLibrary { "jifendejisuanshuoming" : MessageLookupByLibrary.simpleMessage("積分的計算説明"), "jifendidaogao" : MessageLookupByLibrary.simpleMessage("積分從低到高"), "jifengaodaodi" : MessageLookupByLibrary.simpleMessage("積分從高到低"), - "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("積分商城"), + "jifenshangcheng" : MessageLookupByLibrary.simpleMessage("淨弼積分商城"), "jifenxiangqing" : MessageLookupByLibrary.simpleMessage("積分詳情"), "jingbilianmenghuiyuandian" : MessageLookupByLibrary.simpleMessage("淨弼聯盟會員店"), "jinkahuiyuan" : MessageLookupByLibrary.simpleMessage("金卡会员"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 5976a619..c869c31d 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -225,10 +225,10 @@ class S { ); } - /// `积分商城` + /// `净弼积分商城` String get jifenshangcheng { return Intl.message( - '积分商城', + '净弼积分商城', name: 'jifenshangcheng', desc: '', args: [], diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 32b382df..96ed8aa6 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -18,7 +18,7 @@ "main_menu4": "我的", "shouye": "首页", "huodongliebiao": "活动列表", - "jifenshangcheng": "积分商城", + "jifenshangcheng": "净弼积分商城", "jinrihuiyuanrenwu": "今日会员任务", "renwuzhongxin": "任务中心", "qiandaolingqujinfen": "签到领取积分", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 0151ed71..71f61742 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -18,7 +18,7 @@ "main_menu4": "我的", "shouye": "首页", "huodongliebiao": "活动列表", - "jifenshangcheng": "积分商城", + "jifenshangcheng": "净弼积分商城", "jinrihuiyuanrenwu": "今日会员任务", "renwuzhongxin": "任务中心", "qiandaolingqujinfen": "签到领取积分", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 17bdfa3e..918ed547 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -18,7 +18,7 @@ "main_menu4": "我的", "shouye": "首页", "huodongliebiao": "活动列表", - "jifenshangcheng": "积分商城", + "jifenshangcheng": "净弼积分商城", "jinrihuiyuanrenwu": "今日会员任务", "renwuzhongxin": "任务中心", "qiandaolingqujinfen": "签到领取积分", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index 4df95fbc..b1b3bfab 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -18,7 +18,7 @@ "main_menu4": "我的", "shouye": "首頁", "huodongliebiao": "活動列表", - "jifenshangcheng": "積分商城", + "jifenshangcheng": "淨弼積分商城", "jinrihuiyuanrenwu": "今日會員任務", "renwuzhongxin": "任務中心", "qiandaolingqujinfen": "簽到領取積分", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index cbcc9430..30c97cdb 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -18,7 +18,7 @@ "main_menu4": "我的", "shouye": "首頁", "huodongliebiao": "活動列表", - "jifenshangcheng": "積分商城", + "jifenshangcheng": "淨弼積分商城", "jinrihuiyuanrenwu": "今日會員任務", "renwuzhongxin": "任務中心", "qiandaolingqujinfen": "簽到領取積分", diff --git a/lib/message/system_details.dart b/lib/message/system_details.dart index c3593d90..c6c2a634 100644 --- a/lib/message/system_details.dart +++ b/lib/message/system_details.dart @@ -198,7 +198,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( - src: "assets/image/icon_empty.png", + src: "assets/image/icon_empty.webp", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -323,7 +323,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( - src:"assets/image/icon_empty.png", + src:"assets/image/icon_empty.webp", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -459,7 +459,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( - src:"assets/image/icon_empty.png", + src:"assets/image/icon_empty.webp", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -606,7 +606,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( - src:"assets/image/icon_empty.png", + src:"assets/image/icon_empty.webp", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -850,7 +850,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( - src:"assets/image/icon_empty.png", + src:"assets/image/icon_empty.webp", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp,