diff --git a/lib/address/edit_address_page.dart b/lib/address/edit_address_page.dart index cd31160b..5f456674 100644 --- a/lib/address/edit_address_page.dart +++ b/lib/address/edit_address_page.dart @@ -61,84 +61,90 @@ class _EditAddressPage extends State { leadingColor: Colors.black, background: Colors.white, ), - body: Container( - child: Column( - children: [ - Container( - margin: EdgeInsets.only(bottom: 23.h), - padding: EdgeInsets.only(top: 16.h, bottom: 15.h), - decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0, + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Column( + children: [ + Container( + margin: EdgeInsets.only(bottom: 23.h), + padding: EdgeInsets.only(top: 16.h, bottom: 15.h), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ), + ], + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), ), - ], - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(8), - bottomRight: Radius.circular(8), ), - ), - child:Column( - children: [ - editItem( - S.of(context).xingming, - preAddress != null ? preAddress.username : "", - S.of(context).qingtianxiexingming, - nameController, - false), - editItem( - S.of(context).dianhua, - preAddress != null ? preAddress.phone : "", - S.of(context).qingtianxieshoujihao, - mobileController, - false), - InkWell( - onTap: () { - toMap(); - }, - child: editItem( - S.of(context).dizhi, + child:Column( + children: [ + editItem( + S.of(context).xingming, + preAddress != null ? preAddress.username : "", + S.of(context).qingtianxiexingming, + nameController, + false), + editItem( + S.of(context).dianhua, + preAddress != null ? preAddress.phone : "", + S.of(context).qingtianxieshoujihao, + mobileController, + false), + InkWell( + onTap: () { + toMap(); + }, + child: editItem( + S.of(context).dizhi, + preAddress != null ? preAddress.address : "", + S.of(context).shouhuodizhi, + addressController, + true), + ), + editItem( + S.of(context).xiangxidizhi, preAddress != null ? preAddress.address : "", - S.of(context).shouhuodizhi, - addressController, - true), - ), - editItem( - S.of(context).xiangxidizhi, - preAddress != null ? preAddress.address : "", - S.of(context).menpaihao, - houseNumberController, - false), - ], + S.of(context).menpaihao, + houseNumberController, + false), + ], + ), ), - - ), - InkWell( - onTap: () { - saveOrUpdate(); - }, - child: Container( - color: Color(0xFF32A060), - width: MediaQuery.of(context).size.width, - padding: EdgeInsets.all(16), - alignment: Alignment.center, - child: Text( - S.of(context).baocun, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16.sp, - color: Colors.white, + InkWell( + onTap: () { + saveOrUpdate(); + }, + child: Container( + width: MediaQuery.of(context).size.width, + margin:EdgeInsets.symmetric(horizontal: 16.w), + padding: EdgeInsets.all(16), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(26), + color: Color(0xFF32A060), + ), + alignment: Alignment.center, + child: Text( + S.of(context).baocun, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16.sp, + color: Colors.white, + ), ), ), ), - ), - ], - ), - ), + ], + )), ); } diff --git a/lib/community/community_details.dart b/lib/community/community_details.dart index 391b8702..1c8f7531 100644 --- a/lib/community/community_details.dart +++ b/lib/community/community_details.dart @@ -112,7 +112,12 @@ class _CommunityDetails extends State with WidgetsBindingObser leading: true, leadingColor: Colors.black, ), - body: Container( + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Container( child: Column( children: [ Expanded( @@ -190,7 +195,7 @@ class _CommunityDetails extends State with WidgetsBindingObser ), ], ), - ), + )), ); } diff --git a/lib/community/community_view/class_details.dart b/lib/community/community_view/class_details.dart index 0efe6dea..d8822527 100644 --- a/lib/community/community_view/class_details.dart +++ b/lib/community/community_view/class_details.dart @@ -126,7 +126,12 @@ class _ClassDetails extends State with WidgetsBindingObserver { return AnnotatedRegion( value: SystemUiOverlayStyle.light, child: Material(child: Scaffold( - body: Container( + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Container( // margin: EdgeInsets.only(top:25), child: Column( children: [ @@ -387,7 +392,7 @@ class _ClassDetails extends State with WidgetsBindingObserver { ), ], ), - ), + )), ),) ); } diff --git a/lib/community/headlines/article_list.dart b/lib/community/headlines/article_list.dart index 4dca7c8b..58e49911 100644 --- a/lib/community/headlines/article_list.dart +++ b/lib/community/headlines/article_list.dart @@ -93,7 +93,7 @@ class _ArticleList extends State { height: MediaQuery.of(context).size.width >= 650 ? 133.h :105, child: Column( crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.start, children: [ Text( widget?.articles[position]?.mainTitle ?? "", @@ -101,64 +101,68 @@ class _ArticleList extends State { maxLines: 2, style: TextStyle( fontSize: 14.sp, + height: 1.2.h, fontWeight: MyFontWeight.semi_bold, color: Colors.black, ), ), - SizedBox(height:5.h), - Text( + SizedBox(height:6.h), + Expanded(child: Text( widget?.articles[position]?.viceTitle ?? "", overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( fontSize: 12.sp, + height: 1.2.h, fontWeight: MyFontWeight.regular, color: Color(0xFF353535), ), - ), - Expanded(child:Row( - children: [ - Expanded( - child: Text( - widget.articles != null - ? widget.articles[position]?.author?.name ?? "" - : "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF8E8E8E), - ), - ), - ), - SizedBox(width: 8.w), - Image.asset( - "assets/image/browse.webp", - width: 14, - height: 14, - color: Color(0xFF808080), - ), - Expanded( - child: Text( - "${widget?.articles[position]?.viewers}" ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), - ), - )), - Text( - widget?.articles[position]?.createTime?.split(" ")[0] ?? - "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), - ), - ), - ], - ),), + )), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Text( + widget.articles != null + ? widget.articles[position]?.author?.name ?? "" + : "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF8E8E8E), + ), + ), + ), + SizedBox(width: 8.w), + Image.asset( + "assets/image/browse.webp", + width: 14, + height: 14, + color: Color(0xFF808080), + ), + Expanded( + child: Text( + "${widget?.articles[position]?.viewers}" ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), + )), + Text( + widget?.articles[position]?.createTime?.split(" ")[0] ?? + "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), + ), + ], + ) ], ), )), diff --git a/lib/community/headlines/headlines_column_details.dart b/lib/community/headlines/headlines_column_details.dart index eb4ced53..cd54017c 100644 --- a/lib/community/headlines/headlines_column_details.dart +++ b/lib/community/headlines/headlines_column_details.dart @@ -80,7 +80,7 @@ class _HeadlinesColumnDetails extends State "state": 1, "type": 2, "categoryId": categoryId, - "isHot":false, + "isHot": false, }).catchError((onError) { refreshController.refreshFailed(); refreshController.loadFailed(); @@ -145,21 +145,21 @@ class _HeadlinesColumnDetails extends State Stack( children: [ Positioned( - child: Container( - color: Colors.black, - child:Opacity( - opacity:0.75, - child: MImage( - headlinesListDetails?.bannerImg ?? "", - width: double.infinity, - height: 260.h, - fit: BoxFit.cover, - errorSrc: "assets/image/default_1.webp", - fadeSrc: "assets/image/default_1.webp", - ) - ) - ) - ), + child: Container( + color: Colors.black, + child: Opacity( + opacity: 0.75, + child: MImage( + headlinesListDetails?.bannerImg ?? + "", + width: double.infinity, + height: 260.h, + fit: BoxFit.cover, + errorSrc: + "assets/image/default_1.webp", + fadeSrc: + "assets/image/default_1.webp", + )))), Container( margin: EdgeInsets.only( top: 50.h, left: 16.w, right: 16.w), @@ -258,7 +258,10 @@ class _HeadlinesColumnDetails extends State Padding( padding: EdgeInsets.all(16), child: Text( - S.of(context).jianjie(headlinesListDetails?.introduce ?? ""), + S.of(context).jianjie( + headlinesListDetails + ?.introduce ?? + ""), overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( @@ -322,6 +325,8 @@ class _HeadlinesColumnDetails extends State // padding: EdgeInsets.all(16), color: Colors.white, child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ Container( // margin: EdgeInsets.only(top: 16,bottom: 16), @@ -334,9 +339,12 @@ class _HeadlinesColumnDetails extends State child: Row( children: [ Expanded( + child: Container( + height: + MediaQuery.of(context).size.width >= 650 ? 133.h : 105, child: Column( crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.start, children: [ Text( articles?.mainTitle ?? "", @@ -344,23 +352,27 @@ class _HeadlinesColumnDetails extends State maxLines: 1, style: TextStyle( fontSize: 14.sp, + height: 1.2.h, fontWeight: MyFontWeight.medium, color: Colors.black, ), ), - SizedBox(height: 5), - Text( + SizedBox(height: 6.h), + Expanded( + child: Text( articles?.viceTitle ?? "", - // overflow: TextOverflow.ellipsis, - // maxLines: 1, + overflow: TextOverflow.ellipsis, + maxLines: 3, style: TextStyle( fontSize: 12.sp, + height: 1.2.h, fontWeight: MyFontWeight.regular, color: Color(0xFF353535), ), - ), - SizedBox(height: 10), + )), Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: Text( @@ -402,14 +414,14 @@ class _HeadlinesColumnDetails extends State ), ], ), - ), - SizedBox(width: 12), + )), + SizedBox(width: 12.w), MImage( articles?.coverImg ?? "", fit: BoxFit.cover, radius: BorderRadius.all(Radius.circular(2)), - width: 96, - height: 96, + width: 100, + height: 100, ), ], )), diff --git a/lib/community/release_dynamic.dart b/lib/community/release_dynamic.dart index 540f5d4d..dc203f76 100644 --- a/lib/community/release_dynamic.dart +++ b/lib/community/release_dynamic.dart @@ -31,6 +31,7 @@ class _ReleaseDynamic extends State { int dynamicType = 0; TextEditingController textController = TextEditingController(); TextEditingController addressController = TextEditingController(); + // TextEditingController houseNumberController = TextEditingController(); ApiService apiService; Map addressMap; @@ -86,75 +87,80 @@ class _ReleaseDynamic extends State { releaseDynamic(); }, ), - body: Container( - child: Column( - children: [ - buildEdit(), - Container( - width: double.infinity, - margin: EdgeInsets.all(16), - padding: EdgeInsets.only(left: 16, right: 16), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - "!", - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 14.sp, - color: Colors.red, - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Text( - "用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示", - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 12.sp, - color: Color(0xFFB3B2B2), + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child: Container( + child: Column( + children: [ + buildEdit(), + Container( + width: double.infinity, + margin: EdgeInsets.all(16), + padding: EdgeInsets.only(left: 16, right: 16), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "!", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Colors.red, + ), ), - ), - ) - ], - ), - ), - Expanded( - child: GridView.builder( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3, - crossAxisSpacing: 12.w, - mainAxisSpacing: 12.w, - childAspectRatio: 1, + SizedBox( + width: 10, + ), + Expanded( + child: Text( + "用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示", + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 12.sp, + color: Color(0xFFB3B2B2), + ), + ), + ) + ], + ), ), - padding: EdgeInsets.all(16), - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - if (mediaPaths.length > position) { - return imageItem(mediaPaths[position]); - } else { - return addImageItem(); - } - }, - itemCount: (mediaPaths.length == 0) - ? 1 - : ((dynamicType == 2) + Expanded( + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3, + crossAxisSpacing: 12.w, + mainAxisSpacing: 12.w, + childAspectRatio: 1, + ), + padding: EdgeInsets.all(16), + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + if (mediaPaths.length > position) { + return imageItem(mediaPaths[position]); + } else { + return addImageItem(); + } + }, + itemCount: (mediaPaths.length == 0) ? 1 - : mediaPaths.length >= 9 - ? 9 - : (mediaPaths.length + 1)), - ), + : ((dynamicType == 2) + ? 1 + : mediaPaths.length >= 9 + ? 9 + : (mediaPaths.length + 1)), + ), + ), + ], ), - ], - ), - ), + )), ); } @@ -195,18 +201,18 @@ class _ReleaseDynamic extends State { "video": remoteVideoUrl, "coverImg": remoteVideoCoverImg, "latitude": "", - "location": addressController.text == "" - ? "" - : addressController.text, + "location": addressController.text == "" ? "" : addressController.text, "longitude": "", }).catchError((onError) { EasyLoading.dismiss(); }); - if (baseData.isSuccess) { + if (baseData != null && baseData.isSuccess) { SmartDialog.showToast("发布成功!"); Future.delayed(Duration(seconds: 1), () { Navigator.of(context).pop(true); }); + } else { + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } EasyLoading.dismiss(); }); @@ -446,8 +452,6 @@ class _ReleaseDynamic extends State { ); } - - ///动态输入框 Widget buildEdit() { return Container( @@ -504,7 +508,7 @@ class _ReleaseDynamic extends State { onTap: () { toMap(); }, - child:Row( + child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ @@ -519,7 +523,7 @@ class _ReleaseDynamic extends State { Text( addressController.text == "" ? "你在哪里呢?" - : addressController.text , + : addressController.text, overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 11.sp, diff --git a/lib/home/guide_page.dart b/lib/home/guide_page.dart index fdb3b8b6..74ccf3d5 100644 --- a/lib/home/guide_page.dart +++ b/lib/home/guide_page.dart @@ -1,10 +1,15 @@ +import 'dart:io'; + import 'package:flutter/cupertino.dart'; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; +import 'package:huixiang/view_widget/round_button.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:sharesdk_plugin/sharesdk_interface.dart'; class GuidePage extends StatefulWidget { @override @@ -14,6 +19,34 @@ class GuidePage extends StatefulWidget { } class _GuidePage extends State { + + @override + void initState() { + super.initState(); + // isLogin(); + } + + isLogin() async { + SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); + + if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || + !sharedPreferences.getBool("isShowPrivacyPolicy")) { + showAlertDialog(); + } + + // if (sharedPreferences.containsKey('token') && + // sharedPreferences.getString("token") != null && + // sharedPreferences.getString("token") != "") { + // Navigator.of(context).popAndPushNamed('/router/main_page'); + // } else { + // initController(); + // + // apiService = ApiService(Dio(), context: context); + // isShowLogin = true; + // setState(() {}); + // } + } + @override Widget build(BuildContext context) { return Scaffold( @@ -373,6 +406,161 @@ class _GuidePage extends State { ); } + + showAlertDialog() { + //显示对话框 + showDialog( + context: context, + builder: (BuildContext context) { + return SimpleDialog( + titlePadding: EdgeInsets.all(10), + backgroundColor: Colors.transparent, + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + children: [ + Stack( + alignment: Alignment.bottomCenter, + children: [ + Container( + alignment: Alignment.center, + width: double.infinity, + height: 305.h, + padding: EdgeInsets.only(left: 16.w, right: 16.w), + decoration: new BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(top: 24.h, bottom: 10.h), + child: Text( + S.of(context).xieyitanchuang, + style: TextStyle( + color: Color(0xff4D4D4D), + fontSize: 18.sp, + fontWeight: FontWeight.bold, + ), + ), + ), + Text.rich( + TextSpan(children: [ + TextSpan( + text: S.of(context).yinsizhengce1, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + height: 1.3.h, + color: Color(0xff727272), + ), + ), + TextSpan( + text: S.of(context).yinsixieyi, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xff32A060)), + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.of(context) + .popAndPushNamed('/router/treaty_page'); + }, + ), + ]), + ), + SizedBox( + height: 10.h, + ), + Text( + S.of(context).yinsizhengce2, + style: TextStyle( + color: Color(0xff727272), + fontSize: 14.sp, + height: 1.3.h, + fontWeight: MyFontWeight.medium, + ), + ), + SizedBox( + height: 16.h, + ), + ], + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + // exit(0); + }, + child: Container( + height: 40.h, + alignment: Alignment.bottomCenter, + margin: EdgeInsets.only(bottom: 20.h), + child: BorderText( + padding: EdgeInsets.only( + top: 10.h, + bottom: 10.h, + left: 36.w, + right: 36.w, + ), + text: S.of(context).jujue, + fontSize: 12.sp, + textColor: Color(0xFF32A060), + borderColor: Color(0xFF32A060), + borderWidth: 1.w, + radius: 23, + ), + ), + ), + SizedBox( + width: 21.w, + ), + Container( + height: 40.h, + margin: EdgeInsets.only(bottom: 20.h), + alignment: Alignment.bottomCenter, + child: RoundButton( + text: S.of(context).tongyibingjixu, + textColor: Colors.white, + fontSize: 12.sp, + callback: () { + SharedPreferences.getInstance().then((value) { + value.setBool("isShowPrivacyPolicy", true); + }); + SharesdkPlugin.uploadPrivacyPermissionStatus( + 1, + (success) => { + Navigator.of(context).pop(), + }, + ); + }, + padding: EdgeInsets.only( + top: 10.h, + bottom: 10.h, + left: 21.5.w, + right: 21.5.w, + ), + backgroup: Color(0xff32A060), + radius: 23, + ), + ), + SizedBox( + height: 20.h, + ), + ], + ), + ], + ) + ], + ); + }, + ); + } + toNext() { SharedPreferences.getInstance().then((value) { value.setBool("isFirst", false); diff --git a/lib/home/welfare_exchange.dart b/lib/home/welfare_exchange.dart index d793aef9..08841bc6 100644 --- a/lib/home/welfare_exchange.dart +++ b/lib/home/welfare_exchange.dart @@ -4,7 +4,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/home/points_mall_view/points_goods_title.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/goods.dart'; import 'package:huixiang/retrofit/data/goods_category.dart'; @@ -16,8 +15,6 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/item_title.dart'; -import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/no_data_view.dart'; @@ -220,7 +217,7 @@ class _WelfareExchange extends State with SingleTickerProvider ), ], )), - expandedHeight: ScreenUtil().setHeight(258.h), + expandedHeight: 258.h, bottom: PreferredSize( preferredSize: Size(double.infinity, 0), child: DefaultTabController( diff --git a/lib/integral_store/integral_store_details_page.dart b/lib/integral_store/integral_store_details_page.dart index 0b16ff30..f81d31af 100644 --- a/lib/integral_store/integral_store_details_page.dart +++ b/lib/integral_store/integral_store_details_page.dart @@ -123,32 +123,40 @@ class _IntegralStoreDetailsPage extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ buildProduct(), - Container( - padding: EdgeInsets.fromLTRB(16.w, 32.h, 16.w, 16.h), - child: Text( - S.of(context).duihuanguize, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 16.sp, - color: Color(0xFFFF7A1A), + Column( + children: [ + Container( + padding: EdgeInsets.fromLTRB(16.w, 32.h, 16.w, 16.h), + margin: EdgeInsets.only(top: 16.h), + color: Colors.white, + width: double.infinity, + child: Text( + S.of(context).duihuanguize, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 15.sp, + color: Color(0xFF000000), + ), + ), ), - ), - ), - if (goods?.detail != null && - goods.detail != "") - Container( - color: Colors.white, - child: Html( - data: goods?.detail??"", - customImageRenders: { - networkSourceMatcher(): networkImageRender( - loadingWidget: () { - return Container(); + if (goods?.detail != null && + goods.detail != "") + Container( + color: Colors.white, + padding: EdgeInsets.only(bottom: 40.h), + child: Html( + data: goods?.detail??"", + customImageRenders: { + networkSourceMatcher(): networkImageRender( + loadingWidget: () { + return Container(); + }, + ), }, ), - }, - ), - ), + ), + ], + ) ], ), ), @@ -179,7 +187,7 @@ class _IntegralStoreDetailsPage extends State { alignment: Alignment.center, child: Text( (payType > 0) - ? S.of(context).duihuan + ? "立即兑换" : S.of(context).jifenbuzu, // "兑换功能暂未开放", style: TextStyle( diff --git a/lib/main_page.dart b/lib/main_page.dart index b81743f9..05eef8b7 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -212,7 +212,7 @@ class _MainPage extends State with WidgetsBindingObserver { ); } - /// @typed: 1文章 2活动 3店铺 4积分商品 5订单 6动态 7用户 8平台余额/钱包 + /// @typed: 1文章 2活动 3店铺 4积分商品 5订单 6动态 7用户 8平台余额/钱包 9福利中心 xgFlutterPlugin.addEventHandler(xgPushClickAction: (event) async { print("xgPushClickAction1: $event"); if (event["actionType"] == 2) return event; @@ -305,7 +305,10 @@ class _MainPage extends State with WidgetsBindingObserver { routeName = "/router/mine_wallet"; params["id"] = pushMap["info"]; break; - + case 9: + routeName = "/router/welfare_page"; + params["id"] = pushMap["info"]; + break; } sharedPreferences.setString("pushData", ""); print("xgPushClickAction: routeName: $routeName"); diff --git a/lib/mine/edit_name.dart b/lib/mine/edit_name.dart index 77a37e39..b50fa4fe 100644 --- a/lib/mine/edit_name.dart +++ b/lib/mine/edit_name.dart @@ -49,7 +49,12 @@ class _EditName extends State { ), ), ), - body: Container( + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Container( margin: EdgeInsets.all(16), child: Column( children: [ @@ -82,7 +87,7 @@ class _EditName extends State { ), ], ), - ), + )), ); } } diff --git a/lib/mine/edit_signature.dart b/lib/mine/edit_signature.dart index 209d9bdd..19be0aeb 100644 --- a/lib/mine/edit_signature.dart +++ b/lib/mine/edit_signature.dart @@ -58,7 +58,12 @@ class _EditSignature extends State { ), ), ), - body: Container( + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Container( margin: EdgeInsets.all(16), child: Column( children: [ @@ -91,7 +96,7 @@ class _EditSignature extends State { ), ], ), - ), + )), ); } } diff --git a/lib/order/edit_remarks_page.dart b/lib/order/edit_remarks_page.dart index c870b004..f30a4f72 100644 --- a/lib/order/edit_remarks_page.dart +++ b/lib/order/edit_remarks_page.dart @@ -22,7 +22,12 @@ class _EditRemarksPage extends State { titleColor: Colors.black, leadingColor: Colors.black, ), - body: Column( + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Column( children: [ Expanded( child: Container( @@ -110,7 +115,7 @@ class _EditRemarksPage extends State { ), ), ], - ), + )), ); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 284605e2..f6852f20 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -1276,7 +1276,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as bool, + (json) => (json??"")=="" ? null :(json as bool), ); return value; } diff --git a/lib/setting/help_feedback_page.dart b/lib/setting/help_feedback_page.dart index 07f7b88b..48bd796c 100644 --- a/lib/setting/help_feedback_page.dart +++ b/lib/setting/help_feedback_page.dart @@ -43,7 +43,12 @@ class _HelpFeedbackPage extends State { background: Color(0xFFF7F7F7), leadingColor: Colors.black, ), - body: Container( + body: GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Container( decoration: new BoxDecoration( border: Border( bottom: BorderSide( @@ -165,7 +170,7 @@ class _HelpFeedbackPage extends State { ), ], ), - ), + )), ); } diff --git a/lib/web/web_page.dart b/lib/web/web_page.dart index 0e137ec9..167f11eb 100644 --- a/lib/web/web_page.dart +++ b/lib/web/web_page.dart @@ -189,8 +189,10 @@ class _WebPage extends State with WidgetsBindingObserver { //给文章/活动点赞 _queryInformationLikes() async { - BaseData baseData = await apiService.informationLikes( - widget.arguments["activityId"] ?? widget.arguments["articleId"]).catchError((onError) {}); + BaseData baseData = await apiService + .informationLikes( + widget.arguments["activityId"] ?? widget.arguments["articleId"]) + .catchError((onError) {}); if (baseData != null && baseData.isSuccess) { if (article != null) { if (article.liked) { @@ -215,7 +217,12 @@ class _WebPage extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { - return Scaffold( + return GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child:Scaffold( appBar: MyAppBar( action: Container( margin: EdgeInsets.only(right: 10), @@ -272,15 +279,18 @@ class _WebPage extends State with WidgetsBindingObserver { CommentList( commentKey, article?.likes ?? activity?.likes ?? 0, - widget.arguments["activityId"] ?? widget.arguments["articleId"], + widget.arguments["activityId"] ?? + widget.arguments["articleId"], 1, isKeyBoardShow, _reply, _delCommentTips, 12.sp, - requestApiFinish: (total){setState(() { - commentTotal = total; - });}, + requestApiFinish: (total) { + setState(() { + commentTotal = total; + }); + }, ), ], ), @@ -305,7 +315,7 @@ class _WebPage extends State with WidgetsBindingObserver { ], ), ), - ); + )); } ///删除评论的提示 @@ -317,8 +327,10 @@ class _WebPage extends State with WidgetsBindingObserver { ///删除评论 delComment() async { - BaseData baseData = await apiService.delComment( - widget.arguments["activityId"] ?? widget.arguments["articleId"]).catchError((onError) {}); + BaseData baseData = await apiService + .delComment( + widget.arguments["activityId"] ?? widget.arguments["articleId"]) + .catchError((onError) {}); if (baseData != null && baseData.isSuccess) { CommentListState _commentList = commentKey.currentState; _commentList.queryMemberCommentList(); diff --git a/pubspec.yaml b/pubspec.yaml index c8a172b8..d0bd41f6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 一心回乡. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 2.0.28+16 +version: 2.0.29+17 environment: sdk: ">=2.7.0 <3.0.0"