diff --git a/lib/community/community_page.dart b/lib/community/community_page.dart index 399124ff..897f4876 100644 --- a/lib/community/community_page.dart +++ b/lib/community/community_page.dart @@ -82,12 +82,17 @@ class _CommunityPage extends State onTap: () { _toRelease(); }, - action: SvgPicture.asset( - "assets/svg/shequ_fabu.svg", - fit: BoxFit.contain, - width: 24, - height: 24, - ), + action: GestureDetector( + behavior: HitTestBehavior.opaque, + child: Container(color: Colors.transparent, + padding: EdgeInsets.only(left: 20,right: 20), + child: SvgPicture.asset( + "assets/svg/shequ_fabu.svg", + fit: BoxFit.contain, + width: 24, + height: 24, + ),) + ) ), body: Container( padding: EdgeInsets.only(bottom: 76.h), diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index dc9674df..9705d1ff 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -174,17 +174,13 @@ class _CommunityDynamic extends State { children: [ GestureDetector( onTap: (){ - if(widget?.article?.authorHeadImg == ""){ - SmartDialog.showToast("用户暂未设置头像", alignment: Alignment.center); - return; - } Navigator.push(context, MaterialPageRoute( builder: (context) => PhotoViewGalleryScreen( - images:[widget?.article?.authorHeadImg ?? ""],//传入图片list + images:[widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"],//传入图片list index: 0,//传入当前点击的图片的index ), )); }, child: MImage( - widget?.article?.authorHeadImg ?? "", + (widget?.article?.authorHeadImg ?? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg") + "?imageView2/1/w/200/h/200/format/jpg/q/75", width: 44, height: 44, isCircle: true, @@ -356,11 +352,11 @@ class _CommunityDynamic extends State { ), ), ); }, child: MImage( - cnt["images"][0], + cnt["images"][0].replaceAll(".jpg",".jpg?imageView2/0/q/75"), fit: BoxFit.cover, radius: BorderRadius.circular(2), - width: MediaQuery.of(context).size.width / 1.5, - height: MediaQuery.of(context).size.width / 1.5, + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.width, errorSrc: "assets/image/default_2_1.png", fadeSrc: "assets/image/default_2_1.png", )), @@ -390,7 +386,7 @@ class _CommunityDynamic extends State { ), ), ); }, child: MImage( - cnt["images"][position], + cnt["images"][position].replaceAll(".jpg",".jpg?imageView2/0/q/75"), fit: BoxFit.cover, aspectRatio: 1, radius: BorderRadius.circular(1), @@ -411,7 +407,7 @@ class _CommunityDynamic extends State { ? (MediaQuery.of(context).size.width - 32) / videoPlayerController.value.aspectRatio : MediaQuery.of(context).size.width / 2, - !widget.isList ? cnt["video"] : widget.article.coverImg, + cnt["video"].replaceAll(".mp4","_poster.jpg"), ); } return Column( @@ -463,8 +459,8 @@ class _CommunityDynamic extends State { height: height, )) : Container( - width: width, - height: width / 7 * 5, + width: MediaQuery.of(context).size.width, + height:MediaQuery.of(context).size.width, color: Colors.black, child: Stack( children: [ diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index b6cdfcde..fa8e566a 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -53,12 +53,9 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { @override void dispose() { super.dispose(); - if (_refreshController != null) - _refreshController.dispose(); + if (_refreshController != null) _refreshController.dispose(); } - - @override void initState() { super.initState(); @@ -118,7 +115,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { EasyLoading.dismiss(); } - _onRefresh(){ + _onRefresh() { queryUserInfo(); querySocialInfo(); } @@ -134,7 +131,7 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ); BaseData baseData = - await apiService.socialInfo().catchError((onError) { + await apiService.socialInfo().catchError((onError) { _refreshController.refreshFailed(); }); if (baseData != null && baseData.isSuccess) { @@ -203,9 +200,12 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { tag: "vip", ranks: ranks, userInfo: userInfo, - rank: double.tryParse(userInfo?.expendAmount??"0").toInt(), - rankMax: userInfo?.memberRankVo?.nextOrigin??0, - createTime: userInfo?.createTime??"", + rank: double.tryParse( + userInfo?.expendAmount ?? "0") + .toInt(), + rankMax: + userInfo?.memberRankVo?.nextOrigin ?? 0, + createTime: userInfo?.createTime ?? "", ), ], ), @@ -309,10 +309,10 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { } ///关注度/粉丝/成就数量 - Widget attention(){ + Widget attention() { return Container( - margin: EdgeInsets.only(left: 16,top: 10,right: 16), - padding: EdgeInsets.only(top: 16,bottom: 16), + margin: EdgeInsets.only(left: 16, top: 10, right: 16), + // padding: EdgeInsets.only(top: 16,bottom: 16), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(8), @@ -325,36 +325,35 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ), ], ), - child:GestureDetector( - onTap:(){ - Navigator.of(context).pushNamed( - '/router/communityFollow', - arguments: {}, - ); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - GestureDetector( - onTap:(){ + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { Navigator.of(context).pushNamed( '/router/communityFollow', arguments: {}, ); }, - child: - Column( + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( children: [ Text( - infoNumber != null ?infoNumber.follow.toString() :"0", + infoNumber != null ? infoNumber.follow.toString() : "0", style: TextStyle( color: Color(0xFF000000), fontSize: 15.sp, fontWeight: MyFontWeight.medium, ), ), - SizedBox(height:4,), + SizedBox( + height: 4, + ), Text( S.of(context).guanzhu, style: TextStyle( @@ -364,70 +363,86 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ), ), ], - ), + )), ), - GestureDetector( - onTap:(){ + ), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { Navigator.of(context).pushNamed( '/router/communityFollow', arguments: {}, ); }, - child: - Column( - children: [ - Text( - infoNumber != null ?infoNumber.fans.toString() :"0", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox(height:4,), - Text( - S.of(context).fensi, - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ], - ), + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + infoNumber != null ? infoNumber.fans.toString() : "0", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 15.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + height: 4, + ), + Text( + S.of(context).fensi, + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], + )), ), - GestureDetector( - onTap:(){ - Navigator.of(context).pushNamed( - '/router/mine_attainment_page', - arguments: {"userInfo":userInfo}, - ); - }, - child: - Column( - children: [ - Text( - infoNumber != null ?infoNumber.achievementNumber.toString() :"0", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 15.sp, - fontWeight: MyFontWeight.medium, - ), - ), - SizedBox(height:4,), - Text( - "成就", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - ), + ), + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pushNamed( + '/router/mine_attainment_page', + arguments: {"userInfo": userInfo}, + ); + }, + child: Container( + color: Colors.transparent, + padding: EdgeInsets.all(16), + child: Column( + children: [ + Text( + infoNumber != null + ? infoNumber.achievementNumber.toString() + : "0", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 15.sp, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + height: 4, + ), + Text( + "成就", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ), + ], ), - ], - ), - ), - ], - ), + )), + ) + ], ), ); } diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index ef6ba56b..e4424e29 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -243,10 +243,14 @@ class _StoreOrderPage extends State stretch: false, brightness: Brightness.light, leading: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { Navigator.of(context).pop(); }, child: Container( + width: double.infinity, + height: double.infinity, + color: Colors.transparent, alignment: Alignment.centerRight, margin: EdgeInsets.only(left: 10), padding: EdgeInsets.all(10),