Browse Source

1.优化错误提示;

2.优化文本;
3.更改动态图片查看背景;
4.动态列表"..."点击事件范围;
5.发布评论键盘绑定发送事件;
6.动态列表增加点赞功能;
dart3_last
wurong 2 years ago
parent
commit
1cc6aaf56e
  1. 21
      lib/base_state.dart
  2. 7
      lib/community/community_child_page.dart
  3. 515
      lib/community/community_view/class_details.dart
  4. 408
      lib/community/community_view/community_dynamic.dart
  5. 72
      lib/community/photo_view_gallery_screen.dart
  6. 6
      lib/generated/intl/messages_en.dart
  7. 10
      lib/generated/intl/messages_en_US.dart
  8. 6
      lib/generated/intl/messages_zh_CN.dart
  9. 6
      lib/generated/intl/messages_zh_Hans_CN.dart
  10. 8
      lib/generated/intl/messages_zh_Hant_CN.dart
  11. 6
      lib/generated/intl/messages_zh_TW.dart
  12. 60
      lib/generated/l10n.dart
  13. 163
      lib/home/home_page.dart
  14. 86
      lib/home/welfare_exchange.dart
  15. 9
      lib/l10n/intl_en.arb
  16. 8
      lib/l10n/intl_en_US.arb
  17. 8
      lib/l10n/intl_zh_CN.arb
  18. 8
      lib/l10n/intl_zh_Hans_CN.arb
  19. 8
      lib/l10n/intl_zh_Hant_CN.arb
  20. 8
      lib/l10n/intl_zh_TW.arb
  21. 59
      lib/login/new_login_page.dart
  22. 2
      lib/main_page.dart
  23. 111
      lib/mine/mine_page.dart
  24. 2
      lib/mine/mine_view/mine_view.dart
  25. 100
      lib/mine/personal_page.dart
  26. 62
      lib/mine/recharge_page.dart
  27. 103
      lib/mine/user_info_page.dart
  28. 8
      lib/retrofit/data/settleOrderInfo.dart
  29. 2
      lib/retrofit/min_api.dart
  30. 2
      lib/retrofit/retrofit_api.dart
  31. 417
      lib/settlement/settlement.dart
  32. 2
      lib/union/union_page.dart
  33. 4
      lib/view_widget/activity_coupons.dart
  34. 2
      lib/view_widget/coupon_details_dialog.dart
  35. 2
      lib/view_widget/cupertino_date_picker.dart
  36. 4
      lib/view_widget/new_coupon_widget.dart
  37. 4
      lib/view_widget/pay_selected_dialog.dart
  38. 2
      lib/view_widget/receiving_method_dialog.dart
  39. 117
      lib/view_widget/update_dialog.dart
  40. 4
      lib/view_widget/vip_dialog.dart
  41. 2
      lib/vip/user_vip_service_page.dart
  42. 252
      lib/vip/vip_view/vip_top.dart
  43. 2
      lib/web/web_turntable_activity.dart
  44. 8
      lib/web/web_view/input_comment.dart
  45. 2
      pubspec.yaml

21
lib/base_state.dart

@ -1,12 +1,11 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:huixiang/utils/bridge.dart';
import 'package:shared_preferences/shared_preferences.dart';
abstract class BaseState<T extends StatefulWidget> extends State<T> with WidgetsBindingObserver {
abstract class BaseState<T extends StatefulWidget> extends State<T>
with WidgetsBindingObserver {
@override
void dispose() {
super.dispose();
@ -71,6 +70,18 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> with Widgets
routeName = "/router/order_details";
params["id"] = pushMap["info"];
break;
case 6:
routeName = "/router/community_details";
params["businessId"] = pushMap["info"];
break;
case 8:
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");
@ -79,6 +90,4 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> with Widgets
}
}
}
}
}

7
lib/community/community_child_page.dart

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/community/community_view/community_dynamic.dart';
import 'package:huixiang/retrofit/data/article.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -15,6 +16,8 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
class CommunityChildPage extends StatefulWidget {
final String typeStr;
final Function onScroll;
@ -84,6 +87,8 @@ class CommunityChildPageState extends State<CommunityChildPage>
"pageSize": 10,
"searchKey": searchKey ?? ""
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
if (searchKey == null) {
refreshController.refreshFailed();
refreshController.loadFailed();
@ -101,6 +106,7 @@ class CommunityChildPageState extends State<CommunityChildPage>
element.content = jsonEncode(baseData.data.list[0].subjectInfo);
element.mainTitle = baseData.data.list[0].subject;
element.followed = baseData.data.list[0].selfFollow;
element.liked = baseData.data.list[0].selfLike;
element.authorHeadImg = baseData.data.list[0].memberInfo?.avatar;
element.authorName = baseData.data.list[0].memberInfo?.nickname;
element.location = baseData.data.list[0].location;
@ -123,6 +129,7 @@ class CommunityChildPageState extends State<CommunityChildPage>
article.content = jsonEncode(element.subjectInfo);
article.mainTitle = element.subject;
article.followed = element.selfFollow;
article.liked = element.selfLike;
article.authorHeadImg = element.memberInfo?.avatar;
article.authorName = element.memberInfo?.nickname;
article.location = element.location;

515
lib/community/community_view/class_details.dart

@ -131,277 +131,298 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
@override
Widget build(BuildContext context) {
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: Material(child: Scaffold(
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
// margin: EdgeInsets.only(top:25),
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
Container(
child:Stack(
value: SystemUiOverlayStyle.light,
child: Material(
child: Scaffold(
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: Container(
// margin: EdgeInsets.only(top:25),
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
ClassDetailsVideo(key:videoKey,exitFull: (){setState(() {});},
coverImg: chapterList.length > chapterIndex
? chapterList[chapterIndex].content.coverImg
: "",isShowImg: this.isShowImg,
changeShowImg: (isShowImg){setState(() {
this.isShowImg = isShowImg;
});},heightFun: (height) {
this.height = height +
MediaQuery
.of(context)
.padding
.top +
kToolbarHeight +
24;
if (mounted) setState(() {});
},),
Container(
margin: EdgeInsets.only(
top: 40.h, left: 16.w, right: 16.w),
decoration: BoxDecoration(
color: Colors.transparent,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
child: Stack(
children: [
GestureDetector(
child: Image.asset(
"assets/image/integral_return.webp",
width: 24,
height: 24,
),
onTap: () {
Navigator.of(context).pop(
course != null ? course.viewers + 1 : 0);
ClassDetailsVideo(
key: videoKey,
exitFull: () {
setState(() {});
},
coverImg:
chapterList.length > chapterIndex
? chapterList[chapterIndex]
.content
.coverImg
: "",
isShowImg: this.isShowImg,
changeShowImg: (isShowImg) {
setState(() {
this.isShowImg = isShowImg;
});
},
heightFun: (height) {
this.height = height +
MediaQuery.of(context).padding.top +
kToolbarHeight +
24;
if (mounted) setState(() {});
},
),
],
),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: 16.h),
padding: EdgeInsets.only(left: 16, top: 16, right: 10),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
// height: 22.h,
padding:EdgeInsets.only(left:2,right:2),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
border: Border.all(
width: 1,
color: Color(0xFFFF7A1A),
style: BorderStyle.solid,
),
),
child: Text(
(course?.tags != null &&
course.tags.length > 0)
? course.tags[0]
: "",
overflow:TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFFFF7A1A),
Container(
margin: EdgeInsets.only(
top: 40.h, left: 16.w, right: 16.w),
decoration: BoxDecoration(
color: Colors.transparent,
),
),
),
SizedBox(
width: 6.w,
),
Expanded(
child: Text(
course != null ? course.subject : "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
GestureDetector(
child: Image.asset(
"assets/image/integral_return.webp",
width: 24,
height: 24,
),
onTap: () {
Navigator.of(context).pop(
course != null
? course.viewers + 1
: 0);
},
),
],
),
),
flex: 1,
),
// GestureDetector(
// onTap: () {
// share();
// },
// child: Icon(
// Icons.share,
// size: 24,
// color: Colors.black,
// ),
// ),
// SizedBox(width: 15.w,),
],
),
SizedBox(
height: 10.h,
],
),
),
Padding(
padding: EdgeInsets.only(right: 16),
child: Row(
Container(
margin: EdgeInsets.only(bottom: 16.h),
padding: EdgeInsets.only(
left: 16, top: 16, right: 10),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
"${S.of(context).jiangshi}:${course != null ? course.author.name : ""}",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
Row(
children: [
Container(
// height: 22.h,
padding: EdgeInsets.only(
left: 2, right: 2),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(2),
border: Border.all(
width: 1,
color: Color(0xFFFF7A1A),
style: BorderStyle.solid,
),
),
)),
Text(
"${S.of(context).bofangcishu}:",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
child: Text(
(course?.tags != null &&
course.tags.length > 0)
? course.tags[0]
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFFFF7A1A),
),
),
),
SizedBox(
width: 6.w,
),
Expanded(
child: Text(
course != null
? course.subject
: "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 16.sp,
fontWeight:
MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
),
),
flex: 1,
),
// GestureDetector(
// onTap: () {
// share();
// },
// child: Icon(
// Icons.share,
// size: 24,
// color: Colors.black,
// ),
// ),
// SizedBox(width: 15.w,),
],
),
SizedBox(
height: 10.h,
),
Padding(
padding: EdgeInsets.only(right: 16),
child: Row(
children: [
Expanded(
child: Text(
"${S.of(context).jiangshi}:${course != null ? course.author.name : ""}",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
)),
Text(
"${S.of(context).bofangcishu}:",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),
SizedBox(
width: 4,
),
Text(
course != null
? course.viewers.toString()
: "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),
],
),
),
SizedBox(
width: 4,
height: 10.h,
),
Text(
course != null
? course.viewers.toString()
: "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
course != null ? course.introduce : "",
overflow: isShowMore
? TextOverflow.visible
: TextOverflow.ellipsis,
maxLines: isShowMore ? 10 : 2,
style: TextStyle(
fontSize: 12.sp,
height: 1.2.h,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
color: Colors.black,
),
),
SizedBox(height: 3.h),
GestureDetector(
onTap: () {
setState(() {
isShowMore = !isShowMore;
});
},
child: Align(
alignment: Alignment.center,
child: Icon(
(isShowMore != null && !isShowMore)
? Icons.keyboard_arrow_down
: Icons.keyboard_arrow_up,
color: Colors.black,
size: 24,
),
),
),
SizedBox(height: 3.h),
],
),
),
SizedBox(
height: 10.h,
),
Text(
course != null ? course.introduce : "",
overflow: isShowMore
? TextOverflow.visible
: TextOverflow.ellipsis,
maxLines: isShowMore ? 10 : 2,
style: TextStyle(
fontSize: 12.sp,
height: 1.2.h,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
SizedBox(height: 3.h),
GestureDetector(
onTap: () {
anthology(),
CommentList(
commentKey,
course?.likes ?? course?.likes ?? 0,
widget.arguments["id"],
3,
isKeyBoardShow,
_reply,
_delCommentTips,
12.sp,
requestApiFinish: (total) {
setState(() {
isShowMore = !isShowMore;
commentTotal = total;
});
},
child:Align(
alignment: Alignment.center,
child: Icon(
(isShowMore != null && !isShowMore)
? Icons.keyboard_arrow_down
: Icons.keyboard_arrow_up,
color: Colors.black,
size: 24,
),
if (commentTotal == 0)
Container(
width: double.infinity,
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
),
),
),
SizedBox(height: 3.h),
],
),
),
anthology(),
CommentList(
commentKey,
course?.likes ?? course?.likes ?? 0,
widget.arguments["id"],
3,
isKeyBoardShow,
_reply,
_delCommentTips,
12.sp,
requestApiFinish: (total) {
setState(() {
commentTotal = total;
});
},
),
if (commentTotal == 0)
Container(
width: double.infinity,
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
),
),
],
),
flex: 1,
),
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
commentFocus,
commentTextController,
_toComment,
_queryMemberComment,
_queryCourseLikes,
isLike: course?.selfLiked,
),
],
),
flex: 1,
),
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
commentFocus,
commentTextController,
_toComment,
_queryMemberComment,
_queryCourseLikes,
isLike: course?.selfLiked,
),
],
),
)),
),)
);
)),
),
));
}
Widget anthology() {
@ -563,16 +584,16 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
share() async {
SSDKMap params = SSDKMap()
..setGeneral(
course.subject != null
? course.subject
: "",
course.subject != null ? course.subject : "",
course != null ? course.introduce : "",
[
chapterList[chapterIndex].content.coverImg != null
? chapterList[chapterIndex].content.coverImg:"",
? chapterList[chapterIndex].content.coverImg
: "",
],
chapterList[chapterIndex].content.fileUrl != null
? chapterList[chapterIndex].content.fileUrl:"",
? chapterList[chapterIndex].content.fileUrl
: "",
"",
buildShareUrl(),
"",
@ -590,12 +611,12 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
if (platform == ShareSDKPlatforms.line) {
params.map["type"] = SSDKContentTypes.text.value;
params.map["text"] =
"${course.subject ?? ""} ${buildShareUrl()}";
"${course.subject ?? ""} ${buildShareUrl()}";
}
SharesdkPlugin.share(platform, params,
(state, userData, contentEntity, error) {
print("share!$state");
});
(state, userData, contentEntity, error) {
print("share!$state");
});
});
});
}

