Browse Source

Merge remote-tracking branch 'origin/new_revision_app' into new_revision_app

zyh
fmk 3 years ago
parent
commit
b4e5272988
  1. 148
      lib/address/edit_address_page.dart
  2. 9
      lib/community/community_details.dart
  3. 9
      lib/community/community_view/class_details.dart
  4. 98
      lib/community/headlines/article_list.dart
  5. 68
      lib/community/headlines/headlines_column_details.dart
  6. 150
      lib/community/release_dynamic.dart
  7. 188
      lib/home/guide_page.dart
  8. 5
      lib/home/welfare_exchange.dart
  9. 56
      lib/integral_store/integral_store_details_page.dart
  10. 7
      lib/main_page.dart
  11. 9
      lib/mine/edit_name.dart
  12. 9
      lib/mine/edit_signature.dart
  13. 9
      lib/order/edit_remarks_page.dart
  14. 2
      lib/retrofit/retrofit_api.g.dart
  15. 9
      lib/setting/help_feedback_page.dart
  16. 32
      lib/web/web_page.dart
  17. 2
      pubspec.yaml

148
lib/address/edit_address_page.dart

@ -61,84 +61,90 @@ class _EditAddressPage extends State<EditAddressPage> {
leadingColor: Colors.black, leadingColor: Colors.black,
background: Colors.white, background: Colors.white,
), ),
body: Container( body: GestureDetector(
child: Column( behavior: HitTestBehavior.translucent,
children: [ onTap: () {
Container( FocusScope.of(context).requestFocus(FocusNode());
margin: EdgeInsets.only(bottom: 23.h), },
padding: EdgeInsets.only(top: 16.h, bottom: 15.h), child:Column(
decoration: BoxDecoration( children: [
color: Colors.white, Container(
boxShadow: [ margin: EdgeInsets.only(bottom: 23.h),
BoxShadow( padding: EdgeInsets.only(top: 16.h, bottom: 15.h),
color: Colors.black.withAlpha(12), decoration: BoxDecoration(
offset: Offset(0, 3), color: Colors.white,
blurRadius: 14, boxShadow: [
spreadRadius: 0, 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(
child:Column( children: [
children: [ editItem(
editItem( S.of(context).xingming,
S.of(context).xingming, preAddress != null ? preAddress.username : "",
preAddress != null ? preAddress.username : "", S.of(context).qingtianxiexingming,
S.of(context).qingtianxiexingming, nameController,
nameController, false),
false), editItem(
editItem( S.of(context).dianhua,
S.of(context).dianhua, preAddress != null ? preAddress.phone : "",
preAddress != null ? preAddress.phone : "", S.of(context).qingtianxieshoujihao,
S.of(context).qingtianxieshoujihao, mobileController,
mobileController, false),
false), InkWell(
InkWell( onTap: () {
onTap: () { toMap();
toMap(); },
}, child: editItem(
child: editItem( S.of(context).dizhi,
S.of(context).dizhi, preAddress != null ? preAddress.address : "",
S.of(context).shouhuodizhi,
addressController,
true),
),
editItem(
S.of(context).xiangxidizhi,
preAddress != null ? preAddress.address : "", preAddress != null ? preAddress.address : "",
S.of(context).shouhuodizhi, S.of(context).menpaihao,
addressController, houseNumberController,
true), false),
), ],
editItem( ),
S.of(context).xiangxidizhi,
preAddress != null ? preAddress.address : "",
S.of(context).menpaihao,
houseNumberController,
false),
],
), ),
InkWell(
), onTap: () {
InkWell( saveOrUpdate();
onTap: () { },
saveOrUpdate(); child: Container(
}, width: MediaQuery.of(context).size.width,
child: Container( margin:EdgeInsets.symmetric(horizontal: 16.w),
color: Color(0xFF32A060), padding: EdgeInsets.all(16),
width: MediaQuery.of(context).size.width, decoration: BoxDecoration(
padding: EdgeInsets.all(16), borderRadius: BorderRadius.circular(26),
alignment: Alignment.center, color: Color(0xFF32A060),
child: Text( ),
S.of(context).baocun, alignment: Alignment.center,
style: TextStyle( child: Text(
fontWeight: FontWeight.bold, S.of(context).baocun,
fontSize: 16.sp, style: TextStyle(
color: Colors.white, fontWeight: FontWeight.bold,
fontSize: 16.sp,
color: Colors.white,
),
), ),
), ),
), ),
), ],
], )),
),
),
); );
} }

9
lib/community/community_details.dart

@ -112,7 +112,12 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
leading: true, leading: true,
leadingColor: Colors.black, leadingColor: Colors.black,
), ),
body: Container( body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
@ -190,7 +195,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
), ),
], ],
), ),
), )),
); );
} }

