From b209f5bcc6f71e81a5c8ded549fb2ce18896df27 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Fri, 4 Mar 2022 14:48:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A4=BE=E7=BE=A4=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E4=B8=BE=E6=8A=A5,=E5=88=86=E4=BA=ABh5=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=85=BC=E5=AE=B9=E5=8A=A8=E6=80=81,=E6=9A=82?= =?UTF-8?q?=E6=B2=A1=E6=97=B6=E9=97=B4=E5=85=BC=E5=AE=B9,=E6=9A=82?= =?UTF-8?q?=E4=BF=9D=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/ju_bao.png | Bin 0 -> 2757 bytes assets/image/3x/ju_bao.png | Bin 0 -> 5439 bytes assets/image/ju_bao.png | Bin 0 -> 1223 bytes assets/svg/ju_b.svg | 1 + lib/address/edit_address_page.dart | 2 +- .../community_view/community_dynamic.dart | 373 ++++++--- lib/community/report/report_notice.dart | 98 +++ lib/community/report/report_page.dart | 195 +++++ lib/community/report/report_success.dart | 51 ++ lib/main.dart | 9 + lib/mine/personal_page.dart | 753 ++++++++---------- pubspec.lock | 57 +- pubspec.yaml | 2 + 13 files changed, 1009 insertions(+), 532 deletions(-) create mode 100644 assets/image/2x/ju_bao.png create mode 100644 assets/image/3x/ju_bao.png create mode 100644 assets/image/ju_bao.png create mode 100644 assets/svg/ju_b.svg create mode 100644 lib/community/report/report_notice.dart create mode 100644 lib/community/report/report_page.dart create mode 100644 lib/community/report/report_success.dart diff --git a/assets/image/2x/ju_bao.png b/assets/image/2x/ju_bao.png new file mode 100644 index 0000000000000000000000000000000000000000..9a1f86c818af8252c71bd97a47197540bbabe3ff GIT binary patch literal 2757 zcmV;$3OePx+Ul-x2rzY)m2^fEmftZ?q5}1 z_ndR@uh0GN+3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I1j@_H@AKukVHH;Xw)`tAD-fN-;gCN2xf4K96s@!5 z=jY!!@3Z9>Rw4h$dEn) lb_WgFLv(Msf0chj{0C^hUp2a2w=)0$002ovPDHLkV1n-xO&9 \ No newline at end of file diff --git a/lib/address/edit_address_page.dart b/lib/address/edit_address_page.dart index a89c5c57..ab40d4ee 100644 --- a/lib/address/edit_address_page.dart +++ b/lib/address/edit_address_page.dart @@ -82,7 +82,7 @@ class _EditAddressPage extends State { bottomRight: Radius.circular(8), ), ), - child: Expanded(child:Column( + child: Expanded(flex: 1,child: Column( children: [ editItem( S.of(context).xingming, diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index ec888c6b..116c55ed 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -4,6 +4,8 @@ import 'package:chewie/chewie.dart'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/article.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:chewie/src/chewie_progress_colors.dart' as chewie; @@ -175,32 +177,36 @@ class _CommunityDynamic extends State { child: Row( children: [ GestureDetector( - onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => PhotoViewGalleryScreen( - // images: [(widget?.article?.authorHeadImg ?? "").isEmpty? - // "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg":widget?.article?.authorHeadImg - // ], //传入图片list - // index: 0, //传入当前点击的图片的index - // ), - // )); - Navigator.of(context).pushNamed('/router/personal_page', - arguments:{"memberId":(widget.article.author == widget.userId) ? "0" :widget.article.author, - }); - }, - child: - MImage( - (widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"), - width: 44, - height: 44, - isCircle: true, - fit: BoxFit.cover, - errorSrc: "assets/image/default_1.png", - fadeSrc: "assets/image/default_1.png", - ), - ), + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => PhotoViewGalleryScreen( + // images: [(widget?.article?.authorHeadImg ?? "").isEmpty? + // "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg":widget?.article?.authorHeadImg + // ], //传入图片list + // index: 0, //传入当前点击的图片的index + // ), + // )); + Navigator.of(context) + .pushNamed('/router/personal_page', arguments: { + "memberId": + (widget.article.author == widget.userId) + ? "0" + : widget.article.author, + }); + }, + child: MImage( + (widget?.article?.authorHeadImg ?? + "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"), + width: 44, + height: 44, + isCircle: true, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.png", + fadeSrc: "assets/image/default_1.png", + ), + ), SizedBox( width: 8, ), @@ -234,7 +240,8 @@ class _CommunityDynamic extends State { onTap: () { setState(() { if (widget.commentType == 0) { - widget.article.followed = !(widget.article.followed ?? false); + widget.article.followed = + !(widget.article.followed ?? false); _vipFollow(widget.article.author, widget.article.followed ?? false); } else { @@ -294,93 +301,134 @@ class _CommunityDynamic extends State { ), ), buildMedia(widget?.article?.content), - SizedBox( - height:5.h, - ), - if(widget.article.location != "") - Row( - children: [ - Icon( - Icons.place, - size: 16, - color: Color(0xFFB3B2B2), - ), - SizedBox(width:2,), - Expanded(child: - Text( - widget?.article?.location ?? "", - overflow:TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize:12.sp, - fontWeight: MyFontWeight.medium, + SizedBox( + height:8.h, + ), + if (widget.article.location != "") + Row( + children: [ + Icon( + Icons.place, + size: 16, color: Color(0xFFB3B2B2), ), - )), - ], - ), + SizedBox( + width: 2, + ), + Expanded( + child: Text( + widget?.article?.location ?? "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFFB3B2B2), + ), + )), + ], + ), if (!widget.isDetails) SizedBox( - height:5.h, + height: 5.h, ), if (!widget.isDetails) Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ - IconText( - (widget.article != null) - ? "${widget.article.viewers}" - : "", - space: 4.w, - leftImage: "assets/svg/liulanliang.svg", - iconSize: 16, - textStyle: TextStyle( - fontSize: 14.sp, - ), - ), - IconText( - "${widget.article.comments ?? 0}", - space: 4.w, - leftImage: "assets/svg/pinglun.svg", - iconSize: 16, - textStyle: TextStyle( - fontSize: 14.sp, + Expanded( + child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset( + "assets/svg/liulanliang.svg", + width: 16, + height: 16, + ), + SizedBox( + width: 5, + ), + Text( + (widget.article != null) + ? "${widget.article.viewers}" + : "", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), + ), + ), + ], ), ), - GestureDetector( - onTap: () {}, - child: IconText( - "${widget.article.likes ?? 0}", - space: 4.w, - leftImage: "assets/svg/xihuan.svg", - iconSize: 16, - textStyle: TextStyle( - fontSize: 14.sp, + Expanded( + child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset( + "assets/svg/pinglun.svg", + width: 16, + height: 16, ), - ), - ), - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - share(); - }); - }, - child: Container( - // color: Colors.red, - padding: EdgeInsets.only(left:30,right:10), - // alignment: Alignment.center, - child: Text( - "...", + SizedBox( + width: 5, + ), + Text( + "${widget.article.comments ?? 0}", style: TextStyle( - fontSize:18.sp, - fontWeight: MyFontWeight.medium, - color: Colors.black, + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), ), ), + ], + )), + Expanded( + child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset( + "assets/svg/xihuan.svg", + width: 16, + height: 16, + ), + SizedBox( + width: 5, + ), + Text( + "${widget.article.likes ?? 0}", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), + ), + ), + ], ), ), + // 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, + // ), + // ), + // ))), ], ), ], @@ -397,13 +445,26 @@ class _CommunityDynamic extends State { share() async { SSDKMap params = SSDKMap() ..setGeneral( - widget?.article?.mainTitle, + widget?.article?.mainTitle ?? "", "", [ - jsonDecode(widget.article.content) + widget?.article?.content != null && + widget.article.content.contains("images\":[\"") + ? jsonDecode(widget.article.content)["images"][0] + : "", + widget?.article?.content != null && + widget.article.content.contains("video\":[\"") + ? jsonDecode(widget.article.content)["video"][0] + : "", ], - "", - "", + widget?.article?.content != null && + widget.article.content.contains("images\":[\"") + ? jsonDecode(widget.article.content)["images"][0] + : "", + widget?.article?.content != null && + widget.article.content.contains("video\":[\"") + ? jsonDecode(widget.article.content)["video"][0] + : "", buildShareUrl(), "", "", @@ -420,18 +481,18 @@ class _CommunityDynamic extends State { if (platform == ShareSDKPlatforms.line) { params.map["type"] = SSDKContentTypes.text.value; params.map["text"] = - "${widget.article.mainTitle} ${buildShareUrl()}"; + "${widget?.article?.mainTitle ?? ""} ${buildShareUrl()}"; } SharesdkPlugin.share(platform, params, - (state, userData, contentEntity, error) { - print("share!$state"); - }); + (state, userData, contentEntity, error) { + print("share!$state"); + }); }); }); } String buildShareUrl() { - return "https://hx.lotus-wallet.com/index.html?id=${widget.article.id }&type=${""}"; + return "https://hx.lotus-wallet.com/index.html?id=${widget.article.id}&type="; } ///动态内容 @@ -463,7 +524,7 @@ class _CommunityDynamic extends State { cnt["images"][0], fit: BoxFit.contain, radius: BorderRadius.circular(2), - height:MediaQuery.of(context).size.width/1.5, + height: MediaQuery.of(context).size.width / 1.5, errorSrc: "assets/image/default_2_1.png", fadeSrc: "assets/image/default_2_1.png", )), @@ -685,6 +746,106 @@ class _CommunityDynamic extends State { ); } + ///更多选择弹窗 + choiceShowBottomSheet() { + showModalBottomSheet( + builder: (BuildContext context) { + return buildBottomSheetWidget(context); + }, + backgroundColor: Colors.transparent, + context: context); + } + + Widget buildBottomSheetWidget(BuildContext context) { + return Container( + padding: EdgeInsets.all(16), + decoration: new BoxDecoration( + color: Colors.white, + borderRadius: new BorderRadius.only( + topLeft: const Radius.circular(25.0), + topRight: const Radius.circular(25.0))), + child: Container( + width: 100.w, + height: 100.h, + child: Column( + children: [ + SizedBox( + height: 10, + ), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pop(); + share(); + }); + }, + child: Container( + child: Row( + children: [ + SizedBox( + width: 4, + ), + Image.asset( + "assets/image/icon_share.png", + fit: BoxFit.cover, + width: 25, + height: 25, + color: Color(0xff515151), + ), + SizedBox( + width: 12, + ), + Text( + "分享", + style: TextStyle( + fontSize: 17.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + )), + Container( + margin: EdgeInsets.symmetric(vertical: 12), + height: 1.h, + color: Color(0xFFF7F7F7), + ), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context) + .popAndPushNamed('/router/report_page'); + }); + }, + child: Row( + children: [ + SizedBox( + width: 4, + ), + SvgPicture.asset( + "assets/svg/ju_b.svg", + width: 20, + height: 20, + ), + SizedBox( + width: 15, + ), + Text( + "举报", + style: TextStyle( + fontSize: 17.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), + ), + ), + ], + )) + ], + ), + )); + } + @override void didChangeDependencies() { if (widget.heightFun != null) diff --git a/lib/community/report/report_notice.dart b/lib/community/report/report_notice.dart new file mode 100644 index 00000000..197fd882 --- /dev/null +++ b/lib/community/report/report_notice.dart @@ -0,0 +1,98 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class ReportNotice extends StatefulWidget { + @override + State createState() { + return _ReportNotice(); + } +} + +class _ReportNotice extends State { + ApiService apiService; + int checkIndex = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar( + background: Color(0xFFFFFFFFF), + leadingColor: Colors.black, + title: "", + titleSize: 18, + titleColor: Colors.black, + ), + body: Container( + width: double.infinity, + color: Color(0xFFFFFFFFF), + padding: EdgeInsets.only(left: 16, top: 10, right: 16), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + alignment: Alignment.center, + padding: EdgeInsets.only(top: 14, bottom: 16), + child: Text( + "投诉须知", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF1A1A1A), + ), + )), + Text( + "     为了更好地帮助您解决问题,保障您使用产品和服务的良好体验,首先您要保证您的投诉行为是基于客观事实的,是为了营造良好的社群环境,并代表您的真实感想。平台作为中立的服务者,在收到您的投诉申请后,我们会在7~15个工作日内按照相关的法律法规的规定来进行核实和处理。平台会采取合理的措施保护你的个人信息:除法律法规规定的情形外,未经用户许可,我们不会向第三方公开、透露您的相关信息。", + style: TextStyle( + fontSize: 14.sp, + height: 1.5, + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), + ), + ), + SizedBox(height: 4), + Text( + "     为了各用户的合法权益得以保障,相关投诉能有效提交,如平台有合理理由相信投诉存在以下情形,将有权根据实际情况调整处理方式。包括但不限于:" + "\n    (1)明知、应知不构成内容违规 而进行投诉;" + "\n    (2)平台已告知未发现内容存在违规仍不断重复投诉且无实质补充等情形;" + "\n    (3)多次或大量提交投诉,但整体通过率低或涉嫌滥用投诉;" + "\n    (4)非合理且正当理由,对平台正常处理其他用户人投诉造成不利影响的情形;" + "\n   上述行为一经发现,将不排除采取特殊的处理机制或限制措施,包括但不限于限制频次、记入非正常投诉名单、调整侵权投诉单处理顺序等,由此将可能导致侵权投诉不可高频提交、无法通过或审核评估时效延长等效果。", + style: TextStyle( + fontSize: 14.sp, + height: 1.5, + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + ), + flex: 1, + ), + ], + ), + ), + ); + } +} diff --git a/lib/community/report/report_page.dart b/lib/community/report/report_page.dart new file mode 100644 index 00000000..fdebdfe7 --- /dev/null +++ b/lib/community/report/report_page.dart @@ -0,0 +1,195 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class ReportPage extends StatefulWidget { + final Map arguments; + + ReportPage({this.arguments}); + + @override + State createState() { + return _ReportPage(); + } +} + +class _ReportPage extends State { + ApiService apiService; + int checkIndex = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar( + background: Color(0xFFFFFFFFF), + leadingColor: Colors.black, + title: "举报", + titleSize: 18, + titleColor: Colors.black, + ), + body: Container( + height: double.infinity, + color: Color(0xFFFFFFFF), + child: Stack( + children: [ + SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + color: Color(0XFFFFFFFF), + padding: EdgeInsets.only(bottom: 4, left: 16, right: 16), + child: Text.rich( + TextSpan( + children: [ + TextSpan( + text: "举报", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), + ), + ), + TextSpan( + text: "@百花谷", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF319E5F), + ), + ), + TextSpan( + text: "的动态", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + ), + ), + report(), + ], + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Container( + width: double.infinity, + height:95, + child: Column( + children: [ + GestureDetector( + onTap: () { + Navigator.of(context) + .pushNamed('/router/report_notice'); + }, + child: Container( + alignment: Alignment.bottomCenter, + margin: EdgeInsets.only(bottom:25), + child: Text( + "投诉须知", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF3C425C), + ), + ), + )), + Expanded(child: + GestureDetector( + onTap: (){ + Navigator.of(context) + .pushNamed('/router/report_success'); + }, + child: Container( + width: double.infinity, + height:double.infinity, + color: Color(0xFF319E5F), + alignment: Alignment.center, + child: Text( + "提交", + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFFFFFFFF), + ), + ), + ),)) + ], + ), + )) + ], + ), + ), + ); + } + + Widget report() { + return Container( + padding: EdgeInsets.only(left: 16, right: 16), + child: + // (articles == null || articles.length == 0) + // ? NoDataView( + // src: "assets/image/dong_tai.png", + // isShowBtn: false, + // text: "目前暂无发布动态,要把开心的事讲出来哦~", + // fontSize: 16.sp, + // margin: EdgeInsets.only(left: 60.w, right: 60.w), + // ) : + ListView.builder( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, position) { + return GestureDetector( + onTap: () {}, + child: reportList(), + ); + }, + itemCount: 9, + ), + ); + } + + Widget reportList() { + return Container( + padding: EdgeInsets.only(top: 18, bottom: 20), + color: Color(0xFFFFFFFF), + child: Row( + children: [ + Image.asset( + "assets/image/icon_radio_unselected.png", + width: 16, + height: 16, + ), + SizedBox( + width: 8, + ), + Expanded( + child: Text( + "色情低俗", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular), + )) + ], + )); + } +} diff --git a/lib/community/report/report_success.dart b/lib/community/report/report_success.dart new file mode 100644 index 00000000..e6965ba3 --- /dev/null +++ b/lib/community/report/report_success.dart @@ -0,0 +1,51 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class ReportSuccess extends StatefulWidget { + @override + State createState() { + return _ReportSuccess(); + } +} + +class _ReportSuccess extends State { + ApiService apiService; + int checkIndex = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar( + background: Color(0xFFFFFFFFF), + leadingColor: Colors.black, + title: "", + titleSize: 18, + titleColor: Colors.black, + ), + body: Container( + width: double.infinity, + color: Color(0xFFFFFFFFF), + padding: EdgeInsets.only(left: 16, top: 10, right: 16), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ], + ), + ), + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index 463ebf14..351fc260 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -74,6 +74,9 @@ import 'community/community_view/class_details.dart'; import 'community/headlines/headlines_column_details.dart'; import 'community/new_community_details.dart'; import 'community/photo_view_gallery_screen.dart'; +import 'community/report/report_notice.dart'; +import 'community/report/report_page.dart'; +import 'community/report/report_success.dart'; import 'home/guide_page.dart'; import 'home/home_view/activity_list.dart'; import 'main_page.dart'; @@ -351,4 +354,10 @@ Map routers = { InvitationRecord(), '/router/personal_page': (context, {arguments}) => PersonalPage(arguments:arguments), + '/router/report_page': (context, {arguments}) => + ReportPage(arguments:arguments), + '/router/report_notice': (context, {arguments}) => + ReportNotice(), + '/router/report_success': (context, {arguments}) => + ReportSuccess(), }; diff --git a/lib/mine/personal_page.dart b/lib/mine/personal_page.dart index 3b9cab84..fae93819 100644 --- a/lib/mine/personal_page.dart +++ b/lib/mine/personal_page.dart @@ -61,18 +61,14 @@ class _PersonalPage extends State with WidgetsBindingObserver { WidgetsBinding.instance.addObserver(this); SharedPreferences.getInstance().then((value) => { apiService = ApiService(Dio(), - showLoading: true, context: context, token: value.getString('token')), _onRefresh(), }); } _onRefresh() async { - pageNum = 1; - setState(() { queryCommunity(); queryMember(memberId); - }); } ///查询会员信息 @@ -114,6 +110,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { pageNum += 1; isLoadMore = false; } + else pageNum = 1; BaseData> baseData = await apiService.trendList({ "mid":memberId == "0" ? userId : memberId, "onlyFollow": false, @@ -125,10 +122,9 @@ class _PersonalPage extends State with WidgetsBindingObserver { refreshController.refreshFailed(); refreshController.loadFailed(); }); - - refreshController.refreshCompleted(); - refreshController.loadComplete(); if (baseData.isSuccess) { + refreshController.refreshCompleted(); + refreshController.loadComplete(); if (pageNum == 1) { articles.clear(); } @@ -282,354 +278,340 @@ class _PersonalPage extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { - return Stack( - children: [ - Positioned( - child: Container( - color: Colors.white, - child: SmartRefresher( - controller: refreshController, - enablePullDown: true, - enablePullUp: true, - header: MyHeader(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, + return SmartRefresher( + controller: refreshController, + enablePullDown: true, + enablePullUp: true, + header: MyHeader(), + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onRefresh: _onRefresh, + onLoading: () { + isLoadMore = true; + setState(() { + _onRefresh(); + }); + }, + physics: BouncingScrollPhysics(), + scrollController: scrollController, + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child:Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + alignment: Alignment.bottomLeft, + children: [ + Container( + height: 286, + color: Color(0xFFFFFFFF), + child: Stack( + alignment: Alignment.bottomRight, + children: [ + Stack( + children: [ + Positioned( + child: Container( + color: Colors.black, + child: Opacity( + opacity: 0.9, + child: MImage( + memberInfor?.background ?? "", + width: double.infinity, + height: 260.h, + fit: BoxFit.cover, + errorSrc: + "assets/image/default_1.png", + fadeSrc: + "assets/image/default_1.png", + )))), + Container( + margin: EdgeInsets.only( + top: 50.h, left: 16.w, right: 16.w), + decoration: BoxDecoration( + color: Colors.transparent, + ), + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + GestureDetector( + child: Image.asset( + "assets/image/integral_return.png", + width: 24, + height: 24, + ), + onTap: () { + Navigator.of(context).pop(); + }, + ), + ], + ), + ), + ], + ), + if(memberId == "0") + Positioned( + bottom: 49.h, + right: 16.w, + child:GestureDetector( + onTap: (){ + showImagePicker(); + }, + child:Container( + padding: EdgeInsets.only(left: 2, right: 2), + width: 59.w, + height: 21.h, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2), + color: Color(0x80000000), + ), + child: Text( + "更换背景", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), + ), + ), + ), + ), + ], + ), ), - onRefresh: _onRefresh, - onLoading: () { - isLoadMore = true; - setState(() { - _onRefresh(); - }); - }, - physics: BouncingScrollPhysics(), - scrollController: scrollController, - child: Container( - height: double.infinity, - child: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, + homeInfo(), + ], + ), + Container( + color: Color(0xFFFFFFFF), + child: + Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only( + left: 86, top: 12, right: 16), + child: GestureDetector( + onTap: () { + setState(() { + isShrink = !isShrink; + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: Text( + memberId == "0" ? ((memberInfor?.signature == "") ? "还未编辑个性签名~" : memberInfor?.signature ?? "") + :"个性签名: ${(memberInfor?.signature == "") ? "还未编辑个性签名~" :memberInfor?.signature ?? ""}", + overflow: isShrink + ? TextOverflow.visible + : TextOverflow.ellipsis, + maxLines: isShrink ? 10 : 2, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF868686), + fontWeight: + MyFontWeight.regular, + height: 1.5), + )), + Icon( + (isShrink != null && !isShrink) + ? Icons.chevron_right + : Icons.keyboard_arrow_up, + color: Colors.black, + size: 18, + ), + ], + ), + )), + Container( + margin: EdgeInsets.only(left: 16, right: 16), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Stack( - alignment: Alignment.bottomLeft, - children: [ - Container( - height: 286, - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Stack( - children: [ - Positioned( - child: Container( - color: Colors.black, - child: Opacity( - opacity: 0.9, - child: MImage( - memberInfor?.background ?? "", - width: double.infinity, - height: 260.h, - fit: BoxFit.cover, - errorSrc: - "assets/image/default_1.png", - fadeSrc: - "assets/image/default_1.png", - )))), - Container( - margin: EdgeInsets.only( - top: 50.h, left: 16.w, right: 16.w), - decoration: BoxDecoration( - color: Colors.transparent, - ), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - GestureDetector( - child: Image.asset( - "assets/image/integral_return.png", - width: 24, - height: 24, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - ], - ), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () {}, + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + memberInfor != null ? memberInfor.follow.toString() : "0", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: + MyFontWeight.semi_bold, ), - ], - ), - if(memberId == "0") - Positioned( - bottom: 49.h, - right: 16.w, - child:GestureDetector( - onTap: (){ - showImagePicker(); - }, - child:Container( - padding: EdgeInsets.only(left: 2, right: 2), - width: 59.w, - height: 21.h, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: Color(0x80000000), - ), - child: Text( - "更换背景", - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), - ), - ), + ), + SizedBox( + height: 4, + ), + Text( + S.of(context).guanzhu, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: + MyFontWeight.regular, ), ), - ), - ], - ), - ), - homeInfo(), - ], + ], + )), + ), ), - Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only( - left: 86, top: 12, right: 16), - child: GestureDetector( - onTap: () { - setState(() { - isShrink = !isShrink; - }); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Expanded( - flex: 1, - child: Text( - memberId == "0" ? ((memberInfor?.signature == null) ? "还未编辑个性签名~" : memberInfor?.signature ?? "") - :"个性签名: ${memberInfor?.signature ?? "还未编辑个性签名~"}", - overflow: isShrink - ? TextOverflow.visible - : TextOverflow.ellipsis, - maxLines: isShrink ? 10 : 2, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF868686), - fontWeight: - MyFontWeight.regular, - height: 1.5), - )), - Icon( - (isShrink != null && !isShrink) - ? Icons.chevron_right - : Icons.keyboard_arrow_up, - color: Colors.black, - size: 18, - ), - ], - ), - )), - Container( - margin: EdgeInsets.only(left: 16, right: 16), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () {}, + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: Container( - color: Colors.transparent, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Text( - memberInfor != null ? memberInfor.follow.toString() : "0", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 16.sp, - fontWeight: - MyFontWeight.semi_bold, - ), - ), - SizedBox( - height: 4, - ), - Text( - S.of(context).guanzhu, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: - MyFontWeight.regular, - ), - ), - ], - )), + Text( + memberInfor != null ? memberInfor.fans.toString() : "0", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: + MyFontWeight.semi_bold, ), ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: Container( - color: Colors.transparent, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Text( - memberInfor != null ? memberInfor.fans.toString() : "0", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 16.sp, - fontWeight: - MyFontWeight.semi_bold, - ), - ), - SizedBox( - height: 4, - ), - Text( - S.of(context).fensi, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: - MyFontWeight.regular, - ), - ), - ], - )), + SizedBox( + height: 4, + ), + Text( + S.of(context).fensi, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: + MyFontWeight.regular, ), ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: Container( - color: Colors.transparent, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Text( - (memberInfor?.trendTotal??0).toString(), - style: TextStyle( - color: Color(0xFF353535), - fontSize: 16.sp, - fontWeight: - MyFontWeight.semi_bold, - ), - ), - SizedBox( - height: 4, - ), - Text( - "动态", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: - MyFontWeight.regular, - ), - ), - ], - )), + ], + )), + ), + ), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () {}, + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + (memberInfor?.trendTotal??0).toString(), + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: + MyFontWeight.semi_bold, ), ), - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () {}, - child: Container( - color: Colors.transparent, - padding: EdgeInsets.all(16), - child: Column( - children: [ - Text( - (memberInfor?.gainLikeTotal ?? 0).toString(), - style: TextStyle( - color: Color(0xFF353535), - fontSize: 16.sp, - fontWeight: - MyFontWeight.semi_bold, - ), - ), - SizedBox( - height: 4, - ), - Text( - "获赞", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, - fontWeight: - MyFontWeight.regular, - ), - ), - ], - )), + SizedBox( + height: 4, + ), + Text( + "动态", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: + MyFontWeight.regular, ), ), ], - ), - ), - Container( - margin: EdgeInsets.all(16), - height: 1.h, - color: Color(0xFFF7F7F7), - ), - Padding( - padding: EdgeInsets.only(left: 16), - child: Text( - memberId != "0" ? - "TA的动态": - "我的动态", - style: TextStyle( - color: Color(0xFF353535), - fontSize: 15.sp, - fontWeight: MyFontWeight.semi_bold, + )), + ), + ), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () {}, + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + (memberInfor?.gainLikeTotal ?? 0).toString(), + style: TextStyle( + color: Color(0xFF353535), + fontSize: 16.sp, + fontWeight: + MyFontWeight.semi_bold, + ), + ), + SizedBox( + height: 4, + ), + Text( + "获赞", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + fontWeight: + MyFontWeight.regular, + ), ), - )), - dynamicList() - ], + ], + )), ), ), ], ), ), - ), + Container( + margin: EdgeInsets.all(16), + height: 1.h, + color: Color(0xFFF7F7F7), + ), + Padding( + padding: EdgeInsets.only(left: 16), + child: Text( + memberId != "0" ? + "TA的动态": + "我的动态", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 15.sp, + fontWeight: MyFontWeight.semi_bold, + ), + )), + dynamicList() + ], ), ), - bottom: 0, - top: 0, - left: 0, - right: 0, - ), - ], + ], + )), ); } Widget homeInfo() { return Container( - margin: EdgeInsets.only( + padding: EdgeInsets.only( left: 16, right: 16, ), @@ -678,110 +660,39 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), Spacer(), if(memberId == "0") - GestureDetector( - onTap: () { - setState(() { - _toUserInfo(); - }); - }, - child: Container( - padding: EdgeInsets.only(left: 6, right: 6, bottom: 2, top: 2), - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100), - border: Border.all( - width: 1, - color: Color(0xFF353535), - style: BorderStyle.solid, + GestureDetector( + onTap: () { + setState(() { + _toUserInfo(); + }); + }, + child: Container( + padding: EdgeInsets.only(left: 6, right: 6, bottom: 2, top: 2), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + border: Border.all( + width: 1, + color: Color(0xFF353535), + style: BorderStyle.solid, + ), ), - ), - child: Text( - "编辑个人资料", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF353535), + child: Text( + "编辑个人资料", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF353535), + ), ), ), - ), - ) - // GestureDetector( - // onTap: (){ - // setState(() { - // _vipFollow(messageRelational["mid"].toString(),message?.followed ?? false); - // }); - // }, - // child: - // RoundButton( - // height: 21.h, - // width:56.w, - // padding: EdgeInsets.all(2), - // backgroup: (message?.followed ?? false) - // ? Color(0xFFE6E6E6) - // : Color(0xFF32A060), - // textColor: (message?.followed ?? false) - // ? Color(0xFF808080) - // : Colors.white, - // text: (message?.followed ?? false) ? "已关注" : "回关", - // radius:20, - // icons: Icon( - // (message?.followed ?? false) - // ? Icons.check - // : Icons.add, - // color: (message?.followed?? false) - // ? Color(0xFF808080) - // : Colors.white, - // size: 12, - // ), - // ) - // // Container( - // // height: 21.h, - // // width:56.w, - // // padding:EdgeInsets.only(left:5,right:5), - // // alignment: Alignment.center, - // // decoration: BoxDecoration( - // // borderRadius: BorderRadius.circular(11), - // // border: Border.all( - // // width: 1, - // // color: Color(0xFF00A359), - // // style: BorderStyle.solid, - // // ), - // // color: (message?.followed ?? false) - // // ? Color(0xFFE6E6E6) - // // : Color(0xFF32A060), - // // ), - // // child: Row( - // // children: [ - // // Icon((message?.followed ?? false) - // // ? Icons.check - // // : Icons.add, - // // color:(message?.followed?? false) - // // ? Color(0xFF808080) - // // : Colors.white, - // // size: 16, - // // ), - // // Text( - // // (message?.followed ?? false) ? "已关注" : "回关", - // // style: TextStyle( - // // fontSize: 12.sp, - // // fontWeight: MyFontWeight.medium, - // // color:(message?.followed ?? false) - // // ? Color(0xFF808080) - // // : Colors.white, - // // ), - // // ), - // // ], - // // ), - // // ) - // ) + ) ], - ), - ); + ),); } Widget dynamicList() { return Container( - color: Color(0xFFFFFFFF), child: (articles == null || articles.length == 0)? NoDataView( src: "assets/image/dong_tai.png", isShowBtn: false, diff --git a/pubspec.lock b/pubspec.lock index b3474fc4..23dc9aa5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -70,7 +70,7 @@ packages: name: chewie url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.2" chewie_audio: dependency: "direct main" description: @@ -134,6 +134,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" + extended_image: + dependency: transitive + description: + name: extended_image + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.6.0" + extended_image_library: + dependency: transitive + description: + name: extended_image_library + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.1" fake_async: dependency: transitive description: @@ -215,7 +229,7 @@ packages: name: flutter_html url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.1" + version: "2.1.5" flutter_layout_grid: dependency: transitive description: @@ -234,7 +248,7 @@ packages: name: flutter_math_fork url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.2+2" + version: "0.3.3+1" flutter_page_indicator: dependency: transitive description: @@ -336,6 +350,20 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.15.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.12.2" + http_client_helper: + dependency: transitive + description: + name: http_client_helper + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" http_parser: dependency: transitive description: @@ -483,6 +511,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.5" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.11.1" permission_handler: dependency: "direct main" description: @@ -504,6 +539,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.1.0" + photo_manager: + dependency: transitive + description: + name: photo_manager + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.10" photo_view: dependency: "direct main" description: @@ -538,7 +580,7 @@ packages: name: provider url: "https://pub.flutter-io.cn" source: hosted - version: "6.0.2" + version: "5.0.0" pull_to_refresh: dependency: "direct main" description: @@ -847,6 +889,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.13" + wechat_assets_picker: + dependency: "direct main" + description: + name: wechat_assets_picker + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.0.0-nullsafety.5" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 6f6affec..49d60b47 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,6 +60,8 @@ dependencies: #多图, 裁剪 image_pickers: ^2.0.0 + wechat_assets_picker: any + # flutter_scankit: ^1.2.0 # qrscan: ^0.3.1 scan: ^1.5.0