408
lib/community/community_view/community_dynamic.dart

@ -37,7 +37,7 @@ class CommunityDynamic extends StatefulWidget {
CommunityDynamic(
this.article,
this.commentType, {
this.commentType,{
Key key,
this.itemCount = 9,
this.heightFun,
@ -149,11 +149,28 @@ class _CommunityDynamic extends State<CommunityDynamic> {
}
}
goPersonalPage()async{
await Navigator.of(context)
.pushNamed('/router/personal_page', arguments: {
"memberId":
(widget.article.author == widget.userId)
////
_queryInformationLikes(isLikes) async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData baseData = await apiService
.informationLikes(widget.article.id)
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
widget.exitFull();
setState(() {});
}
}
goPersonalPage() async {
await Navigator.of(context).pushNamed('/router/personal_page', arguments: {
"memberId": (widget.article.author == widget.userId)
? "0"
: widget.article.author,
});
@ -168,7 +185,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
margin: EdgeInsets.only(top: 2.h),
key: globalKey,
alignment: Alignment.topCenter,
padding: EdgeInsets.only(left: 16.w,top: 16.h,right: 16.w),
padding: EdgeInsets.only(left: 16.w, top: 16.h, right: 16.w),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@ -228,7 +245,10 @@ class _CommunityDynamic extends State<CommunityDynamic> {
Text(
widget?.article?.authorName ?? "",
style: TextStyle(
fontSize: MediaQuery.of(context).size.width >= 650 ? 12.sp :15.sp,
fontSize:
MediaQuery.of(context).size.width >= 650
? 12.sp
: 15.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
),
@ -236,7 +256,10 @@ class _CommunityDynamic extends State<CommunityDynamic> {
Text(
widget?.article?.createTime ?? "",
style: TextStyle(
fontSize: MediaQuery.of(context).size.width >= 650 ? 10.sp :13.sp,
fontSize:
MediaQuery.of(context).size.width >= 650
? 10.sp
: 13.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
@ -301,52 +324,56 @@ class _CommunityDynamic extends State<CommunityDynamic> {
SizedBox(
height: 12.h,
),
widget.isList ? Text(
widget?.article?.mainTitle ?? "",
maxLines:5,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontWeight: MyFontWeight.regular,
fontSize: 15.sp,
),
) :Text(
widget?.article?.mainTitle ?? "",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontWeight: MyFontWeight.regular,
fontSize: 15.sp,
),
),
widget.isList
? Text(
widget?.article?.mainTitle ?? "",
maxLines: 5,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontWeight: MyFontWeight.regular,
fontSize: 15.sp,
),
)
: Text(
widget?.article?.mainTitle ?? "",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontWeight: MyFontWeight.regular,
fontSize: 15.sp,
),
),
buildMedia(widget?.article?.content),
SizedBox(
height:8.h,
height: 8.h,
),
if (widget.article.location != "")
Padding(padding:EdgeInsets.only(bottom:7),
child: 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),
),
)),
],
),),
Padding(
padding: EdgeInsets.only(bottom: 7),
child: 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,
@ -355,111 +382,125 @@ class _CommunityDynamic extends State<CommunityDynamic> {
Container(
// padding: EdgeInsets.only(bottom: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child:Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/liulanliang.svg",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
(widget.article != null)
? "${widget.article.viewers}"
: "",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
)),
),
Expanded(
child:Container(
padding: EdgeInsets.only(bottom: 16.h),
child:Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/pinglun.svg",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
"${widget.article.comments ?? 0}",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
))),
Expanded(
child:Container(
padding: EdgeInsets.only(bottom: 16.h),
child:Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/xihuan.svg",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
"${widget.article.likes ?? 0}",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
)),
),
if (widget?.article?.author != widget.userId ?? "")
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
choiceShowBottomSheet();
});
},
child: Container(
padding: EdgeInsets.only(top:3.h,bottom: 16.h),
alignment: Alignment.center,
// color: Colors.red,
child: Icon(
Icons.more_horiz,
color: Colors.black,
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
children: [
SvgPicture.asset(
"assets/svg/liulanliang.svg",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
(widget.article != null)
? "${widget.article.viewers}"
: "",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
)),
),
Expanded(
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
children: [
SvgPicture.asset(
"assets/svg/pinglun.svg",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
"${widget.article.comments ?? 0}",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
))),
],
),),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
widget.article.liked =
!(widget.article.liked ?? false);
_queryInformationLikes(
widget.article.liked ?? false);
});
},
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
children: [
(widget.article.liked ?? false)
? Image.asset(
"assets/image/icon_like.webp",
width: 16,
height: 16,
)
: Image.asset(
"assets/image/icon_like_h.webp",
width: 16,
height: 16,
),
SizedBox(
width: 5.w,
),
Text(
"${widget.article.likes ?? 0}",
style: TextStyle(
fontSize: 14.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFF1A1A1A),
),
),
],
)),
)
),
if ((widget?.article?.author != widget.userId ?? "") &&
widget.commentType == 0)
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
choiceShowBottomSheet();
});
},
child: Container(
padding:
EdgeInsets.only(top: 3.h, bottom: 16.h),
alignment: Alignment.center,
// color: Colors.red,
child: Icon(
Icons.more_horiz,
color: Colors.black,
),
))),
],
),
),
],
),
),
@ -794,14 +835,11 @@ class _CommunityDynamic extends State<CommunityDynamic> {
topLeft: const Radius.circular(25.0),
topRight: const Radius.circular(25.0))),
child: Container(
width: 130.w,
height: 130.h,
child: Column(
children: [
SizedBox(
height: 10.h,
),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
Navigator.of(context).pop();
@ -809,6 +847,9 @@ class _CommunityDynamic extends State<CommunityDynamic> {
});
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10.h),
padding: EdgeInsets.symmetric(vertical: 5.h),
child: Row(
children: [
SizedBox(
@ -841,37 +882,42 @@ class _CommunityDynamic extends State<CommunityDynamic> {
color: Color(0xFFF7F7F7),
),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
Navigator.of(context)
.popAndPushNamed('/router/report_page',arguments: {
"userName":widget?.article?.authorName ?? "",
"authorId":widget?.article?.author ?? "",
.popAndPushNamed('/router/report_page', arguments: {
"userName": widget?.article?.authorName ?? "",
"authorId": widget?.article?.author ?? "",
});
});
},
child: Row(
children: [
SizedBox(
width: 4.w,
),
SvgPicture.asset(
"assets/svg/ju_b.svg",
width: 20,
height: 20,
),
SizedBox(
width: 15.w,
),
Text(
S.of(context).jubaogaineirong,
style: TextStyle(
fontSize: 17.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF1A1A1A),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 5.h),
child: Row(
children: [
SizedBox(
width: 4.w,
),
),
],
SvgPicture.asset(
"assets/svg/ju_b.svg",
width: 20,
height: 20,
),
SizedBox(
width: 15.w,
),
Text(
S.of(context).jubaogaineirong,
style: TextStyle(
fontSize: 17.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF1A1A1A),
),
),
],
),
))
],
),

72
lib/community/photo_view_gallery_screen.dart