9
lib/community/community_view/class_details.dart

@ -126,7 +126,12 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
return AnnotatedRegion<SystemUiOverlayStyle>( return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light, value: SystemUiOverlayStyle.light,
child: Material(child: Scaffold( child: Material(child: Scaffold(
body: Container( body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
// margin: EdgeInsets.only(top:25), // margin: EdgeInsets.only(top:25),
child: Column( child: Column(
children: [ children: [
@ -387,7 +392,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
), ),
], ],
), ),
), )),
),) ),)
); );
} }

98
lib/community/headlines/article_list.dart

@ -93,7 +93,7 @@ class _ArticleList extends State<ArticleList> {
height: MediaQuery.of(context).size.width >= 650 ? 133.h :105, height: MediaQuery.of(context).size.width >= 650 ? 133.h :105,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text( Text(
widget?.articles[position]?.mainTitle ?? "", widget?.articles[position]?.mainTitle ?? "",
@ -101,64 +101,68 @@ class _ArticleList extends State<ArticleList> {
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
height: 1.2.h,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.black, color: Colors.black,
), ),
), ),
SizedBox(height:5.h), SizedBox(height:6.h),
Text( Expanded(child: Text(
widget?.articles[position]?.viceTitle ?? "", widget?.articles[position]?.viceTitle ?? "",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
height: 1.2.h,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), )),
Expanded(child:Row( Row(
children: [ mainAxisAlignment: MainAxisAlignment.start,
Expanded( crossAxisAlignment: CrossAxisAlignment.center,
child: Text( children: [
widget.articles != null Expanded(
? widget.articles[position]?.author?.name ?? "" child: Text(
: "", widget.articles != null
overflow: TextOverflow.ellipsis, ? widget.articles[position]?.author?.name ?? ""
maxLines: 1, : "",
style: TextStyle( overflow: TextOverflow.ellipsis,
fontSize: 12.sp, maxLines: 1,
fontWeight: MyFontWeight.medium, style: TextStyle(
color: Color(0xFF8E8E8E), fontSize: 12.sp,
), fontWeight: MyFontWeight.medium,
), color: Color(0xFF8E8E8E),
), ),
SizedBox(width: 8.w), ),
Image.asset( ),
"assets/image/browse.webp", SizedBox(width: 8.w),
width: 14, Image.asset(
height: 14, "assets/image/browse.webp",
color: Color(0xFF808080), width: 14,
), height: 14,
Expanded( color: Color(0xFF808080),
child: Text( ),
"${widget?.articles[position]?.viewers}" ?? "", Expanded(
style: TextStyle( child: Text(
fontSize: 12.sp, "${widget?.articles[position]?.viewers}" ?? "",
fontWeight: MyFontWeight.regular, style: TextStyle(
color: Color(0xFF8D8D8D), fontSize: 12.sp,
), fontWeight: MyFontWeight.regular,
)), color: Color(0xFF8D8D8D),
Text( ),
widget?.articles[position]?.createTime?.split(" ")[0] ?? )),
"", Text(
style: TextStyle( widget?.articles[position]?.createTime?.split(" ")[0] ??
fontSize: 12.sp, "",
fontWeight: MyFontWeight.regular, style: TextStyle(
color: Color(0xFF8D8D8D), fontSize: 12.sp,
), fontWeight: MyFontWeight.regular,
), color: Color(0xFF8D8D8D),
], ),
),), ),
],
)
], ],
), ),
)), )),

68
lib/community/headlines/headlines_column_details.dart

@ -80,7 +80,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
"state": 1, "state": 1,
"type": 2, "type": 2,
"categoryId": categoryId, "categoryId": categoryId,
"isHot":false, "isHot": false,
}).catchError((onError) { }).catchError((onError) {
refreshController.refreshFailed(); refreshController.refreshFailed();
refreshController.loadFailed(); refreshController.loadFailed();
@ -145,21 +145,21 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
Stack( Stack(
children: [ children: [
Positioned( Positioned(
child: Container( child: Container(
color: Colors.black, color: Colors.black,
child:Opacity( child: Opacity(
opacity:0.75, opacity: 0.75,
child: MImage( child: MImage(
headlinesListDetails?.bannerImg ?? "", headlinesListDetails?.bannerImg ??
width: double.infinity, "",
height: 260.h, width: double.infinity,
fit: BoxFit.cover, height: 260.h,
errorSrc: "assets/image/default_1.webp", fit: BoxFit.cover,
fadeSrc: "assets/image/default_1.webp", errorSrc:
) "assets/image/default_1.webp",
) fadeSrc:
) "assets/image/default_1.webp",
), )))),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 50.h, left: 16.w, right: 16.w), top: 50.h, left: 16.w, right: 16.w),
@ -258,7 +258,10 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
Padding( Padding(
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Text( child: Text(
S.of(context).jianjie(headlinesListDetails?.introduce ?? ""), S.of(context).jianjie(
headlinesListDetails
?.introduce ??
""),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
@ -322,6 +325,8 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
// padding: EdgeInsets.all(16), // padding: EdgeInsets.all(16),
color: Colors.white, color: Colors.white,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Container( Container(
// margin: EdgeInsets.only(top: 16,bottom: 16), // margin: EdgeInsets.only(top: 16,bottom: 16),
@ -334,9 +339,12 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: Container(
height:
MediaQuery.of(context).size.width >= 650 ? 133.h : 105,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text( Text(
articles?.mainTitle ?? "", articles?.mainTitle ?? "",
@ -344,23 +352,27 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
height: 1.2.h,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Colors.black, color: Colors.black,
), ),
), ),
SizedBox(height: 5), SizedBox(height: 6.h),
Text( Expanded(
child: Text(
articles?.viceTitle ?? "", articles?.viceTitle ?? "",
// overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
// maxLines: 1, maxLines: 3,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
height: 1.2.h,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), )),
SizedBox(height: 10),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
@ -402,14 +414,14 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
), ),
], ],
), ),
), )),
SizedBox(width: 12), SizedBox(width: 12.w),
MImage( MImage(
articles?.coverImg ?? "", articles?.coverImg ?? "",
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.all(Radius.circular(2)), radius: BorderRadius.all(Radius.circular(2)),
width: 96, width: 100,
height: 96, height: 100,
), ),
], ],
)), )),

150
lib/community/release_dynamic.dart