@ -42,41 +42,47 @@ class _PhotoViewGalleryScreenState extends State<PhotoViewGalleryScreen> {
left: 0,
bottom: 0,
right: 0,
child: Container(
child: PhotoViewGallery.builder(
scrollPhysics: const BouncingScrollPhysics(),
builder: (BuildContext context, int index) {
return PhotoViewGalleryPageOptions(
imageProvider: NetworkToFileImage(
url: widget.images[index],
file: fileFromDocsDir(widget.images[index].toString()
.replaceAll("https://pos.upload.gznl.top/", "").replaceAll("/", "")),
debug: true,
),
);
},
itemCount: widget.images.length,
loadingBuilder: (context, progress) => Center(
child: Container(
width: 20.0,
height: 20.0,
child: CircularProgressIndicator(
value: progress == null
? null
: progress.cumulativeBytesLoaded /
progress.expectedTotalBytes,
child: GestureDetector(
onTap: (){
Navigator.of(context).pop();
},
child: Container(
color: Colors.black,
child: PhotoViewGallery.builder(
scrollPhysics: const BouncingScrollPhysics(),
builder: (BuildContext context, int index) {
return PhotoViewGalleryPageOptions(
imageProvider: NetworkToFileImage(
url: widget.images[index],
file: fileFromDocsDir(widget.images[index].toString()
.replaceAll("https://pos.upload.gznl.top/", "").replaceAll("/", "")),
debug: true,
),
);
},
itemCount: widget.images.length,
loadingBuilder: (context, progress) => Center(
child: Container(
width: 20.0,
height: 20.0,
child: CircularProgressIndicator(
value: progress == null
? null
: progress.cumulativeBytesLoaded /
progress.expectedTotalBytes,
),
),
),
),
backgroundDecoration: null,
pageController: widget.controller,
enableRotation: false,
onPageChanged: (index){
setState(() {
currentIndex=index;
});
},
)
backgroundDecoration: null,
pageController: widget.controller,
enableRotation: false,
onPageChanged: (index){
setState(() {
currentIndex=index;
});
},
)
),
),
),
Positioned(//index显示

6
lib/generated/intl/messages_en.dart

@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"),
"huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"),
@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"),
"huozan" : MessageLookupByLibrary.simpleMessage("获赞"),
"input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"),
@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"),
"lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"),
@ -565,6 +568,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
"shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"),
@ -607,6 +611,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
"wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@ -676,6 +681,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),

10
lib/generated/intl/messages_en_US.dart