@ -31,6 +31,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
int dynamicType = 0; int dynamicType = 0;
TextEditingController textController = TextEditingController(); TextEditingController textController = TextEditingController();
TextEditingController addressController = TextEditingController(); TextEditingController addressController = TextEditingController();
// TextEditingController houseNumberController = TextEditingController(); // TextEditingController houseNumberController = TextEditingController();
ApiService apiService; ApiService apiService;
Map addressMap; Map addressMap;
@ -86,75 +87,80 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
releaseDynamic(); releaseDynamic();
}, },
), ),
body: Container( body: GestureDetector(
child: Column( behavior: HitTestBehavior.translucent,
children: [ onTap: () {
buildEdit(), FocusScope.of(context).requestFocus(FocusNode());
Container( },
width: double.infinity, child: Container(
margin: EdgeInsets.all(16), child: Column(
padding: EdgeInsets.only(left: 16, right: 16), children: [
child: Row( buildEdit(),
crossAxisAlignment: CrossAxisAlignment.start, Container(
mainAxisAlignment: MainAxisAlignment.start, width: double.infinity,
children: [ margin: EdgeInsets.all(16),
Text( padding: EdgeInsets.only(left: 16, right: 16),
"!", child: Row(
overflow: TextOverflow.ellipsis, crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle( mainAxisAlignment: MainAxisAlignment.start,
fontWeight: MyFontWeight.semi_bold, children: [
fontSize: 14.sp, Text(
color: Colors.red, "!",
), overflow: TextOverflow.ellipsis,
), style: TextStyle(
SizedBox( fontWeight: MyFontWeight.semi_bold,
width: 10, fontSize: 14.sp,
), color: Colors.red,
Expanded( ),
child: Text(
"用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 12.sp,
color: Color(0xFFB3B2B2),
), ),
), SizedBox(
) width: 10,
], ),
), Expanded(
), child: Text(
Expanded( "用户发布内容需要等待系统审核,审核通过后才会在推荐广场展示",
child: GridView.builder( maxLines: 2,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( overflow: TextOverflow.ellipsis,
crossAxisCount: 3, style: TextStyle(
crossAxisSpacing: 12.w, fontWeight: MyFontWeight.medium,
mainAxisSpacing: 12.w, fontSize: 12.sp,
childAspectRatio: 1, color: Color(0xFFB3B2B2),
),
),
)
],
),
), ),
padding: EdgeInsets.all(16), Expanded(
shrinkWrap: true, child: GridView.builder(
physics: NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
itemBuilder: (context, position) { crossAxisCount: 3,
if (mediaPaths.length > position) { crossAxisSpacing: 12.w,
return imageItem(mediaPaths[position]); mainAxisSpacing: 12.w,
} else { childAspectRatio: 1,
return addImageItem(); ),
} padding: EdgeInsets.all(16),
}, shrinkWrap: true,
itemCount: (mediaPaths.length == 0) physics: NeverScrollableScrollPhysics(),
? 1 itemBuilder: (context, position) {
: ((dynamicType == 2) if (mediaPaths.length > position) {
return imageItem(mediaPaths[position]);
} else {
return addImageItem();
}
},
itemCount: (mediaPaths.length == 0)
? 1 ? 1
: mediaPaths.length >= 9 : ((dynamicType == 2)
? 9 ? 1
: (mediaPaths.length + 1)), : mediaPaths.length >= 9
), ? 9
: (mediaPaths.length + 1)),
),
),
],
), ),
], )),
),
),
); );
} }
@ -195,18 +201,18 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
"video": remoteVideoUrl, "video": remoteVideoUrl,
"coverImg": remoteVideoCoverImg, "coverImg": remoteVideoCoverImg,
"latitude": "", "latitude": "",
"location": addressController.text == "" "location": addressController.text == "" ? "" : addressController.text,
? ""
: addressController.text,
"longitude": "", "longitude": "",
}).catchError((onError) { }).catchError((onError) {
EasyLoading.dismiss(); EasyLoading.dismiss();
}); });
if (baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("发布成功!"); SmartDialog.showToast("发布成功!");
Future.delayed(Duration(seconds: 1), () { Future.delayed(Duration(seconds: 1), () {
Navigator.of(context).pop(true); Navigator.of(context).pop(true);
}); });
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
EasyLoading.dismiss(); EasyLoading.dismiss();
}); });
@ -446,8 +452,6 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
); );
} }
/// ///
Widget buildEdit() { Widget buildEdit() {
return Container( return Container(
@ -504,7 +508,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
onTap: () { onTap: () {
toMap(); toMap();
}, },
child:Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
@ -519,7 +523,7 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
Text( Text(
addressController.text == "" addressController.text == ""
? "你在哪里呢?" ? "你在哪里呢?"
: addressController.text , : addressController.text,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 11.sp, fontSize: 11.sp,

188
lib/home/guide_page.dart

@ -1,10 +1,15 @@
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.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:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
class GuidePage extends StatefulWidget { class GuidePage extends StatefulWidget {
@override @override
@ -14,6 +19,34 @@ class GuidePage extends StatefulWidget {
} }
class _GuidePage extends State<GuidePage> { class _GuidePage extends State<GuidePage> {
@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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -373,6 +406,161 @@ class _GuidePage extends State<GuidePage> {
); );
} }
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: <Widget>[
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() { toNext() {
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
value.setBool("isFirst", false); value.setBool("isFirst", false);

5
lib/home/welfare_exchange.dart

@ -4,7 +4,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.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/base_data.dart';
import 'package:huixiang/retrofit/data/goods.dart'; import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/goods_category.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:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/custom_image.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_footer.dart';
import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/no_data_view.dart';
@ -220,7 +217,7 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
), ),
], ],
)), )),
expandedHeight: ScreenUtil().setHeight(258.h), expandedHeight: 258.h,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size(double.infinity, 0), preferredSize: Size(double.infinity, 0),
child: DefaultTabController( child: DefaultTabController(

56
lib/integral_store/integral_store_details_page.dart

@ -123,32 +123,40 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
buildProduct(), buildProduct(),
Container( Column(
padding: EdgeInsets.fromLTRB(16.w, 32.h, 16.w, 16.h), children: [
child: Text( Container(
S.of(context).duihuanguize, padding: EdgeInsets.fromLTRB(16.w, 32.h, 16.w, 16.h),
style: TextStyle( margin: EdgeInsets.only(top: 16.h),
fontWeight: MyFontWeight.semi_bold, color: Colors.white,
fontSize: 16.sp, width: double.infinity,
color: Color(0xFFFF7A1A), child: Text(
S.of(context).duihuanguize,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF000000),
),
),
), ),
), if (goods?.detail != null &&
), goods.detail != "")
if (goods?.detail != null && Container(
goods.detail != "") color: Colors.white,
Container( padding: EdgeInsets.only(bottom: 40.h),
color: Colors.white, child: Html(
child: Html( data: goods?.detail??"",
data: goods?.detail??"", customImageRenders: {
customImageRenders: { networkSourceMatcher(): networkImageRender(
networkSourceMatcher(): networkImageRender( loadingWidget: () {
loadingWidget: () { return Container();
return Container(); },
),
}, },
), ),
}, ),
), ],
), )
], ],
), ),
), ),
@ -179,7 +187,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
(payType > 0) (payType > 0)
? S.of(context).duihuan ? "立即兑换"
: S.of(context).jifenbuzu, : S.of(context).jifenbuzu,
// "兑换功能暂未开放", // "兑换功能暂未开放",
style: TextStyle( style: TextStyle(

7
lib/main_page.dart

@ -212,7 +212,7 @@ class _MainPage extends State<MainPage> 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 { xgFlutterPlugin.addEventHandler(xgPushClickAction: (event) async {
print("xgPushClickAction1: $event"); print("xgPushClickAction1: $event");
if (event["actionType"] == 2) return event; if (event["actionType"] == 2) return event;
@ -305,7 +305,10 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
routeName = "/router/mine_wallet"; routeName = "/router/mine_wallet";
params["id"] = pushMap["info"]; params["id"] = pushMap["info"];
break; break;
case 9:
routeName = "/router/welfare_page";
params["id"] = pushMap["info"];
break;
} }
sharedPreferences.setString("pushData", ""); sharedPreferences.setString("pushData", "");
print("xgPushClickAction: routeName: $routeName"); print("xgPushClickAction: routeName: $routeName");

9
lib/mine/edit_name.dart

@ -49,7 +49,12 @@ class _EditName extends State<EditName> {
), ),
), ),
), ),
body: Container( body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
margin: EdgeInsets.all(16), margin: EdgeInsets.all(16),
child: Column( child: Column(
children: [ children: [
@ -82,7 +87,7 @@ class _EditName extends State<EditName> {
), ),
], ],
), ),
), )),
); );
} }
} }

9
lib/mine/edit_signature.dart

@ -58,7 +58,12 @@ class _EditSignature extends State<EditSignature> {
), ),
), ),
), ),
body: Container( body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
margin: EdgeInsets.all(16), margin: EdgeInsets.all(16),
child: Column( child: Column(
children: [ children: [
@ -91,7 +96,7 @@ class _EditSignature extends State<EditSignature> {
), ),
], ],
), ),
), )),
); );
} }
} }

9
lib/order/edit_remarks_page.dart

@ -22,7 +22,12 @@ class _EditRemarksPage extends State<EditRemarksPage> {
titleColor: Colors.black, titleColor: Colors.black,
leadingColor: Colors.black, leadingColor: Colors.black,
), ),
body: Column( body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Column(
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
@ -110,7 +115,7 @@ class _EditRemarksPage extends State<EditRemarksPage> {
), ),
), ),
], ],
), )),
); );
} }

2
lib/retrofit/retrofit_api.g.dart

@ -1276,7 +1276,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<bool>.fromJson( final value = BaseData<bool>.fromJson(
_result.data, _result.data,
(json) => json as bool, (json) => (json??"")=="" ? null :(json as bool),
); );
return value; return value;
} }

9
lib/setting/help_feedback_page.dart

@ -43,7 +43,12 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage> {
background: Color(0xFFF7F7F7), background: Color(0xFFF7F7F7),
leadingColor: Colors.black, leadingColor: Colors.black,
), ),
body: Container( body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
@ -165,7 +170,7 @@ class _HelpFeedbackPage extends State<HelpFeedbackPage> {
), ),
], ],
), ),
), )),
); );
} }