@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("For:Any store dedicated to returning home"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("Homecoming Headlines"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("Home Return VIP Card Exclusive Rights"),
"huixiangxieyi" : MessageLookupByLibrary.simpleMessage("Homecoming VIP Membership Card Rules Agreement"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("Membership Level"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("Member Level Description"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("Member Rules Description"),
@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("Activity information"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("The goods have been delivered"),
"huozan" : MessageLookupByLibrary.simpleMessage("liked"),
"input_code" : MessageLookupByLibrary.simpleMessage("Mobile phone verification code"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("Please enter the verification code"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("Fill in the invitation code"),
@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("Open now"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("Get it now"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("Sign in immediately"),
"lijishiyong" : MessageLookupByLibrary.simpleMessage("Use Now"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("Experience Now"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("Open now"),
"likexufei" : MessageLookupByLibrary.simpleMessage("Renew now"),
@ -565,6 +568,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("Use Date"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("Instructions for Use"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("Use Conditions"),
"shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("Use Details"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("Ship To Address"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("Please enter the detailed receiving address"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("Delivery address"),
@ -607,6 +611,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("finish"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("Place an order once"),
"wangjimima" : MessageLookupByLibrary.simpleMessage("Forgot password"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("Play healthy"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("Automatically generated after improving birthday information"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("Exclusive coupon for improving birthday information"),
@ -676,6 +681,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("Modify User Name"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"),
"xuanji" : MessageLookupByLibrary.simpleMessage("Selection"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("Renewal member"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("Learning Health"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("Renewal Home VIP"),
@ -751,8 +757,8 @@ class MessageLookup extends MessageLookupByLibrary {
"zaituzhong" : MessageLookupByLibrary.simpleMessage("In transit"),
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("Online Customer Service"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("Online ordering is not supported temporarily"),
"zanweijiesuo" : MessageLookupByLibrary.simpleMessage("Not yet unlocked"),
"zanweikaifang" : MessageLookupByLibrary.simpleMessage("Not yet open"),
"zanweijiesuo" : MessageLookupByLibrary.simpleMessage("Not unlocked"),
"zanweikaifang" : MessageLookupByLibrary.simpleMessage("Not open"),
"zanweikaitong" : MessageLookupByLibrary.simpleMessage("Not yet open"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("No comment, please comment"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("Temporary wireless shopping"),

6
lib/generated/intl/messages_zh_CN.dart

@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"),
"huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"),
@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"),
"huozan" : MessageLookupByLibrary.simpleMessage("获赞"),
"input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"),
@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"),
"lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"),
@ -565,6 +568,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
"shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"),
@ -607,6 +611,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
"wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@ -676,6 +681,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),

6
lib/generated/intl/messages_zh_Hans_CN.dart

@ -293,6 +293,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回乡VIP卡专享权益"),
"huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回乡VIP会员卡规则协议"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("会员规则说明"),
@ -317,6 +318,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活动资讯"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("货品已送达"),
"huozan" : MessageLookupByLibrary.simpleMessage("获赞"),
"input_code" : MessageLookupByLibrary.simpleMessage("手机验证码"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填写邀请码"),
@ -389,6 +391,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即开通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即领取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即签到"),
"lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即体验"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻开通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻续费"),
@ -565,6 +568,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
"shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用详情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收货地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("请输入详细收货地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收货地址"),
@ -607,6 +611,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下单"),
"wangjimima" : MessageLookupByLibrary.simpleMessage("忘记密码"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日信息后自动生成"),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"),
@ -676,6 +681,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用户名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),

8
lib/generated/intl/messages_zh_Hant_CN.dart

@ -289,6 +289,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"),
"huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("會員規則説明"),
@ -313,6 +314,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活動資訊"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"),
"huozan" : MessageLookupByLibrary.simpleMessage("獲贊"),
"input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"),
@ -385,6 +387,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即開通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即領取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"),
"lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即體驗"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻開通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻續費"),
@ -560,6 +563,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
"shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用詳情"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收貨地址"),
"shouhuorenshoujihao" : MessageLookupByLibrary.simpleMessage("請輸入收貨人手機號"),
@ -601,6 +605,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下單"),
"wangjimima" : MessageLookupByLibrary.simpleMessage("忘記密碼"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "),
@ -670,6 +675,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"),
@ -746,7 +752,7 @@ class MessageLookup extends MessageLookupByLibrary {
"zaixiankefu" : MessageLookupByLibrary.simpleMessage("在線客服"),
"zanbuzhichixianshangdiancan" : MessageLookupByLibrary.simpleMessage("暫不支持線上點餐"),
"zanweijiesuo" : MessageLookupByLibrary.simpleMessage("暫未解鎖"),
"zanweikaifang" : MessageLookupByLibrary.simpleMessage("暂未开"),
"zanweikaifang" : MessageLookupByLibrary.simpleMessage("暫未開"),
"zanweikaitong" : MessageLookupByLibrary.simpleMessage("暫未開通"),
"zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"),
"zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"),

6
lib/generated/intl/messages_zh_TW.dart

@ -291,6 +291,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangrenyimendian" : MessageLookupByLibrary.simpleMessage("适用于:一心回乡任意门店"),
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huixiangvipkazhuanxiang" : MessageLookupByLibrary.simpleMessage("回鄉VIP卡專享權益"),
"huixiangxieyi" : MessageLookupByLibrary.simpleMessage("回鄉VIP會員卡規則協定"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanguize" : MessageLookupByLibrary.simpleMessage("會員規則説明"),
@ -315,6 +316,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huodongyue_" : m11,
"huodongzixun" : MessageLookupByLibrary.simpleMessage("活動資訊"),
"huopinyisongda" : MessageLookupByLibrary.simpleMessage("貨品已送達"),
"huozan" : MessageLookupByLibrary.simpleMessage("獲贊"),
"input_code" : MessageLookupByLibrary.simpleMessage("手機驗證碼"),
"input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"),
"input_invite_code_hide" : MessageLookupByLibrary.simpleMessage("填寫邀請碼"),
@ -387,6 +389,7 @@ class MessageLookup extends MessageLookupByLibrary {
"lijikaitong" : MessageLookupByLibrary.simpleMessage("立即開通"),
"lijilingqu" : MessageLookupByLibrary.simpleMessage("立即領取"),
"lijiqiandao" : MessageLookupByLibrary.simpleMessage("立即簽到"),
"lijishiyong" : MessageLookupByLibrary.simpleMessage("立即使用"),
"lijitiyan" : MessageLookupByLibrary.simpleMessage("立即體驗"),
"likekaitong" : MessageLookupByLibrary.simpleMessage("立刻開通"),
"likexufei" : MessageLookupByLibrary.simpleMessage("立刻續費"),
@ -562,6 +565,7 @@ class MessageLookup extends MessageLookupByLibrary {
"shiyongriqi" : MessageLookupByLibrary.simpleMessage("使用日期"),
"shiyongshuoming" : MessageLookupByLibrary.simpleMessage("使用说明"),
"shiyongtiaojian" : MessageLookupByLibrary.simpleMessage("使用条件"),
"shiyongxiangqing" : MessageLookupByLibrary.simpleMessage("使用詳情"),
"shouhuodi" : MessageLookupByLibrary.simpleMessage("收貨地址"),
"shouhuodizhi" : MessageLookupByLibrary.simpleMessage("請輸入詳細收貨地址"),
"shouhuodizhi1" : MessageLookupByLibrary.simpleMessage("收貨地址"),
@ -604,6 +608,7 @@ class MessageLookup extends MessageLookupByLibrary {
"wancheng" : MessageLookupByLibrary.simpleMessage("完成"),
"wancheng_" : m32,
"wanchengyicixiadan" : MessageLookupByLibrary.simpleMessage("完成一次下單"),
"wangjimima" : MessageLookupByLibrary.simpleMessage("忘記密碼"),
"wanjiankang" : MessageLookupByLibrary.simpleMessage("玩健康"),
"wanshanshengrixinxi_nl" : MessageLookupByLibrary.simpleMessage("完善生日資訊後自動生成 "),
"wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "),
@ -673,6 +678,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xiugaiyonghuming" : MessageLookupByLibrary.simpleMessage("修改用戶名"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"),

60
lib/generated/l10n.dart

@ -6875,6 +6875,66 @@ class S {
);
}
/// `VIP会员卡规则协议`
String get huixiangxieyi {
return Intl.message(
'回乡VIP会员卡规则协议',
name: 'huixiangxieyi',
desc: '',
args: [],
);
}
/// ``
String get huozan {
return Intl.message(
'获赞',
name: 'huozan',
desc: '',
args: [],
);
}
/// `使`
String get shiyongxiangqing {
return Intl.message(
'使用详情',
name: 'shiyongxiangqing',
desc: '',
args: [],
);
}
/// `使`
String get lijishiyong {
return Intl.message(
'立即使用',
name: 'lijishiyong',
desc: '',
args: [],
);
}
/// ``
String get wangjimima {
return Intl.message(
'忘记密码',
name: 'wangjimima',
desc: '',
args: [],
);
}
/// ``
String get xuanzeshangpinlingqufangshi {
return Intl.message(
'请选择商品的领取方式',
name: 'xuanzeshangpinlingqufangshi',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

163
lib/home/home_page.dart

@ -163,8 +163,6 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final BaseData brand =
await apiService.queryHomeBrand().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
refreshController.refreshFailed();
});
if (brand != null && brand.isSuccess) {
@ -289,7 +287,9 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
queryUserBalance() async {
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {});
await apiService.queryInfo().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
mRaiseMoney = double.tryParse(userInfo.raiseMoney);
@ -503,83 +503,87 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
},
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: Column(
children: [
///banner
HomeBanner(bannerData, controller),
///
UnionEntry((int jpIndex) {
widget.changeTab(1,jpIndex);
child: FutureBuilder(
future:queryHome(),
builder: (context, snapshot) {
return Column(
children: [
///banner
HomeBanner(bannerData, controller),
///
UnionEntry((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///
ShortcutOperation((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///广
spread(),
// ///
// SignView(isSigned, (value) {
// setState(() {
// isSigned = value;
// });
// }),
///
DiscountZone(coupons),
///-
HomeRecommendGoods(homeRank),
///
if(mRaiseMoney != 0.0)
HappyHelpFarmers(),
///
WelfareCore(),
///
TopSellingList(homeRank),
// ///
// QuickOrder(),
// ///
// CouponView(),
// ///
// FeaturedActivity(),
// ///
// HomeIntegralStore(gooods),
///Tab
PointsGoodsTitle(
gooodsCategorys,
(orderType, orderDesc) {
this.orderType = orderType;
this.orderDesc = orderDesc;
setState(() {});
},
(index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
setState(() {});
},
),
///
PointGoods(
goods,
(index) {
_toDetails(index);
},
),
],
);
}),
///
ShortcutOperation((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///广
spread(),
// ///
// SignView(isSigned, (value) {
// setState(() {
// isSigned = value;
// });
// }),
///
DiscountZone(coupons),
///-
HomeRecommendGoods(homeRank),
///
if(mRaiseMoney != 0)
HappyHelpFarmers(),
///
WelfareCore(),
///
TopSellingList(homeRank),
// ///
// QuickOrder(),
// ///
// CouponView(),
// ///
// FeaturedActivity(),
// ///
// HomeIntegralStore(gooods),
///Tab
PointsGoodsTitle(
gooodsCategorys,
(orderType, orderDesc) {
this.orderType = orderType;
this.orderDesc = orderDesc;
setState(() {});
},
(index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
setState(() {});
},
),
///
PointGoods(
goods,
(index) {
_toDetails(index);
},
),
],
),
),
),
),
@ -599,7 +603,6 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/invite_friends');
// Navigator.of(context).pushNamed('/router/mine_greenery');
},
child: ClipRRect(
child:Image.asset(

86
lib/home/welfare_exchange.dart

@ -28,7 +28,8 @@ class WelfareExchange extends StatefulWidget {
}
}
class _WelfareExchange extends State<WelfareExchange> with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin{
class _WelfareExchange extends State<WelfareExchange>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
ApiService apiService;
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
@ -195,28 +196,28 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
),
),
flexibleSpace: FlexibleSpaceBar(
background:Stack(
children: [
Container(
// padding: EdgeInsets.only(top: 40.h),
height: 172.h,
decoration: BoxDecoration(
// border: Border.all(color: Colors.white,width: 0.5),
color: Color(0xFF277D4B),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(40.r),
bottomLeft: Radius.circular(40.r),
),
),
),
Container(
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 110.h),
child: pointUser(),
background: Stack(
children: [
Container(
// padding: EdgeInsets.only(top: 40.h),
height: 172.h,
decoration: BoxDecoration(
// border: Border.all(color: Colors.white,width: 0.5),
color: Color(0xFF277D4B),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(40.r),
bottomLeft: Radius.circular(40.r),
),
],
)),
),
),
Container(
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 110.h),
child: pointUser(),
),
],
)),
expandedHeight: 258.h,
bottom: PreferredSize(
preferredSize: Size(double.infinity, 0),
@ -408,27 +409,28 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
SizedBox(
height: 4.h,
),
Expanded(child: Row(
children: [
Text(
(userInfo != null) ? "${userInfo.points}" : "",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFF32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
width: 6.w,
Expanded(
child: Row(
children: [
Text(
(userInfo != null) ? "${userInfo.points}" : "",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFF32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium,
),
Image.asset(
"assets/image/icon_gold_coin.webp",
width: 18,
height: 18,
)
],
))
),
SizedBox(
width: 6.w,
),
Image.asset(
"assets/image/icon_gold_coin.webp",
width: 18,
height: 18,
)
],
))
],
),
)

9
lib/l10n/intl_en.arb

@ -713,6 +713,15 @@
"canyingfuwu":"餐饮服务",
"qiyetuanjian":"企业团建",
"zhunongjifen":"助农积分",
"huixiangxieyi":"回乡VIP会员卡规则协议",
"zanweikaifang":"暂未开放",
"zanweijiesuo":"暂未解锁",
"huozan":"获赞",
"shiyongxiangqing":"使用详情",
"lijishiyong":"立即使用",
"wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式",

8
lib/l10n/intl_en_US.arb

@ -714,6 +714,14 @@
"canyingfuwu":"catering service",
"qiyetuanjian":"Enterprise League Building",
"zhunongjifen":"Farming aid points",
"huixiangxieyi":"Homecoming VIP Membership Card Rules Agreement",
"zanweikaifang":"Not open",
"zanweijiesuo":"Not unlocked",
"huozan":"liked",
"shiyongxiangqing":"Use Details",
"lijishiyong":"Use Now",
"wangjimima":"Forgot password",
"xuanzeshangpinlingqufangshi":"Please select the picking method of goods",

8
lib/l10n/intl_zh_CN.arb

@ -714,6 +714,14 @@
"canyingfuwu":"餐饮服务",
"qiyetuanjian":"企业团建",
"zhunongjifen":"助农积分",
"huixiangxieyi":"回乡VIP会员卡规则协议",
"zanweikaifang":"暂未开放",
"zanweijiesuo":"暂未解锁",
"huozan":"获赞",
"shiyongxiangqing":"使用详情",
"lijishiyong":"立即使用",
"wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式",

8
lib/l10n/intl_zh_Hans_CN.arb

@ -714,6 +714,14 @@
"canyingfuwu":"餐饮服务",
"qiyetuanjian":"企业团建",
"zhunongjifen":"助农积分",
"huixiangxieyi":"回乡VIP会员卡规则协议",
"zanweikaifang":"暂未开放",
"zanweijiesuo":"暂未解锁",
"huozan":"获赞",
"shiyongxiangqing":"使用详情",
"lijishiyong":"立即使用",
"wangjimima":"忘记密码",
"xuanzeshangpinlingqufangshi":"请选择商品的领取方式",

8
lib/l10n/intl_zh_Hant_CN.arb

@ -705,6 +705,14 @@
"canyingfuwu":"餐飲服務",
"qiyetuanjian":"企業團建",
"zhunongjifen":"助農積分",
"huixiangxieyi":"回鄉VIP會員卡規則協定",
"zanweikaifang":"暫未開放",
"zanweijiesuo":"暫未解鎖",
"huozan":"獲贊",
"shiyongxiangqing":"使用詳情",
"lijishiyong":"立即使用",
"wangjimima":"忘記密碼",
"xuanzeshangpinlingqufangshi":"請選擇商品的領取方式",

8
lib/l10n/intl_zh_TW.arb

@ -707,6 +707,14 @@
"canyingfuwu":"餐飲服務",
"qiyetuanjian":"企業團建",
"zhunongjifen":"助農積分",
"huixiangxieyi":"回鄉VIP會員卡規則協定",
"zanweikaifang":"暫未開放",
"zanweijiesuo":"暫未解鎖",
"huozan":"獲贊",
"shiyongxiangqing":"使用詳情",
"lijishiyong":"立即使用",
"wangjimima":"忘記密碼",
"xuanzeshangpinlingqufangshi":"請選擇商品的領取方式",

59
lib/login/new_login_page.dart

@ -123,7 +123,7 @@ class _NewLoginPage extends State<NewLoginPage> {
}
if (_sendCodeStatus == 0) {
apiService
.sendVerify(area,mobile)
.sendVerify(area, mobile)
.then((value) => {
if (value.isSuccess)
{_sendCodeStatus = 1, countdown()}
@ -207,7 +207,12 @@ class _NewLoginPage extends State<NewLoginPage> {
return;
}
var invite = _controllerInviteCode.text;
var param = {"capcha": code, "mobile": mobile, "invite": invite,"areaCode":area};
var param = {
"capcha": code,
"mobile": mobile,
"invite": invite,
"areaCode": area
};
EasyLoading.show(status: S.of(context).zhengzaijiazai);
BaseData value = await apiService.memberLogin(param).catchError((error) {
print(error.message);
@ -217,7 +222,8 @@ class _NewLoginPage extends State<NewLoginPage> {
// EasyLoading.show(status: S.of(context).zhengzaijiazai);
if (value != null && value.isSuccess) {
var userInfo = LoginInfo.fromJson(value.data);
ExamineInstance.instance.isExamine = userInfo.authInfo.account == "13800138000";
ExamineInstance.instance.isExamine =
userInfo.authInfo.account == "13800138000";
saveUserJson(userInfo.authInfo.toJson());
eventBus.fire(EventType(3));
@ -257,7 +263,8 @@ class _NewLoginPage extends State<NewLoginPage> {
if (sharedPreferences.containsKey('token') &&
sharedPreferences.getString("token") != null &&
sharedPreferences.getString("token") != "") {
ExamineInstance.instance.isExamine = sharedPreferences.getString("mobile") == "13800138000";
ExamineInstance.instance.isExamine =
sharedPreferences.getString("mobile") == "13800138000";
Navigator.of(context).popAndPushNamed('/router/main_page');
} else {
initController();
@ -383,22 +390,24 @@ class _NewLoginPage extends State<NewLoginPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/phone_address_page').then((value) {
if(value != null)
setState(() {
area = value;
onTap: () {
Navigator.of(context)
.pushNamed('/router/phone_address_page')
.then((value) {
if (value != null)
setState(() {
area = value;
});
});
});
},
child: Text(
area,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 16.sp,
color: Color(0xFF1A1A1A),
),
)),
},
child: Text(
area,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 16.sp,
color: Color(0xFF1A1A1A),
),
)),
Icon(
Icons.keyboard_arrow_right,
size: 18,
@ -454,7 +463,9 @@ class _NewLoginPage extends State<NewLoginPage> {
height: 1.h,
width: MediaQuery.of(context).size.width - 80.h,
// color: statusPhoneLineColor,
color: _controllerPhone.text== "" ? Color(0xFFE7E3E3):Color(0xFF32A060),
color: _controllerPhone.text == ""
? Color(0xFFE7E3E3)
: Color(0xFF32A060),
),
SizedBox(
height: 30.h,
@ -680,8 +691,8 @@ class _NewLoginPage extends State<NewLoginPage> {
// Navigator.of(context).pop();
// } else {
ExamineInstance.instance.isExamine = true;
Navigator.of(context)
.popAndPushNamed('/router/main_page');
Navigator.of(context)
.popAndPushNamed('/router/main_page');
// }
},
child: Container(
@ -732,7 +743,7 @@ class _NewLoginPage extends State<NewLoginPage> {
showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
return WillPopScope(
onWillPop: () async => false,
child: SimpleDialog(
titlePadding: EdgeInsets.all(10),
@ -855,7 +866,7 @@ class _NewLoginPage extends State<NewLoginPage> {
});
SharesdkPlugin.uploadPrivacyPermissionStatus(
1,
(success) => {
(success) => {
Navigator.of(context).pop(),
},
);

2
lib/main_page.dart

@ -204,7 +204,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
myLocPlugin.authAK("ylW2QPlsbERkho7jOgU4GQSeawmdUIoR");
BMFMapSDK.setApiKeyAndCoordType(
'ylW2QPlsbERkho7jOgU4GQSeawmdUIoR',
BMF_COORD_TYPE.COMMON,
BMF_COORD_TYPE.BD09LL,
);
} else if (Platform.isAndroid) {
BMFMapSDK.setCoordType(BMF_COORD_TYPE.BD09LL);

111
lib/mine/mine_page.dart

@ -31,8 +31,8 @@ import 'mine_view/mine_item.dart';
import 'mine_view/mine_view.dart';
class MinePage extends StatefulWidget {
MinePage(Key key) : super(key: key);
MinePage(Key key): super(key: key);
@override
State<StatefulWidget> createState() {
return MinePageState();
@ -50,13 +50,16 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
_toUserInfo() async {
SharedPreferences shared = await SharedPreferences.getInstance();
if (shared.getString("token") == null || shared.getString("token") == "") {
Navigator.of(context)
.pushReplacementNamed('/router/new_login_page', arguments: {"login": "login"});
Navigator.of(context).pushReplacementNamed('/router/new_login_page',
arguments: {"login": "login"});
return;
}
(Platform.isAndroid&&ExamineInstance.instance.isExamine)?
await Navigator.of(context).pushNamed('/router/user_info_page'):
await Navigator.of(context).pushNamed('/router/personal_page',arguments:{"memberId":"0",});
(Platform.isAndroid && ExamineInstance.instance.isExamine)
? await Navigator.of(context).pushNamed('/router/user_info_page')
: await Navigator.of(context)
.pushNamed('/router/personal_page', arguments: {
"memberId": "0",
});
setState(() {});
}
@ -101,8 +104,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
BaseData<List<Rank>> rankData =
await apiService.rankList().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
_refreshController.refreshFailed();
});
if (rankData != null && rankData.isSuccess) {
@ -165,7 +168,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
token: value.getString("token"),
);
}
BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {});
BaseData<List<MsgStats>> baseData =
await apiService.stats().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
totalMsg = 0;
@ -203,48 +207,38 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
children: [
Container(
height: 502.h,
decoration: BoxDecoration(
// color: Color(0xFF32A060)
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage("assets/image/settlement_bg.webp"),
decoration: BoxDecoration(
// color: Color(0xFF32A060)
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
),
),
FutureBuilder(
future: queryUserInfo(),
builder: (context, snapshot) {
return Column(
children: [
///
MineView(
userInfo,
() {
_toUserInfo();
},
() {
toIntegralPage();
},
(){
setState(() {
totalMsg =0;
});
},
totalMsg,
infoNumber
),
MineView(userInfo, () {
_toUserInfo();
}, () {
toIntegralPage();
}, () {
setState(() {
totalMsg = 0;
});
}, totalMsg, infoNumber),
/// VIP等级信息
MineVipEntry(
tag: "vip",
ranks: ranks,
userInfo: userInfo,
rank: double.tryParse(
userInfo?.expendAmount ?? "0")
rank: double.tryParse(userInfo?.expendAmount ?? "0")
.toInt(),
rankMax:
userInfo?.memberRankVo?.nextOrigin ?? 0,
rankMax: userInfo?.memberRankVo?.nextOrigin ?? 0,
createTime: userInfo?.createTime ?? "",
),
@ -286,15 +280,16 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
Widget attainment() {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
onTap: () {
Navigator.of(context).pushNamed(
'/router/mine_attainment_page',
arguments: {"userInfo": userInfo},
);
},
child:Container(
margin: EdgeInsets.only(left:16.w,right:16.w,bottom:15.h),
padding: EdgeInsets.only(left:12.w, top:12.h, right:10.w,bottom: 17.h),
child: Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 15.h),
padding:
EdgeInsets.only(left: 12.w, top: 12.h, right: 10.w, bottom: 17.h),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
@ -320,34 +315,38 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
color: Color(0xFF0D0D0D),
),
),
SizedBox(height: 9.h,),
SizedBox(
height: 9.h,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset(
"assets/image/icon_attainment.webp",
width:54,
height:54,
width: 54,
height: 54,
fit: BoxFit.cover,
),
SizedBox(width: 7.w,),
Expanded(child:
Column(
SizedBox(
width: 7.w,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"已解锁${infoNumber != null
? infoNumber.achievementNumber.toString()
: "0"}",
"已解锁${infoNumber != null ? infoNumber.achievementNumber.toString() : "0"}个成就",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF262626),
),
),
SizedBox(height:4.w,),
SizedBox(
height: 4.w,
),
Text(
"完成任务解锁更多成就",
style: TextStyle(
@ -390,17 +389,17 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
///广
Widget spreadImage() {
return Container(
margin: EdgeInsets.only(right:14.w,bottom:15.h,left: 14.w),
margin: EdgeInsets.only(right: 14.w, bottom: 15.h, left: 14.w),
child: GestureDetector(
onTap: (){
onTap: () {
Navigator.of(context).pushNamed('/router/invite_friends');
},
child:ClipRRect(
child:Image.asset(
child: ClipRRect(
child: Image.asset(
"assets/image/welfare_spread.webp",
width:double.infinity,
width: double.infinity,
fit: BoxFit.fill,
height:80.h,
height: 80.h,
),
borderRadius: BorderRadius.circular(6.w),
),

2
lib/mine/mine_view/mine_view.dart

@ -300,7 +300,7 @@ class _MineView extends State<MineView> {
child: Text(
widget.userInfo == null
? S.of(context).denglu
: "${widget.userInfo.nickname??""}",
: "${widget.userInfo.nickname==""?"回乡":widget.userInfo.nickname}",
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,

100
lib/mine/personal_page.dart

@ -98,54 +98,52 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
///
queryCommunity(String searchKey) async {
if(!isRefresh){
if (!isRefresh) {
isRefresh = true;
return;
}
if(isLoadingData){
if (isLoadingData) {
return;
}
isLoadingData = true;
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
userId = value.getString('userId');
apiService = ApiService(
Dio(),
apiService = ApiService(Dio(),
context: context,
token: value.getString("token"),
showLoading: false
);
showLoading: false);
}
if(isLoadMore){
if (isLoadMore) {
pageNum += 1;
isLoadMore = false;
}
else if(searchKey == null)pageNum = 1;
} else if (searchKey == null) pageNum = 1;
BaseData<PageInfo<ComunityComment>> baseData = await apiService.trendList({
"mid": memberId == "0" ? userId : memberId,
"onlyFollow": false,
"onlyMe": true,
"pageNum": searchKey == null?pageNum:1,
"pageNum": searchKey == null ? pageNum : 1,
"pageSize": 10,
"searchKey": searchKey??""
"searchKey": searchKey ?? ""
}).catchError((error) {
if(searchKey == null) {
if (searchKey == null) {
refreshController.refreshFailed();
refreshController.loadFailed();
}
});
if(searchKey == null){
refreshController.refreshCompleted();
refreshController.loadComplete();
if (searchKey == null) {
refreshController.refreshCompleted();
refreshController.loadComplete();
}
if (baseData.isSuccess) {
if(searchKey != null){
if(baseData?.data?.list != null && baseData.data.list.isNotEmpty)
if (searchKey != null) {
if (baseData?.data?.list != null && baseData.data.list.isNotEmpty)
articles.forEach((element) {
if(element.id == searchKey){
if (element.id == searchKey) {
element.content = jsonEncode(baseData.data.list[0].subjectInfo);
element.mainTitle =baseData.data.list[0].subject;
element.mainTitle = baseData.data.list[0].subject;
element.followed = baseData.data.list[0].selfFollow;
element.liked = baseData.data.list[0].selfLike;
element.authorHeadImg = baseData.data.list[0].memberInfo?.avatar;
element.authorName = baseData.data.list[0].memberInfo?.nickname;
element.location = baseData.data.list[0].location;
@ -155,12 +153,10 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
element.likes = baseData.data.list[0]?.likes;
element.comments = baseData.data.list[0]?.comments;
this.isRefresh = false;
setState(() {
});
setState(() {});
}
});
}
else{
} else {
if (pageNum == 1) {
articles.clear();
}
@ -168,8 +164,9 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
var article = Article();
article.id = element.id;
article.content = jsonEncode(element.subjectInfo);
article.mainTitle =element.subject;
article.mainTitle = element.subject;
article.followed = element.selfFollow;
article.liked = element.selfLike;
article.authorHeadImg = element.memberInfo?.avatar;
article.authorName = element.memberInfo?.nickname;
article.location = element.location;
@ -180,8 +177,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
article.comments = element?.comments;
articles.add(article);
});
setState(() {
});
setState(() {});
// comments.sort((a,b)=>b.createTime.compareTo(a.createTime));
// print("comments: ${comments.length}");
if (int.tryParse(baseData.data.total) < (pageNum * 10)) {
@ -350,7 +346,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 248,
height: 248.h,
color: Color(0xFFFFFFFF),
// color: Colors.red,
child: Stack(
@ -359,7 +355,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
Positioned(
top: 0,
left: 0,
bottom: 36,
bottom: 36.h,
right: 0,
child: Stack(
alignment: Alignment.bottomRight,
@ -402,7 +398,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
if (memberId == "0")
Positioned(
bottom: 9,
bottom: 9.h,
right: 16.w,
child: GestureDetector(
onTap: () {
@ -438,12 +434,14 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
Container(
color: Color(0xFFFFFFFF),
margin: EdgeInsets.only(bottom:30.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(left: 86, top: 12, right: 16),
margin:
EdgeInsets.only(left: 86.w, top: 12.h, right: 16.w),
child: GestureDetector(
onTap: () {
setState(() {
@ -470,7 +468,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
fontSize: 12.sp,
color: Color(0xFF868686),
fontWeight: MyFontWeight.regular,
height: 1.5),
height: 1.5.h),
)),
Icon(
(isShrink != null && !isShrink)
@ -483,7 +481,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
)),
Container(
margin: EdgeInsets.only(left: 16, right: 16),
margin: EdgeInsets.only(left: 16.w, right: 16.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
@ -508,7 +506,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
S.of(context).guanzhu,
@ -542,7 +540,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
S.of(context).fensi,
@ -575,7 +573,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
S.of(context).dongtai,
@ -608,10 +606,10 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
"获赞",
S.of(context).huozan,
style: TextStyle(
color: Color(0xFF353535),
fontSize: 12.sp,
@ -631,7 +629,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
color: Color(0xFFF7F7F7),
),
Padding(
padding: EdgeInsets.only(left: 16),
padding: EdgeInsets.only(left: 16.w),
child: Text(
memberId != "0" ? "TA的动态" : "我的动态",
style: TextStyle(
@ -640,7 +638,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
fontWeight: MyFontWeight.semi_bold,
),
)),
dynamicList()
dynamicList(),
],
),
),
@ -657,8 +655,8 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
right: 0,
child: Container(
padding: EdgeInsets.only(
left: 16,
right: 16,
left: 16.w,
right: 16.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
@ -691,7 +689,9 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
SizedBox(width: 10.w),
Text(
memberInfor?.nickname ?? "",
((memberInfor?.nickname ?? "") == "")
? "回乡"
: memberInfor?.nickname,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 16.sp,
@ -714,14 +714,14 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
});
},
child: Container(
height: 23,
padding:
EdgeInsets.only(left: 6, right: 6, bottom: 2, top: 2),
height: 23.h,
padding: EdgeInsets.only(
left: 6.w, right: 6.w, bottom: 2.h, top: 2.h),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(
width: 1,
width: 1.w,
color: Color(0xFF353535),
style: BorderStyle.solid,
),
@ -749,7 +749,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
isShowBtn: false,
text: "目前暂无发布动态,要把开心的事讲出来哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(left: 60.w, right: 60.w),
margin: EdgeInsets.only(left: 60.w, right: 60.w, bottom: 75.h),
)
: ListView.builder(
physics: NeverScrollableScrollPhysics(),
@ -760,9 +760,9 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
articles[position],
memberId == "0" ? 1 : 0,
exitFull: () {
// setState(() {
// _onRefresh();
// });
setState(() {
_onRefresh();
});
},
removalDynamic: () {
setState(() {

62
lib/mine/recharge_page.dart

@ -327,37 +327,37 @@ class _RechargePage extends State<RechargePage> {
),
),
SizedBox(height:10.h),
GestureDetector(
onTap: () {
setState(() {
checkIndex = 3;
});
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Image.asset(
"assets/image/icon_alipay.webp"),
Expanded(
flex: 1,
child: Padding(
padding: EdgeInsets.only(left: 8.w),
child: Text(
S.of(context).zhifubao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
),
),
),
),
checkView(3),
],
),
),
// GestureDetector(
// onTap: () {
// setState(() {
// checkIndex = 3;
// });
// },
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Image.asset(
// "assets/image/icon_alipay.webp"),
// Expanded(
// flex: 1,
// child: Padding(
// padding: EdgeInsets.only(left: 8.w),
// child: Text(
// S.of(context).zhifubao,
// style: TextStyle(
// fontSize: 14.sp,
// color: Color(0xff353535),
// ),
// ),
// ),
// ),
// checkView(3),
// ],
// ),
// ),
],
),
),

103
lib/mine/user_info_page.dart

@ -35,7 +35,7 @@ class _UserInfoPage extends State<UserInfoPage> {
"headimg": "",
"nickname": "",
"sex": "",
"signature":""
"signature": ""
};
@override
@ -52,7 +52,8 @@ class _UserInfoPage extends State<UserInfoPage> {
modifyInfo["sex"] = user.sex,
age = AppUtils.getAgeByString(user.birth),
refresh(),
apiService = ApiService(Dio(), context: context, token: value.getString('token')),
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
});
}
@ -89,7 +90,7 @@ class _UserInfoPage extends State<UserInfoPage> {
Widget userInfo() {
return Container(
margin: EdgeInsets.only(left:14.w,right: 14.w),
margin: EdgeInsets.only(left: 14.w, right: 14.w),
child: Column(
children: [
InkWell(
@ -97,7 +98,8 @@ class _UserInfoPage extends State<UserInfoPage> {
showImagePicker();
},
child: avatarItem(0, ""),
),Container(
),
Container(
margin: EdgeInsets.symmetric(vertical: 12.h),
width: double.infinity,
height: 1,
@ -120,8 +122,11 @@ class _UserInfoPage extends State<UserInfoPage> {
onTap: () {
editSignature();
},
child:avatarItem(2,
(modifyInfo["signature"]) == "" ? "还未编辑个性签名~" : modifyInfo["signature"]),
child: avatarItem(
2,
(modifyInfo["signature"]) == ""
? "还未编辑个性签名~"
: modifyInfo["signature"]),
),
Container(
margin: EdgeInsets.symmetric(vertical: 12.h),
@ -130,7 +135,7 @@ class _UserInfoPage extends State<UserInfoPage> {
color: Color(0xFFF2F2F2),
),
InkWell(
onTap:(modifyInfo["birth"] == "")?showDateSelector:(){},
onTap: (modifyInfo["birth"] == "") ? showDateSelector : () {},
child: avatarItem(
3,
(modifyInfo["birth"] != null && modifyInfo["birth"] != "")
@ -171,7 +176,8 @@ class _UserInfoPage extends State<UserInfoPage> {
}
editSignature() async {
dynamic signature = await Navigator.of(context).pushNamed('/router/edit_signature',
dynamic signature = await Navigator.of(context).pushNamed(
'/router/edit_signature',
arguments: {"signature": modifyInfo['signature']});
if (signature != null && signature != "") {
modifyInfo["signature"] = signature;
@ -196,7 +202,7 @@ class _UserInfoPage extends State<UserInfoPage> {
builder: (_) {
return CupertinoDatePickerWidget();
});
if (dateTime != null ) {
if (dateTime != null) {
modifyInfo["birth"] = DateFormat("yyyy-MM-dd").format(dateTime);
user.birth = modifyInfo["birth"];
age = AppUtils.getAge(dateTime);
@ -295,38 +301,38 @@ class _UserInfoPage extends State<UserInfoPage> {
}
// Future<File> cropImage(imagePath) async {
// File croppedFile = await ImageCropper.cropImage(
// sourcePath: imagePath,
// aspectRatioPresets: [
// CropAspectRatioPreset.square,
// // CropAspectRatioPreset.ratio3x2,
// // CropAspectRatioPreset.original,
// // CropAspectRatioPreset.ratio4x3,
// // CropAspectRatioPreset.ratio16x9
// ],
// aspectRatio: CropAspectRatio(ratioX: 1, ratioY: 1),
// androidUiSettings: AndroidUiSettings(
// toolbarTitle: 'Cropper',
// toolbarColor: Colors.black,
// toolbarWidgetColor: Colors.white,
// initAspectRatio: CropAspectRatioPreset.square,
// hideBottomControls: true,
// lockAspectRatio: false),
// iosUiSettings: IOSUiSettings(
// minimumAspectRatio: 1.0,
// resetAspectRatioEnabled: false,
// aspectRatioPickerButtonHidden: true,
// rectWidth: 500.w,
// rectHeight: 500.h,
// ));
// return croppedFile;
// File croppedFile = await ImageCropper.cropImage(
// sourcePath: imagePath,
// aspectRatioPresets: [
// CropAspectRatioPreset.square,
// // CropAspectRatioPreset.ratio3x2,
// // CropAspectRatioPreset.original,
// // CropAspectRatioPreset.ratio4x3,
// // CropAspectRatioPreset.ratio16x9
// ],
// aspectRatio: CropAspectRatio(ratioX: 1, ratioY: 1),
// androidUiSettings: AndroidUiSettings(
// toolbarTitle: 'Cropper',
// toolbarColor: Colors.black,
// toolbarWidgetColor: Colors.white,
// initAspectRatio: CropAspectRatioPreset.square,
// hideBottomControls: true,
// lockAspectRatio: false),
// iosUiSettings: IOSUiSettings(
// minimumAspectRatio: 1.0,
// resetAspectRatioEnabled: false,
// aspectRatioPickerButtonHidden: true,
// rectWidth: 500.w,
// rectHeight: 500.h,
// ));
// return croppedFile;
// }
///
modifyInfos() async {
var info = await apiService.editInfo(modifyInfo).catchError((onError) {});
if (info.isSuccess) {
SharedPreferences.getInstance().then((value){
SharedPreferences.getInstance().then((value) {
value.setString('user', jsonEncode(modifyInfo));
});
setState(() {
@ -338,7 +344,9 @@ class _UserInfoPage extends State<UserInfoPage> {
///
fileUpload() async {
if (filePath != null && filePath != "" && await File(filePath).exists()) {
BaseData<UploadResult> baseData = await apiService.upload(File(filePath), 123123123,false).catchError((onError) {});
BaseData<UploadResult> baseData = await apiService
.upload(File(filePath), 123123123, false)
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
UploadResult uploadResult = baseData.data;
modifyInfo["headimg"] = uploadResult.url;
@ -347,8 +355,6 @@ class _UserInfoPage extends State<UserInfoPage> {
}
}
Widget avatarItem(type, value) {
print("object: $value");
return Container(
@ -366,7 +372,10 @@ class _UserInfoPage extends State<UserInfoPage> {
flex: 1,
),
buildValue(type, value),
if (type != 5 && type != 4 && type != 3 && (((modifyInfo["birth"] == "")) || type != 3))
if (type != 5 &&
type != 4 &&
type != 3 &&
(((modifyInfo["birth"] == "")) || type != 3))
valueEnd(),
],
),
@ -375,11 +384,10 @@ class _UserInfoPage extends State<UserInfoPage> {
Widget valueEnd() {
return Container(
child: Icon(
Icons.keyboard_arrow_right,
size: 20.sp,
)
);
child: Icon(
Icons.keyboard_arrow_right,
size: 20.sp,
));
}
Widget buildValue(type, value) {
@ -411,7 +419,7 @@ class _UserInfoPage extends State<UserInfoPage> {
return Text(
value,
maxLines: 1,
overflow:TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 13.sp,
@ -419,10 +427,11 @@ class _UserInfoPage extends State<UserInfoPage> {
),
);
} else {
return Expanded(child: Text(
return Expanded(
child: Text(
value,
maxLines: 1,
overflow:TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: MyFontWeight.regular,

8
lib/retrofit/data/settleOrderInfo.dart

@ -543,6 +543,7 @@ class MemberVo {
String money,
String activityMoney,
String greenMoney,
String raiseMoney,
String expendAmount,
dynamic organic,
String points,
@ -577,6 +578,7 @@ class MemberVo {
_money = money;
_activityMoney = activityMoney;
_greenMoney = greenMoney;
_raiseMoney = raiseMoney;
_expendAmount = expendAmount;
_organic = organic;
_points = points;
@ -614,6 +616,7 @@ class MemberVo {
_money = json['money'];
_activityMoney = json['activityMoney'];
_greenMoney = json['greenMoney'];
_raiseMoney = json['raiseMoney'];
_expendAmount = json['expendAmount'];
_organic = json['organic'];
_points = json['points'];
@ -649,6 +652,7 @@ class MemberVo {
String _money;
String _activityMoney;
String _greenMoney;
String _raiseMoney;
String _expendAmount;
dynamic _organic;
String _points;
@ -683,6 +687,7 @@ class MemberVo {
String money,
String activityMoney,
String greenMoney,
String raiseMoney,
String expendAmount,
dynamic organic,
String points,
@ -717,6 +722,7 @@ class MemberVo {
money: money ?? _money,
activityMoney: activityMoney ?? _activityMoney,
greenMoney: greenMoney ?? _greenMoney,
raiseMoney: raiseMoney ?? _raiseMoney,
expendAmount: expendAmount ?? _expendAmount,
organic: organic ?? _organic,
points: points ?? _points,
@ -752,6 +758,7 @@ class MemberVo {
String get money => _money;
String get activityMoney => _activityMoney;
String get greenMoney => _greenMoney;
String get raiseMoney => _raiseMoney;
String get expendAmount => _expendAmount;
dynamic get organic => _organic;
String get points => _points;
@ -789,6 +796,7 @@ class MemberVo {
map['money'] = _money;
map['activityMoney'] = _activityMoney;
map['greenMoney'] = _greenMoney;
map['raiseMoney'] = _raiseMoney;
map['expendAmount'] = _expendAmount;
map['organic'] = _organic;
map['points'] = _points;

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.129:8765/app/";///
const localBaseUrl = "http://192.168.10.78:8765/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

2
lib/retrofit/retrofit_api.dart

@ -64,7 +64,7 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
const localBaseUrl = "http://192.168.10.129:8766/app/";///
const localBaseUrl = "http://192.168.10.78:8766/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线

417
lib/settlement/settlement.dart

@ -120,8 +120,8 @@ class _Settlement extends State<Settlement> {
token: minToken,
tenant: tenant,
storeId: storeId,
showLoading: false
);
showLoading: false);
queryMemberInfo();
if (promotions != null && promotions != "" && tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
@ -189,73 +189,87 @@ class _Settlement extends State<Settlement> {
try {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"useVipPrice":useVipPriceSelect,
"buyNum": buyNum,
"payChannel":payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) {
this.promotion = element;
promotions = promotion?.name ?? "";
}
});
}
if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element;
coupons = couponListBean?.promotionName ?? "";
}
});
}
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if(!isRaiseChannel && settleOrderInfo.isRaise){
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
settleOrderInfo.isRaise ? 7 :payChannel,
tableId);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"useVipPrice": useVipPriceSelect,
"buyNum": buyNum,
"payChannel": payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) {
this.promotion = element;
promotions = promotion?.name ?? "";
}
});
}
if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element;
coupons = couponListBean?.promotionName ?? "";
}
});
}
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if (!isRaiseChannel && settleOrderInfo.isRaise) {
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
settleOrderInfo.isRaise ? 7 : payChannel,
tableId);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
}finally{
} finally {
setState(() {});
EasyLoading.dismiss();
}
}
///
queryMemberInfo() async {
BaseData baseData = await minService.memberInfo().catchError((error) {
debugPrint(error);
});
if (baseData != null && baseData.isSuccess) {
SharedPreferences.getInstance().then(
(value) => {
value.setString('minMember', jsonEncode(baseData.data)),
},
);
}
}
///
queryOrderDetails(id) async {
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
@ -298,76 +312,76 @@ class _Settlement extends State<Settlement> {
}
queryAddress(int selectedBtn) async {
setState(() {
this.selectedBtn = selectedBtn;
});
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
return;
}
BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {});
BMFCoordinate bmfCoordinate = BMFCoordinate(
double.tryParse(storeInfo.latitude),
double.tryParse(storeInfo.longitude),
);
if (baseDate != null && baseDate.isSuccess) {
setState(() {
this.selectedBtn = selectedBtn;
address = baseDate.data[0];
});
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
return;
}
BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {});
BMFCoordinate bmfCoordinate = BMFCoordinate(
double.tryParse(storeInfo.latitude),
double.tryParse(storeInfo.longitude),
);
if (baseDate != null && baseDate.isSuccess) {
setState(() {
address = baseDate.data[0];
});
for (int i = 1; i < baseDate.data.length; i++) {
Address address1 = baseDate.data[i];
for (int i = 1; i < baseDate.data.length; i++) {
Address address1 = baseDate.data[i];
BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address.longitude),
double.tryParse(address.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address1.longitude),
double.tryParse(address1.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address.longitude),
double.tryParse(address.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address1.longitude),
double.tryParse(address1.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1);
if (mi1 < mi) {
address = address1;
}
double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1);
if (mi1 < mi) {
address = address1;
}
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
}
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
}
}
///
@ -484,7 +498,9 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : (settleOrderInfo.isRaise ? 7:payChannel));
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00")
? payChannel = 0
: (settleOrderInfo.isRaise ? 7 : payChannel));
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0) ? promotion.id : "";
@ -737,8 +753,8 @@ class _Settlement extends State<Settlement> {
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake, memberCouponId,
orderId, promotionId) {
DistributionMode((addressId, isTake,
memberCouponId, orderId, promotionId) {
setState(() {
this.selectedBtn = 0;
});
@ -769,50 +785,58 @@ class _Settlement extends State<Settlement> {
// ),
///
if(settleOrderInfo != null || minOrderInfo != null)
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
(coupons != "" || promotions!="") ? false :useVipPriceSelect,
this.showVipTips
),
if (settleOrderInfo != null ||
minOrderInfo != null)
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
(coupons != "" || promotions != "")
? false
: useVipPriceSelect,
this.showVipTips),
/////
if(settleOrderInfo != null || minOrderInfo != null)
ActivityCouponRemarks(
couponCart,
activityCart,
settleOrderInfo,
minOrderInfo,
coupons,
promotions,
couponCount(),
placeOrder,
remakers,
if (settleOrderInfo != null ||
minOrderInfo != null)
ActivityCouponRemarks(
couponCart,
activityCart,
settleOrderInfo,
minOrderInfo,
coupons,
promotions,
couponCount(),
placeOrder,
remakers,
() {
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
).then((value) => {
setState(() {
if (value != null) remakers = value;
})
});},
tableId,
vipPriceSelect,
(){
setState(() {
this.showVipTips = true;
});
}
),
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
).then((value) => {
setState(() {
if (value != null)
remakers = value;
})
});
},
tableId,
vipPriceSelect,
() {
setState(() {
this.showVipTips = true;
});
}),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo),
if (settleOrderInfo != null &&
placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck, coupons, promotions,
useVipPriceSelect, settleOrderInfo),
],
),
),
@ -882,10 +906,10 @@ class _Settlement extends State<Settlement> {
orderButton = true;
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
@ -906,23 +930,23 @@ class _Settlement extends State<Settlement> {
payChannelCheck(int payChannel) {
this.payChannel = payChannel;
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);}
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
}
}
vipPriceSelect(bool useVipPriceSelect) {
@ -942,7 +966,8 @@ class _Settlement extends State<Settlement> {
useVipPriceSelect,
count1,
payChannel,
tableId);}
tableId);
}
}
mobileChange(String mobile) {
@ -982,10 +1007,8 @@ class _Settlement extends State<Settlement> {
// promotions = "";
// this.promotion = null;
if (tableId > 0) {
if(couponBean == null)
queryCancelMemberCoupon(parentId);
if (couponBean.id != null)
queryUseMemberCoupon(couponBean.id);
if (couponBean == null) queryCancelMemberCoupon(parentId);
if (couponBean.id != null) queryUseMemberCoupon(couponBean.id);
} else {
queryOrderInfo(
address?.id,
@ -1025,7 +1048,7 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
(pro.id??"")??productId,
(pro.id ?? "") ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",

2
lib/union/union_page.dart

@ -257,6 +257,8 @@ class UnionPageState extends State<UnionPage>
? "DRINKSTORE"
: "HAPPYSTORE")),
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
if (index == -1) tabRefresh().refreshFailed();
});
if (baseData != null && baseData.isSuccess) {

4
lib/view_widget/activity_coupons.dart

@ -11,6 +11,8 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../generated/l10n.dart';
class ActivityCoupons extends StatefulWidget {
final String result;
@ -196,7 +198,7 @@ class _ActivityCoupons extends State<ActivityCoupons> {
),
if (listData["type"] == 3)
Text(
"兑换券",
S.of(context).duihuanquan,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(

2
lib/view_widget/coupon_details_dialog.dart

@ -49,7 +49,7 @@ class _CouponDetailsWidget extends State<CouponDetailsWidget> {
alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical: 12),
child: Text(
"使用详情",
S.of(context).shiyongxiangqing,
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,

2
lib/view_widget/cupertino_date_picker.dart

@ -33,7 +33,7 @@ class CupertinoDatePickerWidget extends StatelessWidget {
},
child: Container(
child: Text(
"取消",
S.of(context).quxiao,
style: TextStyle(
fontSize: 16,
fontWeight: MyFontWeight.semi_bold,

4
lib/view_widget/new_coupon_widget.dart

@ -156,7 +156,7 @@ class NewCouponWidget extends StatelessWidget {
child: Row(
children: [
Text(
"使用详情",
S.of(context).shiyongxiangqing,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
@ -639,7 +639,7 @@ class NewCouponWidget extends StatelessWidget {
),
alignment: Alignment.center,
child:Text(
"立即使用",
S.of(context).lijishiyong,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(

4
lib/view_widget/pay_selected_dialog.dart

@ -52,7 +52,7 @@ class _PaySelectedDialog extends State<PaySelectedDialog> {
child: Align(
alignment: Alignment.center,
child: Text(
"请输入支付密码",
S.of(context).qingshuruzhifumima,
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
@ -94,7 +94,7 @@ class _PaySelectedDialog extends State<PaySelectedDialog> {
GestureDetector(
onTap: (){},
child: Text(
"忘记密码",
"${S.of(context).wangjimima}",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 12.sp,

2
lib/view_widget/receiving_method_dialog.dart

@ -52,7 +52,7 @@ class _ReceivingMethodDialog extends State<ReceivingMethodDialog> {
child: Column(
children: [
Text(
"请选择商品的领取方式",
S.of(context).xuanzeshangpinlingqufangshi,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,

117
lib/view_widget/update_dialog.dart

@ -13,10 +13,10 @@ import 'package:url_launcher/url_launcher.dart';
import '../generated/l10n.dart';
class UpdateDialog extends StatefulWidget {
final String version;
final AppUpdate appUpdate;
final String version;
final AppUpdate appUpdate;
UpdateDialog(this.version,this.appUpdate);
UpdateDialog(this.version, this.appUpdate);
@override
State<StatefulWidget> createState() {
@ -30,8 +30,7 @@ class _UpdateDialog extends State<UpdateDialog> {
return Material(
type: MaterialType.transparency,
child: Center(
child:
Container(
child: Container(
width: MediaQuery.of(context).size.width - 80.w,
decoration: BoxDecoration(
color: Colors.transparent,
@ -50,8 +49,7 @@ class _UpdateDialog extends State<UpdateDialog> {
border: Border.all(
color: Colors.white,
width: 0,
style: BorderStyle.solid
),
style: BorderStyle.solid),
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(8.r),
// topRight: Radius.circular(8.r),
@ -61,7 +59,7 @@ class _UpdateDialog extends State<UpdateDialog> {
Image.asset(
"assets/image/update.webp",
width: MediaQuery.of(context).size.width - 80.w,
fit:BoxFit.cover,
fit: BoxFit.cover,
)
],
),
@ -69,10 +67,7 @@ class _UpdateDialog extends State<UpdateDialog> {
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.white,
width: 0,
style: BorderStyle.solid
),
color: Colors.white, width: 0, style: BorderStyle.solid),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8.r),
bottomRight: Radius.circular(8.r),
@ -80,63 +75,70 @@ class _UpdateDialog extends State<UpdateDialog> {
),
padding: EdgeInsets.symmetric(horizontal: 14.w),
child: Column(
children: [
SizedBox(height:32.h,),
Text(
widget.appUpdate.appLastVersionExplain ?? "",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 17.sp,
height: 1.2,
fontWeight: MyFontWeight.regular,
color: Color(0xFF333333),
children: [
SizedBox(
height: 32.h,
),
),
SizedBox(height: 57.h,),
InkWell(
onTap: () {
updateApp();
},
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(27),
),
margin: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 8.h),
padding: EdgeInsets.symmetric(vertical: 11.h),
alignment: Alignment.center,
child: Text(
S.of(context).lijigengxin,
style: TextStyle(
fontSize: 17.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFFFFFF),
),
Text(
widget.appUpdate.appLastVersionExplain ?? "",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 17.sp,
height: 1.2,
fontWeight: MyFontWeight.regular,
color: Color(0xFF333333),
),
),
),
if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp))
SizedBox(
height: 57.h,
),
InkWell(
onTap:() {
doNotUpdate();
onTap: () {
updateApp();
},
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(27),
),
margin: EdgeInsets.only(
left: 14.w, right: 14.w, bottom: 8.h),
padding: EdgeInsets.symmetric(vertical: 11.h),
alignment: Alignment.center,
padding: EdgeInsets.only(top: 8.h,bottom: 15.h),
child: Text(
S.of(context).yihouzaishuo,
S.of(context).lijigengxin,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF8C8C8C),
fontSize: 17.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFFFFFF),
),
),
),
),
],
),)
if (!AppUtils.versionCompare(
widget.version, widget.appUpdate.appLastVersionUp))
InkWell(
onTap: () {
doNotUpdate();
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.only(top: 8.h, bottom: 15.h),
child: Text(
S.of(context).yihouzaishuo,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF8C8C8C),
),
),
),
),
],
),
)
],
),
),
@ -151,12 +153,13 @@ class _UpdateDialog extends State<UpdateDialog> {
}
updateApp() async {
String url = Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838":"http://application.lotus-wallet.com/huixiang?release_id=";
String url = Platform.isIOS
? "itms-apps://itunes.apple.com/app/id1575124838"
: "http://application.lotus-wallet.com/huixiang?release_id=";
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
}

4
lib/view_widget/vip_dialog.dart

@ -241,7 +241,7 @@ class _VipDialog extends State<VipDialog> {
size: 10,
),
Text(
"暂未开放",
S.of(context).zanweikaifang,
style: TextStyle(
color: Color(0xFFFFDCA1),
fontWeight: MyFontWeight.regular,
@ -269,7 +269,7 @@ class _VipDialog extends State<VipDialog> {
size: 10,
),
Text(
"暂未解锁",
S.of(context).zanweijiesuo,
style: TextStyle(
color: Color(0xFFFFDCA1),
fontWeight: MyFontWeight.regular,

2
lib/vip/user_vip_service_page.dart

@ -34,7 +34,7 @@ class _UserVipServicePage extends State<UserVipServicePage> with WidgetsBindingO
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title:"回乡VIP会员卡规则协议",
title:S.of(context).huixiangxieyi,
titleColor: Colors.black,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,

252
lib/vip/vip_view/vip_top.dart

@ -135,118 +135,124 @@ class _VipTop extends State<VipTop> {
(!(widget?.vipCardHome?.member?.isVip ?? false))
? vipCardList()
: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 15.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w),
color: Color(0xffffffff),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: S.of(context).yixianghuiyuanquanyi,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xff32A060),
),
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 15.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w),
color: Color(0xffffffff),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
TextSpan(
text: widget
?.vipCardHome?.member?.vipDuration
.toString() ??
"0",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 18.sp,
color: Color(0xffF96519),
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: S
.of(context)
.yixianghuiyuanquanyi,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xff32A060),
),
),
TextSpan(
text: widget?.vipCardHome?.member
?.vipDuration
.toString() ??
"0",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 18.sp,
color: Color(0xffF96519),
),
),
TextSpan(
text: "",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xff32A060),
),
),
],
),
),
TextSpan(
text: "",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xff32A060),
textDirection: TextDirection.ltr,
))),
SizedBox(
width: 10.w,
),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
vipRenewShowBottomSheet();
});
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 15.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w),
color: Color(0xffffffff),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
),
],
),
textDirection: TextDirection.ltr,
))),
SizedBox(
width: 10.w,
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
"${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "已开通自动续费" : "续费回乡VIP"}",
style: TextStyle(
color: Color((widget
?.vipCardHome
?.member
?.isVipSubscribe ??
false)
? 0xff3A3936
: 0xff32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(
width: 6.w,
),
Image.asset(
"${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "assets/image/vip_xf.webp" : "assets/image/icon_right.webp"}",
width: 16,
height: 16,
fit: BoxFit.fill,
color: Color(0xff32A060),
),
],
))),
)
],
),
),
Expanded(
child: GestureDetector(
onTap: () {
setState(() {
vipRenewShowBottomSheet();
});
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: 10.w, vertical: 15.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w),
color: Color(0xffffffff),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "已开通自动续费" : "续费回乡VIP"}",
style: TextStyle(
color: Color((widget?.vipCardHome
?.member?.isVipSubscribe ??
false)
? 0xff3A3936
: 0xff32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(
width: 6.w,
),
Image.asset(
"${(widget?.vipCardHome?.member?.isVipSubscribe ?? false) ? "assets/image/vip_xf.webp" : "assets/image/icon_right.webp"}",
width: 16,
height: 16,
fit: BoxFit.fill,
color: Color(0xff32A060),
),
],
))),
)
],
),
),
],
),
)
@ -258,7 +264,7 @@ class _VipTop extends State<VipTop> {
Widget vipCard() {
return Container(
margin: EdgeInsets.fromLTRB(
14.w,( MediaQuery.of(context).padding.top + 50.h), 14.w, 8.h),
14.w, (MediaQuery.of(context).padding.top + 50.h), 14.w, 8.h),
width: double.infinity,
height: 207.h,
decoration: BoxDecoration(
@ -279,11 +285,11 @@ class _VipTop extends State<VipTop> {
Image.asset(
"assets/image/vip_card.webp",
fit: BoxFit.fill, //
height:double.infinity,
height: double.infinity,
width: double.infinity,
),
Container(
padding: EdgeInsets.only(top: 24.h,right:16.w),
padding: EdgeInsets.only(top: 24.h, right: 16.w),
alignment: Alignment.topRight,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -410,18 +416,21 @@ class _VipTop extends State<VipTop> {
TextSpan(
text: "",
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium,),
fontSize: 20.sp,
color: Color(0xff32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium,
),
),
TextSpan(
text: "${AppUtils.calculateDouble(double.tryParse(cards?.price ?? ""))}",
text:
"${AppUtils.calculateDouble(double.tryParse(cards?.price ?? ""))}",
style: TextStyle(
fontSize: 36.sp,
color: Color(0xff32A060),
fontSize: 36.sp,
color: Color(0xff32A060),
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.medium,),
fontWeight: MyFontWeight.medium,
),
),
]),
),
@ -700,7 +709,8 @@ class _VipTop extends State<VipTop> {
Widget buildBottomSheetWidget(BuildContext context, state) {
return Container(
padding: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w,bottom:35.h),
padding:
EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w, bottom: 35.h),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.only(
@ -789,6 +799,8 @@ class _VipTop extends State<VipTop> {
),
),
),
if (widget?.vipCardHome?.cards[selectIndex]?.autoSubscribe ??
false)
GestureDetector(
onTap: () {
state(() {

2
lib/web/web_turntable_activity.dart

@ -1,10 +1,8 @@
import 'dart:io';
import 'dart:ui';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:webview_flutter/webview_flutter.dart';

8
lib/web/web_view/input_comment.dart

@ -73,6 +73,14 @@ class _InputComment extends State<InputComment> {
margin: EdgeInsets.symmetric(horizontal: 4.w),
alignment: Alignment.topLeft,
child: TextField(
textInputAction:TextInputAction.send,
onEditingComplete: () {
var commentText = widget.commentTextController.text;
if (commentText.trim() == "") {
return;
}
widget.queryMemberComment(commentText);
},
maxLines: 8,
minLines: 1,
focusNode: widget.commentFocus,

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 3.1.8+36
version: 3.1.9+39
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save