32
lib/web/web_page.dart

@ -189,8 +189,10 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
/// ///
_queryInformationLikes() async { _queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes( BaseData baseData = await apiService
widget.arguments["activityId"] ?? widget.arguments["articleId"]).catchError((onError) {}); .informationLikes(
widget.arguments["activityId"] ?? widget.arguments["articleId"])
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
if (article != null) { if (article != null) {
if (article.liked) { if (article.liked) {
@ -215,7 +217,12 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
action: Container( action: Container(
margin: EdgeInsets.only(right: 10), margin: EdgeInsets.only(right: 10),
@ -272,15 +279,18 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
CommentList( CommentList(
commentKey, commentKey,
article?.likes ?? activity?.likes ?? 0, article?.likes ?? activity?.likes ?? 0,
widget.arguments["activityId"] ?? widget.arguments["articleId"], widget.arguments["activityId"] ??
widget.arguments["articleId"],
1, 1,
isKeyBoardShow, isKeyBoardShow,
_reply, _reply,
_delCommentTips, _delCommentTips,
12.sp, 12.sp,
requestApiFinish: (total){setState(() { requestApiFinish: (total) {
commentTotal = total; setState(() {
});}, commentTotal = total;
});
},
), ),
], ],
), ),
@ -305,7 +315,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
], ],
), ),
), ),
); ));
} }
/// ///
@ -317,8 +327,10 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
/// ///
delComment() async { delComment() async {
BaseData baseData = await apiService.delComment( BaseData baseData = await apiService
widget.arguments["activityId"] ?? widget.arguments["articleId"]).catchError((onError) {}); .delComment(
widget.arguments["activityId"] ?? widget.arguments["articleId"])
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
CommentListState _commentList = commentKey.currentState; CommentListState _commentList = commentKey.currentState;
_commentList.queryMemberCommentList(); _commentList.queryMemberCommentList();

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev 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: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save