Browse Source

Merge branch 'new_revision_app' into dev

# Conflicts:
#	lib/settlement/settlement_view/activity_coupon_remarks.dart
new_revision_app
wurong 2 years ago
parent
commit
80177ee257
  1. 2
      android/app/build.gradle
  2. BIN
      assets/image/2x/mine_order.webp
  3. BIN
      assets/image/2x/mine_vip_logo.webp
  4. BIN
      assets/image/2x/set.webp
  5. BIN
      assets/image/2x/vip_code.webp
  6. BIN
      assets/image/2x/wallet.webp
  7. BIN
      assets/image/2x/write_off_bg.webp
  8. BIN
      assets/image/3x/mine_order.webp
  9. BIN
      assets/image/3x/mine_vip_logo.webp
  10. BIN
      assets/image/3x/set.webp
  11. BIN
      assets/image/3x/vip_code.webp
  12. BIN
      assets/image/3x/wallet.webp
  13. BIN
      assets/image/3x/write_off_bg.webp
  14. BIN
      assets/image/mine_order.webp
  15. BIN
      assets/image/mine_vip_logo.webp
  16. BIN
      assets/image/set.webp
  17. BIN
      assets/image/vip_code.webp
  18. BIN
      assets/image/wallet.webp
  19. BIN
      assets/image/write_off_bg.webp
  20. 2
      ios/Flutter/AppFrameworkInfo.plist
  21. 12
      ios/Podfile
  22. 8
      ios/Podfile.lock
  23. 12
      ios/Runner.xcodeproj/project.pbxproj
  24. 23
      lib/base_state.dart
  25. 8
      lib/community/community_child_page.dart
  26. 146
      lib/community/community_details.dart
  27. 43
      lib/community/community_list.dart
  28. 1
      lib/community/community_page.dart
  29. 145
      lib/community/community_view/class_details.dart
  30. 12
      lib/community/community_view/class_details_video.dart
  31. 2
      lib/community/community_view/class_list_view.dart
  32. 99
      lib/community/community_view/community_dynamic.dart
  33. 2
      lib/community/community_view/home_class.dart
  34. 64
      lib/community/new_community_details.dart
  35. 6
      lib/community/photo_view_gallery_screen.dart
  36. 8
      lib/generated/intl/messages_en.dart
  37. 12
      lib/generated/intl/messages_en_US.dart
  38. 8
      lib/generated/intl/messages_zh_CN.dart
  39. 8
      lib/generated/intl/messages_zh_Hans_CN.dart
  40. 10
      lib/generated/intl/messages_zh_Hant_CN.dart
  41. 8
      lib/generated/intl/messages_zh_TW.dart
  42. 80
      lib/generated/l10n.dart
  43. 11
      lib/home/home_page.dart
  44. 10
      lib/home/welfare_exchange.dart
  45. 37
      lib/home/welfare_page.dart
  46. 11
      lib/l10n/intl_en.arb
  47. 10
      lib/l10n/intl_en_US.arb
  48. 10
      lib/l10n/intl_zh_CN.arb
  49. 10
      lib/l10n/intl_zh_Hans_CN.arb
  50. 10
      lib/l10n/intl_zh_Hant_CN.arb
  51. 10
      lib/l10n/intl_zh_TW.arb
  52. 21
      lib/login/new_login_page.dart
  53. 10
      lib/main.dart
  54. 6
      lib/main_page.dart
  55. 208
      lib/message/system_details.dart
  56. 216
      lib/message/system_message.dart
  57. 120
      lib/mine/mine_page.dart
  58. 8
      lib/mine/mine_view/community_follow.dart
  59. 2
      lib/mine/mine_view/mine_item.dart
  60. 301
      lib/mine/mine_view/mine_navbar.dart
  61. 172
      lib/mine/mine_view/mine_view.dart
  62. 2
      lib/mine/mine_wallet_page.dart
  63. 79
      lib/mine/personal_page.dart
  64. 4
      lib/mine/recharge_page.dart
  65. 58
      lib/mine/scan_web.dart
  66. 33
      lib/mine/user_info_page.dart
  67. 192
      lib/mine/vip_pay_code.dart
  68. 17
      lib/order/edit_remarks_page.dart
  69. 2
      lib/order/exchange_order_page.dart
  70. 6
      lib/order/order_detail_page.dart
  71. 21
      lib/order/order_history_page.dart
  72. 10
      lib/order/order_view/order_address.dart
  73. 8
      lib/order/order_view/order_pay_selected.dart
  74. 367
      lib/order/write_off_page.dart
  75. 72
      lib/qr/qr_code_scan.dart
  76. 8
      lib/retrofit/data/settleOrderInfo.dart
  77. 3
      lib/retrofit/data/user_info.dart
  78. 2
      lib/retrofit/retrofit_api.dart
  79. 4
      lib/retrofit/retrofit_api.g.dart
  80. 6
      lib/setting/logout_ing.dart
  81. 22
      lib/settlement/settlement.dart
  82. 6
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  83. 26
      lib/settlement/settlement_view/distribution.dart
  84. 13
      lib/settlement/settlement_view/pay_method.dart
  85. 2
      lib/settlement/settlement_view/settlement_order_commodity.dart
  86. 25
      lib/store/shop_details_page.dart
  87. 48
      lib/store/store_order.dart
  88. 184
      lib/store/store_view/product_sku.dart
  89. 70
      lib/store/store_view/shop_goods.dart
  90. 3
      lib/union/union_list.dart
  91. 2
      lib/union/union_page.dart
  92. 4
      lib/view_widget/activity_coupons.dart
  93. 6
      lib/view_widget/activity_poster.dart
  94. 2
      lib/view_widget/coupon_details_dialog.dart
  95. 2
      lib/view_widget/cupertino_date_picker.dart
  96. 218
      lib/view_widget/mine_vip_entry.dart
  97. 4
      lib/view_widget/my_appbar.dart
  98. 4
      lib/view_widget/new_coupon_widget.dart
  99. 4
      lib/view_widget/pay_selected_dialog.dart
  100. 2
      lib/view_widget/receiving_method_dialog.dart
  101. Some files were not shown because too many files have changed in this diff Show More

2
android/app/build.gradle

@ -184,7 +184,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'
// implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5'
implementation fileTree(include: ['*.aar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

BIN
assets/image/2x/mine_order.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

BIN
assets/image/2x/mine_vip_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/2x/set.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/vip_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/wallet.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/2x/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/image/3x/mine_order.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/3x/mine_vip_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/3x/set.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/vip_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/3x/wallet.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/3x/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/image/mine_order.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

BIN
assets/image/mine_vip_logo.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

BIN
assets/image/set.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

BIN
assets/image/vip_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

BIN
assets/image/wallet.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

BIN
assets/image/write_off_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

2
ios/Flutter/AppFrameworkInfo.plist

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>

12
ios/Podfile

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@ -33,8 +33,18 @@ target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
#post_install do |installer|
# installer.pods_project.targets.each do |target|
# flutter_additional_ios_build_settings(target)
# end
#end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end

8
ios/Podfile.lock

@ -22,6 +22,8 @@ PODS:
- BaiduMapKit/Utils (6.5.1):
- BaiduMapKit/Base
- BMKLocationKit (2.0.4)
- emoji_picker_flutter (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_baidu_mapapi_base (3.1.0):
- BaiduMapKit/Utils (= 6.5.1)
@ -238,6 +240,7 @@ PODS:
- SDWebImage
DEPENDENCIES:
- emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`)
- Flutter (from `Flutter`)
- flutter_baidu_mapapi_base (from `.symlinks/plugins/flutter_baidu_mapapi_base/ios`)
- flutter_baidu_mapapi_map (from `.symlinks/plugins/flutter_baidu_mapapi_map/ios`)
@ -276,6 +279,8 @@ SPEC REPOS:
- ZLPhotoBrowser-objc
EXTERNAL SOURCES:
emoji_picker_flutter:
:path: ".symlinks/plugins/emoji_picker_flutter/ios"
Flutter:
:path: Flutter
flutter_baidu_mapapi_base:
@ -325,6 +330,7 @@ SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
BaiduMapKit: f227cfb43581e91466fb4f1344f655eab5788777
BMKLocationKit: 688d8e1194980b96fc9a6585c0eb42e62fbaf780
emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_baidu_mapapi_base: cb406be78c3a949fb58a45dc6627f139d580bd37
flutter_baidu_mapapi_map: 81c4e6e93dc668e311d9b521421deaf292390434
@ -355,6 +361,6 @@ SPEC CHECKSUMS:
webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232
ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736
PODFILE CHECKSUM: 77c662d4cd560e96445691f5bf7f29e2b140072c
PODFILE CHECKSUM: 9a26c1c4037e42be4afc95d70f8bd02a4b989a1c
COCOAPODS: 1.11.3

12
ios/Runner.xcodeproj/project.pbxproj

@ -617,7 +617,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -667,7 +667,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.1.7;
MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -819,7 +819,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -869,7 +869,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.1.7;
MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -912,7 +912,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -962,7 +962,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.1.7;
MARKETING_VERSION = 3.2.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",

23
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();
@ -60,8 +59,10 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> with Widgets
params["activityId"] = pushMap["info"];
break;
case 3:
routeName = "/router/union_detail_page";
routeName = "/router/store_order";
params["id"] = pushMap["info"];
params["tenant"] = pushMap["tenant"];
params["storeName"] = pushMap["storeName"];
break;
case 4:
routeName = "/router/integral_store_page";
@ -71,6 +72,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 +92,4 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> with Widgets
}
}
}
}

8
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;
@ -206,6 +213,7 @@ class CommunityChildPageState extends State<CommunityChildPage>
setState(() {});
});
setState(() {});
},
);
},

146
lib/community/community_details.dart

@ -1,3 +1,5 @@
import 'dart:ui';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -26,9 +28,11 @@ class CommunityDetails extends StatefulWidget {
}
}
class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObserver {
class _CommunityDetails extends State<CommunityDetails>
with WidgetsBindingObserver {
double height = 0;
double commentHeight = 60.h;
// ComunityComment comunity;
String parenId = "0";
final GlobalKey commentKey = GlobalKey();
@ -44,18 +48,23 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
Article article;
String businessId;
final GlobalKey inputKey = GlobalKey();
final TextEditingController commentTextController = TextEditingController();
bool emojiShowing = false;
static double keyboard_height=300;
double keyboard = -1;
bool needShowSmiley = false;
bool needHideSmiley = false;
@override
void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) {
isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0;
if (!mounted) return;
if (MediaQuery
.of(context)
.viewInsets
.bottom == 0) {
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) {
FocusScope.of(context).requestFocus(FocusNode());
if (mounted)
if(!emojiShowing)
setState(() {
hintText = S.current.liuxianinjingcaidepinglunba;
isKeyBoardShow = false;
@ -68,6 +77,18 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
});
}
});
if (needShowSmiley && window.viewInsets.bottom <= 0.1) {
needShowSmiley = false;
setState(() {
emojiShowing = true;
});
}
if(needHideSmiley && window.viewInsets.bottom > 0.1) {
needHideSmiley = false;
setState(() {
emojiShowing = false;
});
}
}
@override
@ -76,11 +97,45 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
// comunity = widget.arguments["comment"];
businessId = widget.arguments["businessId"];
WidgetsBinding.instance.addObserver(this);
commentFocus.addListener(_focusNodeListener);
_queryMemberCommentList();
queryDetails(businessId);
}
void _focusNodeListener() {
/*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
setState(() {
smileyPadGone = true;
});
}*/
}
_onTextFieldTap() {
if(emojiShowing) {
needHideSmiley = true;
}
}
_onSmileyTap() {
if(!emojiShowing && commentFocus.hasFocus && isKeyBoardShow) {
needShowSmiley = true;
commentFocus.unfocus();
} else {
setState(() {
emojiShowing = !emojiShowing;
isKeyBoardShow = emojiShowing;
});
}
}
@override
void dispose(){
WidgetsBinding.instance.removeObserver(this);
commentFocus.removeListener(_focusNodeListener);
super.dispose();
}
///
queryDetails(id) async {
SharedPreferences value = await SharedPreferences.getInstance();
@ -90,8 +145,8 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
context: context,
token: value.getString("token"),
);
BaseData<Article> baseData = await apiService.informationInfo(id)
.catchError((onError) {
BaseData<Article> baseData =
await apiService.informationInfo(id).catchError((onError) {
debugPrint(onError.toString());
});
if (baseData != null && baseData.isSuccess) {
@ -103,7 +158,23 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
@override
Widget build(BuildContext context) {
return Scaffold(
double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard < h) {
keyboard = h;
setState(() {
});
}
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
emojiShowing = false;
isKeyBoardShow = emojiShowing;
FocusScope.of(context).requestFocus(FocusNode());
});
},
child: Scaffold(
// resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: S.of(context).dongtaixiangqing,
titleColor: Colors.black,
@ -112,12 +183,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
leading: true,
leadingColor: Colors.black,
),
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child:Container(
body: Container(
child: Column(
children: [
Expanded(
@ -132,15 +198,14 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
exitFull: () {
setState(() {});
},
userId:widget.arguments !=null ? widget.arguments["userId"] :widget.arguments["mid"],
userId: widget.arguments != null
? widget.arguments["userId"]
: widget.arguments["mid"],
itemCount: 3,
isDetails: true,
heightFun: (height) {
this.height = height +
MediaQuery
.of(context)
.padding
.top +
MediaQuery.of(context).padding.top +
kToolbarHeight +
24;
if (mounted) setState(() {});
@ -155,9 +220,11 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
_reply,
_delCommentTips,
12.sp,
requestApiFinish: (total){setState(() {
requestApiFinish: (total) {
setState(() {
commentTotal = total;
});},
});
},
),
if (memberList == null || memberList.length == 0)
Container(
@ -166,8 +233,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S.of(context)
.zanwupinglun,
S.of(context).zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
@ -186,22 +252,28 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
inputKey,
hintText,
isKeyBoardShow,
keyboard_height,
keyboard,
emojiShowing,
commentFocus,
commentTextController,
_toComment,
_onSmileyTap,
_onTextFieldTap,
_queryMemberComment,
_queryInformationLikes,
isLike: article?.liked ?? false,
),
],
),
)),
);
),
));
}
////
_queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes(businessId).catchError((onError) {});
BaseData baseData =
await apiService.informationLikes(businessId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
commentKey.currentState.setState(() {});
setState(() {
@ -241,28 +313,16 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
scrollController.animateTo(
first.dy +
scrollController.offset -
(kToolbarHeight + MediaQuery
.of(context)
.padding
.top),
(kToolbarHeight + MediaQuery.of(context).padding.top),
duration: Duration(milliseconds: 300),
curve: Curves.easeIn,
);
}
final GlobalKey inputKey = GlobalKey();
final TextEditingController commentTextController = TextEditingController();
contentHeight() {
double contentHeight = MediaQuery
.of(context)
.size
.height -
double contentHeight = MediaQuery.of(context).size.height -
kToolbarHeight -
MediaQuery
.of(context)
.padding
.top -
MediaQuery.of(context).padding.top -
160.h;
if ((contentHeight - 60.h) > (128.h * memberList.length)) {
commentHeight = contentHeight - (128.h * memberList.length);
@ -300,7 +360,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
Dio(),
context: context,
token: sharedPreferences.getString("token"),
showLoading: false,
showLoading: true,
);
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({

43
lib/community/community_list.dart

@ -24,16 +24,8 @@ class CommunityList extends StatefulWidget {
final Function exitFull;
final Function removalDynamic;
CommunityList(
this.comments,
this.userId,
this.commentType,{
this.isList = false,
this.exitFull,
this.removalDynamic
}
);
CommunityList(this.comments, this.userId, this.commentType,
{this.isList = false, this.exitFull, this.removalDynamic});
@override
State<StatefulWidget> createState() {
@ -88,13 +80,17 @@ class _CommunityList extends State<CommunityList> {
children: [
(widget.comments == null || widget.comments.length == 0)
? NoDataView(
src: widget.commentType == 1 ? "assets/image/dong_tai.webp" :"assets/image/guan_zhu.webp",
src: widget.commentType == 1
? "assets/image/dong_tai.webp"
: "assets/image/guan_zhu.webp",
isShowBtn: false,
text:widget.commentType == 1 ? "目前暂无发布动态,要把开心的事讲出来哦~" :"目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
text: widget.commentType == 1
? "目前暂无发布动态,要把开心的事讲出来哦~"
: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w),
):
ListView.builder(
)
: ListView.builder(
padding: EdgeInsets.zero,
itemCount: widget.comments.length,
scrollDirection: Axis.vertical,
@ -103,8 +99,9 @@ class _CommunityList extends State<CommunityList> {
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/new_community_details', arguments: {
Navigator.of(context).pushNamed(
'/router/new_community_details',
arguments: {
"commentsId": widget.comments[position].id,
"userId": widget.userId,
// exitFull: () {
@ -112,8 +109,7 @@ class _CommunityList extends State<CommunityList> {
// },
}).then((value) {
widget.exitFull();
setState(() {
});
setState(() {});
});
setState(() {});
},
@ -319,16 +315,17 @@ class _CommunityList extends State<CommunityList> {
onTap: () {
setState(() {
if (widget.commentType == 0) {
comments.selfFollow = !(comments.selfFollow ?? false);
_vipFollow(comments?.memberInfo?.mid,comments?.selfFollow ?? false);
comments.selfFollow =
!(comments.selfFollow ?? false);
_vipFollow(comments?.memberInfo?.mid,
comments?.selfFollow ?? false);
} else {
showDeleteDialog(position);
}
});
},
child:
(widget.commentType == 0) ?
Container(
child: (widget.commentType == 0)
? Container(
width: 56.w,
height: 25.h,
alignment: Alignment.center,

1
lib/community/community_page.dart

@ -79,6 +79,7 @@ class _CommunityPage extends State<CommunityPage>
return Scaffold(
appBar: MyAppBar(
leading: false,
centerTitle: true,
titleChild: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width - 60.w,

145
lib/community/community_view/class_details.dart

@ -1,4 +1,5 @@
import 'dart:convert';
import 'dart:ui';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
@ -53,11 +54,17 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
int chapterIndex = 0;
double height = 0;
var isShowMore = false;
bool emojiShowing = false;
static double keyboard_height=300;
double keyboard = -1;
bool needShowSmiley = false;
bool needHideSmiley = false;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
commentFocus.addListener(_focusNodeListener);
courseDetails(widget.arguments["id"]);
queryChapterList(widget.arguments["id"]);
}
@ -70,6 +77,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
}
BaseData<List<Chapter>> baseData =
@ -114,6 +122,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
if (isKeyBoardShow) {
FocusScope.of(context).requestFocus(FocusNode());
if (mounted)
if(!emojiShowing)
setState(() {
hintText = S.current.liuxianinjingcaidepinglunba;
isKeyBoardShow = false;
@ -126,17 +135,73 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
});
}
});
if (needShowSmiley && window.viewInsets.bottom <= 0.1) {
needShowSmiley = false;
setState(() {
emojiShowing = true;
});
}
if(needHideSmiley && window.viewInsets.bottom > 0.1) {
needHideSmiley = false;
setState(() {
emojiShowing = false;
});
}
}
void _focusNodeListener() {
/*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
setState(() {
smileyPadGone = true;
});
}*/
}
_onTextFieldTap() {
if(emojiShowing) {
needHideSmiley = true;
}
}
_onSmileyTap() {
if(!emojiShowing && commentFocus.hasFocus && isKeyBoardShow) {
needShowSmiley = true;
commentFocus.unfocus();
} else {
setState(() {
emojiShowing = !emojiShowing;
isKeyBoardShow = emojiShowing;
});
}
}
@override
void dispose(){
WidgetsBinding.instance.removeObserver(this);
commentFocus.removeListener(_focusNodeListener);
super.dispose();
}
@override
Widget build(BuildContext context) {
double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard <= 0) {
setState(() {
keyboard = h;
});
}
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: Material(child: Scaffold(
child: Material(
child: Scaffold(
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
emojiShowing = false;
isKeyBoardShow = emojiShowing;
FocusScope.of(context).requestFocus(FocusNode());
});
},
child: Container(
// margin: EdgeInsets.only(top:25),
@ -148,24 +213,34 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
child: Column(
children: [
Container(
height: MediaQuery.of(context).size.width / 1.5,
child: Stack(
children: [
ClassDetailsVideo(key:videoKey,exitFull: (){setState(() {});},
coverImg: chapterList.length > chapterIndex
? chapterList[chapterIndex].content.coverImg
: "",isShowImg: this.isShowImg,
changeShowImg: (isShowImg){setState(() {
ClassDetailsVideo(
key: videoKey,
exitFull: () {
setState(() {});
},
coverImg:
chapterList.length > chapterIndex
? chapterList[chapterIndex]
.content
.coverImg
: "",
isShowImg: this.isShowImg,
changeShowImg: (isShowImg) {
setState(() {
this.isShowImg = isShowImg;
});},heightFun: (height) {
});
},
heightFun: (height) {
this.height = height +
MediaQuery
.of(context)
.padding
.top +
MediaQuery.of(context).padding.top +
kToolbarHeight +
24;
if (mounted) setState(() {});
},),
},
),
Container(
margin: EdgeInsets.only(
top: 40.h, left: 16.w, right: 16.w),
@ -173,8 +248,10 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
color: Colors.transparent,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
GestureDetector(
child: Image.asset(
@ -184,7 +261,9 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
onTap: () {
Navigator.of(context).pop(
course != null ? course.viewers + 1 : 0);
course != null
? course.viewers + 1
: 0);
},
),
],
@ -195,7 +274,8 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
Container(
margin: EdgeInsets.only(bottom: 16.h),
padding: EdgeInsets.only(left: 16, top: 16, right: 10),
padding: EdgeInsets.only(
left: 16, top: 16, right: 10),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
@ -215,10 +295,12 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
children: [
Container(
// height: 22.h,
padding:EdgeInsets.only(left:2,right:2),
padding: EdgeInsets.only(
left: 2, right: 2),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
borderRadius:
BorderRadius.circular(2),
border: Border.all(
width: 1,
color: Color(0xFFFF7A1A),
@ -243,12 +325,15 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
Expanded(
child: Text(
course != null ? course.subject : "",
course != null
? course.subject
: "",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
fontWeight:
MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
),
),
@ -385,14 +470,20 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
),
flex: 1,
),
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
keyboard_height,
keyboard,
emojiShowing,
commentFocus,
commentTextController,
_toComment,
_onSmileyTap,
_onTextFieldTap,
_queryMemberComment,
_queryCourseLikes,
isLike: course?.selfLiked,
@ -400,8 +491,8 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
],
),
)),
),)
);
),
));
}
Widget anthology() {
@ -563,16 +654,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(),
"",

12
lib/community/community_view/class_details_video.dart

@ -138,16 +138,16 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
? Container(
color: Colors.black,
width: width,
// height: width / 7 * 5,
height: height,
height:MediaQuery.of(context).size.width / 1.5,
// margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: chewies = Chewie(
controller: chewieAudioController,
),
)
: Container(
width: width,
// height:width / 7 * 5,
height: height,
height:MediaQuery.of(context).size.width / 1.5,
// margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
)),
if (widget.isShowImg)
GestureDetector(
@ -160,8 +160,8 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
},
child: Container(
width: width,
// height: width / 7 * 5,
height: height,
height: MediaQuery.of(context).size.width / 1.5,
// margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
color: Colors.black,
child: Stack(
children: [

2
lib/community/community_view/class_list_view.dart

@ -217,7 +217,7 @@ class _ClassListView extends State<ClassListView> {
maxLines: 2,
style: TextStyle(
fontSize: 13.sp,
height: 1.2.h,
height: 1.5.h,
fontWeight: MyFontWeight.medium,
color: Colors.black,
),

99
lib/community/community_view/community_dynamic.dart

@ -149,11 +149,28 @@ class _CommunityDynamic extends State<CommunityDynamic> {
}
}
////
_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)
await Navigator.of(context).pushNamed('/router/personal_page', arguments: {
"memberId": (widget.article.author == widget.userId)
? "0"
: widget.article.author,
});
@ -209,7 +226,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
},
child: MImage(
(widget?.article?.authorHeadImg ??
"https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"),
""),
width: 44,
height: 44,
isCircle: true,
@ -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,7 +324,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
SizedBox(
height: 12.h,
),
widget.isList ? Text(
widget.isList
? Text(
widget?.article?.mainTitle ?? "",
maxLines: 5,
overflow: TextOverflow.ellipsis,
@ -310,7 +334,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
fontWeight: MyFontWeight.regular,
fontSize: 15.sp,
),
) :Text(
)
: Text(
widget?.article?.mainTitle ?? "",
style: TextStyle(
color: Color(0xFF1A1A1A),
@ -323,7 +348,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
height: 8.h,
),
if (widget.article.location != "")
Padding(padding:EdgeInsets.only(bottom:7),
Padding(
padding: EdgeInsets.only(bottom: 7),
child: Row(
children: [
Icon(
@ -346,7 +372,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
),
)),
],
),),
),
),
if (!widget.isDetails)
SizedBox(
height: 5.h,
@ -362,8 +389,6 @@ class _CommunityDynamic extends State<CommunityDynamic> {
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/liulanliang.svg",
@ -391,8 +416,6 @@ class _CommunityDynamic extends State<CommunityDynamic> {
child: Container(
padding: EdgeInsets.only(bottom: 16.h),
child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/pinglun.svg",
@ -414,14 +437,28 @@ class _CommunityDynamic extends State<CommunityDynamic> {
],
))),
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(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(
"assets/svg/xihuan.svg",
(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,
),
@ -439,8 +476,9 @@ class _CommunityDynamic extends State<CommunityDynamic> {
),
],
)),
),
if (widget?.article?.author != widget.userId ?? "")
)),
if ((widget?.article?.author != widget.userId ?? "") &&
widget.commentType == 0)
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
@ -450,7 +488,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
});
},
child: Container(
padding: EdgeInsets.only(top:3.h,bottom: 16.h),
padding:
EdgeInsets.only(top: 3.h, bottom: 16.h),
alignment: Alignment.center,
// color: Colors.red,
child: Icon(
@ -459,7 +498,8 @@ class _CommunityDynamic extends State<CommunityDynamic> {
),
))),
],
),),
),
),
],
),
),
@ -794,14 +834,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 +846,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,6 +881,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
color: Color(0xFFF7F7F7),
),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
Navigator.of(context)
@ -850,6 +891,9 @@ class _CommunityDynamic extends State<CommunityDynamic> {
});
});
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 5.h),
child: Row(
children: [
SizedBox(
@ -872,6 +916,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
),
),
],
),
))
],
),

2
lib/community/community_view/home_class.dart

@ -67,7 +67,7 @@ class _HomeClass extends State<HomeClass> {
),
),
Container(
height: 195,
height: 195.h,
margin: EdgeInsets.only(top: 10.h),
child: ListView.builder(
scrollDirection: Axis.horizontal,

64
lib/community/new_community_details.dart

@ -1,3 +1,4 @@
import 'dart:ui';
import 'dart:convert';
import 'package:dio/dio.dart';
@ -55,6 +56,11 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
Article article;
String commentsId;
String userId;
bool emojiShowing =false;
static double keyboard_height=300;
double keyboard = -1;
bool needShowSmiley = false;
bool needHideSmiley = false;
@override
void initState() {
@ -62,6 +68,7 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
commentsId = widget.arguments["commentsId"];
userId = widget.arguments["userId"];
WidgetsBinding.instance.addObserver(this);
commentFocus.addListener(_focusNodeListener);
queryDetails(commentsId);
}
@ -105,6 +112,7 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
if (isKeyBoardShow) {
FocusScope.of(context).requestFocus(FocusNode());
if (mounted)
if(!emojiShowing)
setState(() {
hintText = S.current.liuxianinjingcaidepinglunba;
isKeyBoardShow = false;
@ -117,10 +125,61 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
});
}
});
if (needShowSmiley && window.viewInsets.bottom <= 0.1) {
needShowSmiley = false;
setState(() {
emojiShowing = true;
});
}
if(needHideSmiley && window.viewInsets.bottom > 0.1) {
needHideSmiley = false;
setState(() {
emojiShowing = false;
});
}
}
void _focusNodeListener() {
/*if (_focusNode.hasFocus || _focusNode.consumeKeyboardToken()){
setState(() {
smileyPadGone = true;
});
}*/
}
_onTextFieldTap() {
if(emojiShowing) {
needHideSmiley = true;
}
}
_onSmileyTap() {
if(!emojiShowing && commentFocus.hasFocus && isKeyBoardShow) {
needShowSmiley = true;
commentFocus.unfocus();
} else {
setState(() {
emojiShowing = !emojiShowing;
isKeyBoardShow = emojiShowing;
});
}
}
@override
void dispose(){
WidgetsBinding.instance.removeObserver(this);
commentFocus.removeListener(_focusNodeListener);
super.dispose();
}
@override
Widget build(BuildContext context) {
double h = MediaQuery.of(context).viewInsets.bottom;
if(h > 0 && keyboard <h) {
setState(() {
keyboard = h;
});
}
return WillPopScope(
onWillPop: () async {
Navigator.of(context).pop(true);
@ -312,9 +371,14 @@ class _NewCommunityDetails extends State<NewCommunityDetails> with WidgetsBindin
inputKey,
hintText,
isKeyBoardShow,
keyboard_height,
keyboard,
emojiShowing,
commentFocus,
commentTextController,
_toComment,
_onSmileyTap,
_onTextFieldTap,
_queryMemberComment,
_queryInformationLikes,
isLike: article?.liked ?? false,

6
lib/community/photo_view_gallery_screen.dart

@ -42,7 +42,12 @@ class _PhotoViewGalleryScreenState extends State<PhotoViewGalleryScreen> {
left: 0,
bottom: 0,
right: 0,
child: GestureDetector(
onTap: (){
Navigator.of(context).pop();
},
child: Container(
color: Colors.black,
child: PhotoViewGallery.builder(
scrollPhysics: const BouncingScrollPhysics(),
builder: (BuildContext context, int index) {
@ -79,6 +84,7 @@ class _PhotoViewGalleryScreenState extends State<PhotoViewGalleryScreen> {
)
),
),
),
Positioned(//index显示
top: MediaQuery.of(context).padding.top+15,
width: MediaQuery.of(context).size.width,

8
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("立刻续费"),
@ -406,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -420,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
@ -565,6 +570,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 +613,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 +683,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"),

12
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"),
@ -406,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("Welcome Back Home"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("balance of green currency"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("green payment"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("Jing Bi"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("Union"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("Organic Life"),
@ -420,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("updated every Wednesday"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("Wednesday renewal coupon"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("Store Selection"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("store balance"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("Please enter the house number"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("Details"),
@ -565,6 +570,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 +613,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 +683,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 +759,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"),

8
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("立刻续费"),
@ -406,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -420,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
@ -565,6 +570,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 +613,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 +683,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_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("立刻续费"),
@ -406,6 +409,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("绿币余额"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("绿币支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有机生活"),
@ -420,6 +424,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每周三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每周三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("门店余额"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("请输入门牌号"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明细"),
@ -565,6 +570,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 +613,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 +683,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_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("立刻續費"),
@ -402,6 +405,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("綠幣餘額"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("綠幣支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有機生活"),
@ -416,6 +420,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每週三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每週三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("門店餘額"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("請輸入門牌號"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),
@ -560,6 +565,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 +607,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 +677,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 +754,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("暫無綫上門店"),

8
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("立刻續費"),
@ -404,6 +407,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"),
"lvbiyue" : MessageLookupByLibrary.simpleMessage("綠幣餘額"),
"lvbiyue_" : m18,
"lvbizhifu" : MessageLookupByLibrary.simpleMessage("綠幣支付"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("有機生活"),
@ -418,6 +422,7 @@ class MessageLookup extends MessageLookupByLibrary {
"meizhousangengxin" : MessageLookupByLibrary.simpleMessage("每週三更新"),
"meizhousanquanbao" : MessageLookupByLibrary.simpleMessage("每週三更新劵包"),
"mendianxuanzhe" : MessageLookupByLibrary.simpleMessage("门店选择"),
"mendianyue" : MessageLookupByLibrary.simpleMessage("門店餘額"),
"menpaihao" : MessageLookupByLibrary.simpleMessage("請輸入門牌號"),
"mi" : m21,
"mingxi" : MessageLookupByLibrary.simpleMessage("明細"),
@ -562,6 +567,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 +610,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 +680,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"),

80
lib/generated/l10n.dart

@ -6875,6 +6875,86 @@ 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 mendianyue {
return Intl.message(
'门店余额',
name: 'mendianyue',
desc: '',
args: [],
);
}
/// `绿`
String get lvbizhifu {
return Intl.message(
'绿币支付',
name: 'lvbizhifu',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

11
lib/home/home_page.dart

@ -111,10 +111,12 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
///
posterShowAlertDialog(ActivityPos activityPos) {
var today = DateTime.now().day;
SharedPreferences.getInstance().then((value) {
if((value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};"))
return;
value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};");
value.setInt("today", today);
//
showDialog(
context: context,
@ -503,7 +505,10 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
},
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: Column(
child: FutureBuilder(
future: queryHome(),
builder: (context, snapshot) {
return Column(
children: [
///banner
HomeBanner(bannerData, controller),
@ -579,7 +584,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
},
),
],
),
);})
),
),
),

10
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();
@ -165,7 +166,7 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
backgroundColor: Colors.white,
body: NestedScrollView(
headerSliverBuilder: (context, inner) {
return [
@ -264,7 +265,7 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
enablePullUp: true,
physics: ClampingScrollPhysics(),
header: MyHeader(),
footer: CustomFooter(
@ -408,7 +409,8 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
SizedBox(
height: 4.h,
),
Expanded(child: Row(
Expanded(
child: Row(
children: [
Text(
(userInfo != null) ? "${userInfo.points}" : "",

37
lib/home/welfare_page.dart

@ -50,8 +50,7 @@ class _WelfarePage extends State<WelfarePage> {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), context: context, token: value.getString("token")),
queryGoods(),
queryCoupon(),
_onRefresh(),
});
}
@ -108,6 +107,8 @@ class _WelfarePage extends State<WelfarePage> {
"searchKey": "",
"state": 0
}).catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
});
@ -134,7 +135,7 @@ class _WelfarePage extends State<WelfarePage> {
_onRefresh(){
queryGoods();
// queryCoupon();
queryCoupon();
}
@ -262,7 +263,13 @@ class _WelfarePage extends State<WelfarePage> {
),
],
)),
AspectRatio(
coupon.length == 0?
NoDataView(
src: "assets/image/ka.webp",
isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp,
): AspectRatio(
aspectRatio: 1.10,
child: Swiper(
onIndexChanged: (it){
@ -288,12 +295,11 @@ class _WelfarePage extends State<WelfarePage> {
children: [
Container(
child: weekList(coupon[position]),
// weekList(testList2[position]),
),
],
);
},
itemCount:coupon.length,
itemCount:coupon.length ?? 0,
),
)
],
@ -302,7 +308,14 @@ class _WelfarePage extends State<WelfarePage> {
}
Widget weekList(List<Coupon> cops){
return Expanded(child:(cops != null && cops.length > 0)?ListView.builder(
return Expanded(
child:(cops == null && cops.length == 0)?
NoDataView(
src: "assets/image/ka.webp",
isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp,
):ListView.builder(
padding: EdgeInsets.zero,
itemCount: cops.length,
scrollDirection: Axis.vertical,
@ -315,14 +328,10 @@ class _WelfarePage extends State<WelfarePage> {
child: weekCoupon(cops[position]),
);
},
):NoDataView(
src: "assets/image/ka.webp",
isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp,
),);
}
///
Widget weekCoupon(Coupon cop) {
return Container(
height: 95.h,
@ -396,6 +405,7 @@ class _WelfarePage extends State<WelfarePage> {
);
}
///
Widget weekWidget(Coupon cop) {
if (cop.bizType == 1) {
return Column(
@ -581,6 +591,7 @@ class _WelfarePage extends State<WelfarePage> {
}
}
///
Widget weekBtn(Coupon cop) {
if(cop.status == 0)
return Align(
@ -645,6 +656,7 @@ class _WelfarePage extends State<WelfarePage> {
);
}
///
receiveCoupon(couponId) async {
couponIndex = swiperIndex;
BaseData baseData = await apiService.receiveCoupon(couponId);
@ -881,7 +893,6 @@ class _WelfarePage extends State<WelfarePage> {
);
}
String pointPrice(Goods goodsPrice){
if(goodsPrice == null)
return "";

11
lib/l10n/intl_en.arb

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

10
lib/l10n/intl_en_US.arb

@ -714,6 +714,16 @@
"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",
"mendianyue":"store balance",
"lvbizhifu":"green payment",

10
lib/l10n/intl_zh_CN.arb

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

10
lib/l10n/intl_zh_Hans_CN.arb

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

10
lib/l10n/intl_zh_Hant_CN.arb

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

10
lib/l10n/intl_zh_TW.arb

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

21
lib/login/new_login_page.dart

@ -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();
@ -384,7 +391,9 @@ class _NewLoginPage extends State<NewLoginPage> {
children: [
GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/phone_address_page').then((value) {
Navigator.of(context)
.pushNamed('/router/phone_address_page')
.then((value) {
if (value != null)
setState(() {
area = value;
@ -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,

10
lib/main.dart

@ -110,6 +110,8 @@ import 'mine/mine_vip/binding_assistant_card.dart';
import 'mine/mine_vip/legal_right_details.dart';
import 'mine/mine_vip/mine_attainment_page.dart';
import 'mine/mine_vip/mine_vip_core.dart';
import 'mine/scan_web.dart';
import 'mine/vip_pay_code.dart';
import 'order/bargain_group_order.dart';
import 'mine/personal_page.dart';
import 'order/exchange_write_off_page.dart';
@ -323,7 +325,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/help_feedback_page': (context, {arguments}) => HelpFeedbackPage(),
'/router/founder_story_page': (context, {arguments}) => FounderStoryPage(),
'/router/system_msg_page': (context, {arguments}) => SystemMessagePage(),
'/router/edit_remarks_page': (context, {arguments}) => EditRemarksPage(),
'/router/edit_remarks_page': (context, {arguments}) => EditRemarksPage(arguments: arguments),
// '/router/hot_article_page': (context, {arguments}) => HotArticlePage(),
'/router/address_map_page': (context, {arguments}) => AddressMapPage(),
'/router/roll_center_page': (context, {arguments}) => RollCenterPage(),
@ -348,7 +350,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/qr_share': (context, {arguments}) => QrSharePage(),
'/router/main_page': (context, {arguments}) => MainPage(arguments: arguments),
'/router/test_page': (context, {arguments}) => TestPage(),
'/router/communityFollow': (context, {arguments}) => CommunityFollow(),
'/router/communityFollow': (context, {arguments}) => CommunityFollow(arguments:arguments),
'/router/releasePage': (context, {arguments}) => ReleasePage(),
'/router/activity_list': (context, {arguments}) => ActivityList(),
'/router/class_details': (context, {arguments}) =>
@ -417,4 +419,8 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
UserVipServicePage(),
'/router/help_farmers_page': (context, {arguments}) =>
HelpFarmersPage(),
'/router/scan_web': (context, {arguments}) =>
ScanWeb(arguments:arguments),
'/router/vip_pay_code': (context, {arguments}) =>
VipPayCode(),
};

6
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);
@ -297,8 +297,10 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
params["activityId"] = pushMap["info"];
break;
case 3:
routeName = "/router/union_detail_page";
routeName = "/router/store_order";
params["id"] = pushMap["info"];
params["tenant"] = pushMap["tenant"];
params["storeName"] = pushMap["storeName"];
break;
case 4:
routeName = "/router/integral_store_page";

208
lib/message/system_details.dart

@ -23,6 +23,7 @@ class SystemDetails extends StatefulWidget {
final Map<String, dynamic> arguments;
SystemDetails({this.arguments});
@override
State<StatefulWidget> createState() {
return _SystemDetails();
@ -34,6 +35,7 @@ class _SystemDetails extends State<SystemDetails> {
int pageNum = 1;
List<Message> messages = [];
int msgType = 0;
// String parenId = "0";
var commentFocus = FocusNode();
String hintText = S.current.liuxianinjingcaidepinglunba;
@ -43,7 +45,6 @@ class _SystemDetails extends State<SystemDetails> {
final TextEditingController commentTextController = TextEditingController();
int indexMsg = 0;
@override
void initState() {
super.initState();
@ -56,7 +57,6 @@ class _SystemDetails extends State<SystemDetails> {
});
}
_refresh() {
pageNum = 1;
queryMessage();
@ -98,7 +98,8 @@ class _SystemDetails extends State<SystemDetails> {
if (baseData != null && baseData.isSuccess) {
// widget.refresh();
queryMessage();
SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center);
SmartDialog.showToast(isFollow ? "取关成功" : "关注成功",
alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
@ -125,8 +126,7 @@ class _SystemDetails extends State<SystemDetails> {
FocusScope.of(context).unfocus();
Navigator.of(context).pop();
SmartDialog.showToast("发布成功", alignment: Alignment.center);
}
else{
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
@ -139,7 +139,15 @@ class _SystemDetails extends State<SystemDetails> {
appBar: MyAppBar(
background: Colors.white,
leadingColor: Colors.black,
title: (msgType == 2) ? S.of(context).dingdantongzhi:(msgType == 3) ? S.of(context).chongzhixiaoxi:(msgType == 4) ?"关注":(msgType == 5) ?"点赞":"评论",
title: (msgType == 2)
? S.of(context).dingdantongzhi
: (msgType == 3)
? S.of(context).chongzhixiaoxi
: (msgType == 4)
? S.of(context).guanzhu
: (msgType == 5)
? S.of(context).dianzan
: S.of(context).pinglun,
titleSize: 18.sp,
titleColor: Colors.black,
),
@ -159,24 +167,17 @@ class _SystemDetails extends State<SystemDetails> {
onLoading: () {
queryMessage();
},
child:
Container(
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child:
Container(
child: Container(
child: Column(
children: [
if(msgType == 2)
orderMessage(),
if(msgType == 3)
rechargeMessage(),
if(msgType == 5)
fabulousMessage(),
if(msgType == 6)
commentMessage(),
if(msgType == 4)
followMessage(),
if (msgType == 2) orderMessage(),
if (msgType == 3) rechargeMessage(),
if (msgType == 5) fabulousMessage(),
if (msgType == 6) commentMessage(),
if (msgType == 4) followMessage(),
],
),
),
@ -191,7 +192,8 @@ class _SystemDetails extends State<SystemDetails> {
return Container(
color: Colors.white,
width: double.infinity,
padding: EdgeInsets.only(top:10.h,bottom:20.h,left: 20.w,right: 20.w),
padding:
EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
@ -221,14 +223,13 @@ class _SystemDetails extends State<SystemDetails> {
);
}),
],
)
);
));
}
Widget orderMessageItem(Message message) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child:
Column(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -282,7 +283,8 @@ class _SystemDetails extends State<SystemDetails> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Text(
Expanded(
child: Text(
message.content,
maxLines: 2,
overflow: TextOverflow.ellipsis,
@ -290,7 +292,8 @@ class _SystemDetails extends State<SystemDetails> {
fontSize: 12.sp,
color: Color(0xFF353535),
),
),),
),
),
Icon(
Icons.keyboard_arrow_right,
color: Colors.black,
@ -316,7 +319,8 @@ class _SystemDetails extends State<SystemDetails> {
return Container(
color: Colors.white,
width: double.infinity,
padding: EdgeInsets.only(top:10.h,bottom:20.h,left: 20.w,right: 20.w),
padding:
EdgeInsets.only(top: 10.h, bottom: 20.h, left: 20.w, right: 20.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
@ -346,14 +350,13 @@ class _SystemDetails extends State<SystemDetails> {
);
}),
],
)
);
));
}
Widget rechargeMessageItem(Message message) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child:
Column(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -413,12 +416,15 @@ class _SystemDetails extends State<SystemDetails> {
color: Color(0xFF353535),
),
),
SizedBox(height:8.h,),
SizedBox(
height: 8.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Text(
Expanded(
child: Text(
message.content,
maxLines: 2,
overflow: TextOverflow.ellipsis,
@ -426,7 +432,8 @@ class _SystemDetails extends State<SystemDetails> {
fontSize: 12.sp,
color: Color(0xFF353535),
),
),),
),
),
Icon(
Icons.keyboard_arrow_right,
color: Colors.black,
@ -476,7 +483,10 @@ class _SystemDetails extends State<SystemDetails> {
Navigator.of(context).pushNamed(
'/router/community_details',
arguments: {
"businessId":jsonDecode(messages[position].relational)["businessId"].toString(),
"businessId":
jsonDecode(messages[position].relational)[
"businessId"]
.toString(),
"mid": messages[position].mid
},
);
@ -485,14 +495,13 @@ class _SystemDetails extends State<SystemDetails> {
);
}),
],
)
);
));
}
Widget fabulousMessageItem(Message message) {
var messageRelational = jsonDecode(message.relational);
return Container(
child:
Row(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -505,21 +514,24 @@ class _SystemDetails extends State<SystemDetails> {
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 8,),
Expanded(child:Column(
SizedBox(
width: 8,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
messageRelational["nickname"] ?? "",
Text(messageRelational["nickname"] ?? "",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF1A1A1A))
color: Color(0xFF1A1A1A))),
SizedBox(
width: 8.w,
),
SizedBox(width:8.w,),
Text(
"点赞了",
style: TextStyle(
@ -530,7 +542,9 @@ class _SystemDetails extends State<SystemDetails> {
),
],
),
SizedBox(height: 8,),
SizedBox(
height: 8,
),
Text(
message.updateTime,
style: TextStyle(
@ -538,7 +552,9 @@ class _SystemDetails extends State<SystemDetails> {
color: Color(0xFFA29E9E),
),
),
SizedBox(height:12.h,),
SizedBox(
height: 12.h,
),
Container(
width: double.infinity,
color: Color(0xFFF2F2F2),
@ -567,7 +583,8 @@ class _SystemDetails extends State<SystemDetails> {
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 2.w),
Expanded(child:Text(
Expanded(
child: Text(
messageRelational["content"] ?? "",
maxLines: 2,
overflow: TextOverflow.ellipsis,
@ -577,7 +594,8 @@ class _SystemDetails extends State<SystemDetails> {
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),)
),
)
],
),
),
@ -623,7 +641,10 @@ class _SystemDetails extends State<SystemDetails> {
Navigator.of(context).pushNamed(
'/router/community_details',
arguments: {
"businessId":jsonDecode(messages[position].relational)["businessId"].toString(),
"businessId":
jsonDecode(messages[position].relational)[
"businessId"]
.toString(),
"mid": messages[position].mid
},
);
@ -632,14 +653,13 @@ class _SystemDetails extends State<SystemDetails> {
);
}),
],
)
);
));
}
Widget commentMessageItem(Message message, index) {
var messageRelational = jsonDecode(message.relational);
return Container(
child:
Row(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -652,8 +672,11 @@ class _SystemDetails extends State<SystemDetails> {
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 8,),
Expanded(child:Column(
SizedBox(
width: 8,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -661,20 +684,21 @@ class _SystemDetails extends State<SystemDetails> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Column(
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
messageRelational["nickname"],
Text(messageRelational["nickname"],
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF1A1A1A))
color: Color(0xFF1A1A1A))),
SizedBox(
width: 8.w,
),
SizedBox(width:8.w,),
Text(
"评论了",
style: TextStyle(
@ -685,7 +709,9 @@ class _SystemDetails extends State<SystemDetails> {
),
],
),
SizedBox(height: 8,),
SizedBox(
height: 8,
),
Text(
message.updateTime,
style: TextStyle(
@ -694,7 +720,8 @@ class _SystemDetails extends State<SystemDetails> {
),
),
],
),),
),
),
GestureDetector(
onTap: () {
setState(() {
@ -728,7 +755,9 @@ class _SystemDetails extends State<SystemDetails> {
)
],
),
SizedBox(height:8.h,),
SizedBox(
height: 8.h,
),
// Text(
// messageRelational["content"],
// maxLines: 2,
@ -811,7 +840,8 @@ class _SystemDetails extends State<SystemDetails> {
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 2.w),
Expanded(child:Text(
Expanded(
child: Text(
messageRelational["content"],
maxLines: 2,
overflow: TextOverflow.ellipsis,
@ -821,7 +851,8 @@ class _SystemDetails extends State<SystemDetails> {
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),)
),
)
],
),
),
@ -873,19 +904,17 @@ class _SystemDetails extends State<SystemDetails> {
);
}),
],
)
);
));
}
Widget followMessageItem(Message message) {
var messageRelational = jsonDecode(message.relational);
if (message.relational.startsWith("{"))
return Container(
child:
Row(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MImage(
messageRelational["avatar"],
width: 44,
@ -895,8 +924,11 @@ class _SystemDetails extends State<SystemDetails> {
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 8,),
Expanded(child:Column(
SizedBox(
width: 8,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -904,20 +936,21 @@ class _SystemDetails extends State<SystemDetails> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Column(
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
messageRelational["nickname"],
Text(messageRelational["nickname"],
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF1A1A1A))
color: Color(0xFF1A1A1A))),
SizedBox(
width: 8.w,
),
SizedBox(width:8.w,),
Text(
"关注了你",
style: TextStyle(
@ -928,7 +961,9 @@ class _SystemDetails extends State<SystemDetails> {
),
],
),
SizedBox(height: 8,),
SizedBox(
height: 8,
),
Text(
message.updateTime,
style: TextStyle(
@ -937,15 +972,16 @@ class _SystemDetails extends State<SystemDetails> {
),
),
],
),),
),
),
GestureDetector(
onTap: () {
setState(() {
_vipFollow(messageRelational["mid"].toString(),message?.followed ?? false);
_vipFollow(messageRelational["mid"].toString(),
message?.followed ?? false);
});
},
child:
RoundButton(
child: RoundButton(
height: 21.h,
width: 56.w,
padding: EdgeInsets.all(2),
@ -1009,7 +1045,9 @@ class _SystemDetails extends State<SystemDetails> {
),
],
),
SizedBox(height:8.h,),
SizedBox(
height: 8.h,
),
Container(
margin: EdgeInsets.only(top: 16.h, bottom: 16.h),
height: 1.h,

216
lib/message/system_message.dart

@ -102,7 +102,8 @@ class _SystemMessagePage extends State<SystemMessagePage> {
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(() {
msgNumber.forEach((key, value) {
@ -124,40 +125,35 @@ class _SystemMessagePage extends State<SystemMessagePage> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
Navigator.of(context).pop(true);
return false;
},
child:Scaffold(
appBar: MyAppBar(
background: Colors.white,
leadingColor: Colors.black,
title: S.of(context).xiaoxi,
titleSize: 18.sp,
titleColor: Colors.black,
actions: [
Container(
margin: EdgeInsets.only(right: 16.w),
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () {
setState(() {
queryMsgStats();
});
},
child: Text(
S.of(context).biaojiweiyidu,
style: TextStyle(
fontSize: 16.sp,
fontWeight:MyFontWeight.semi_bold,
color: Color(0xFF353535),
),
),
),
),
],
),
return Scaffold(
// appBar: MyAppBar(
// background: Colors.white,
// leadingColor: Colors.black,
// title: S.of(context).xiaoxi,
// titleSize: 18.sp,
// titleColor: Colors.black,
// actions: [
// Container(
// margin: EdgeInsets.only(right: 16.w),
// alignment: Alignment.centerRight,
// child: GestureDetector(
// onTap: () {
// setState(() {
// queryMsgStats();
// });
// },
// child: Text(
// S.of(context).biaoweiyidu,
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight:MyFontWeight.semi_bold,
// color: Color(0xFF353535),
// ),
// ),
// ),
// ),
// ],
// ),
body: SmartRefresher(
enablePullDown: true,
enablePullUp: true,
@ -180,19 +176,78 @@ class _SystemMessagePage extends State<SystemMessagePage> {
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
padding: EdgeInsets.only(bottom: 30.h),
child: Column(
children: [
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: MediaQuery.of(context).padding.top + 10.h,
bottom: 15.h,right: 16.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 12,),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
Spacer(),
Expanded(
child: Text(
S.of(context).xiaoxi,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: MyFontWeight.regular,
),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
queryMsgStats();
});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Text(
S.of(context).biaoweiyidu,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
),
newsSurvey(),
SizedBox(height: 16.h,),
SizedBox(
height: 16.h,
),
buildMessage(),
],
),
),
),
),
),
));
);
}
Widget newsSurvey() {
@ -201,10 +256,11 @@ class _SystemMessagePage extends State<SystemMessagePage> {
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
child: Row(
children: [
Expanded(child: GestureDetector(
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/system_details',arguments: {"msgType":5}).then((value) {
Navigator.of(context).pushNamed('/router/system_details',
arguments: {"msgType": 5}).then((value) {
setState(() {
msgNumber["5"] = 0;
});
@ -242,8 +298,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
backgroup: Color(0xFFFF441A),
fontSize: 8.sp,
radius: 100,
)
),
)),
)
],
),
@ -257,14 +312,12 @@ class _SystemMessagePage extends State<SystemMessagePage> {
),
)
],
)
)
),
Expanded(child:
GestureDetector(
))),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/system_details',arguments: {"msgType":6}).then((value) {
Navigator.of(context).pushNamed('/router/system_details',
arguments: {"msgType": 6}).then((value) {
setState(() {
msgNumber["6"] = 0;
});
@ -302,8 +355,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
backgroup: Color(0xFFFF441A),
fontSize: 8.sp,
radius: 100,
)
),
)),
)
],
),
@ -317,13 +369,12 @@ class _SystemMessagePage extends State<SystemMessagePage> {
),
),
],
)
)),
Expanded(child:
GestureDetector(
))),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/system_details',arguments: {"msgType":4}).then((value) {
Navigator.of(context).pushNamed('/router/system_details',
arguments: {"msgType": 4}).then((value) {
setState(() {
msgNumber["4"] = 0;
});
@ -361,8 +412,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
backgroup: Color(0xFFFF441A),
fontSize: 8.sp,
radius: 100,
)
),
)),
)
],
),
@ -376,9 +426,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
),
),
],
)
)
),
))),
],
),
);
@ -418,15 +466,17 @@ class _SystemMessagePage extends State<SystemMessagePage> {
return GestureDetector(
onTap: () {
if (messages[position].typed == 2)
Navigator.of(context)
.pushNamed('/router/system_details',arguments: {"msgType":2}).then((value) {
Navigator.of(context).pushNamed(
'/router/system_details',
arguments: {"msgType": 2}).then((value) {
setState(() {
msgNumber["2"] = 0;
});
});
else if (messages[position].typed == 3)
Navigator.of(context)
.pushNamed('/router/system_details',arguments: {"msgType":3}).then((value) {
Navigator.of(context).pushNamed(
'/router/system_details',
arguments: {"msgType": 3}).then((value) {
setState(() {
msgNumber["3"] = 0;
});
@ -436,8 +486,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
);
}),
],
)
);
));
}
Widget buildMessageItem(Message message) {
@ -477,13 +526,15 @@ class _SystemMessagePage extends State<SystemMessagePage> {
SizedBox(
width: 12.w,
),
Expanded(child:Column(
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(child:Text(
Expanded(
child: Text(
(message.typed == 1)
? S.of(context).xitongtongzhi
: (message.typed == 2)
@ -504,20 +555,23 @@ class _SystemMessagePage extends State<SystemMessagePage> {
),
],
),
SizedBox(height:4.h,),
(message.typed != 3) ?
Row(
SizedBox(
height: 4.h,
),
(message.typed != 3)
? Row(
mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Text(
Expanded(
child: Text(
S.of(context).ninyouyigexindedingdan,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF353535),
),
),),
),
),
if (msgNumber["2"].toString() != "0")
RoundButton(
width: 16,
@ -530,13 +584,13 @@ class _SystemMessagePage extends State<SystemMessagePage> {
radius: 100,
),
],
):
Row(
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Text(
Expanded(
child: Text(
message.content,
style: TextStyle(
fontSize: 10.sp,

120
lib/mine/mine_page.dart

@ -8,6 +8,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart';
import 'package:huixiang/mine/mine_view/mine_navbar.dart';
import 'package:huixiang/mine/mine_view/mine_order.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/examine_instance.dart';
@ -26,13 +27,15 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:dio/dio.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../retrofit/data/coupon.dart';
import '../retrofit/data/page.dart';
import '../utils/flutter_utils.dart';
import 'mine_view/mine_item.dart';
import 'mine_view/mine_view.dart';
class MinePage extends StatefulWidget {
MinePage(Key key) : super(key: key);
@override
State<StatefulWidget> createState() {
return MinePageState();
@ -46,17 +49,21 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
SocialInfo infoNumber;
final RefreshController _refreshController = RefreshController();
int totalMsg = 0;
String couponNum;
_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(() {});
}
@ -71,6 +78,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
super.initState();
querySocialInfo();
queryMsgStats();
// queryCard();
eventBus.on<EventType>().listen((event) {
print("EventType: ${event.type}");
@ -110,6 +118,22 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
ranks.addAll(rankData.data);
}
BaseData<PageInfo<Coupon>> baseData = await apiService.queryCard({
"centre": true,
"pageNum": 1,
"pageSize": 10,
"searchKey": "",
"state": 1
}).catchError((error) {
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
couponNum = baseData.data.total;
_refreshController.refreshCompleted();
} else {
_refreshController.refreshFailed();
}
BaseData<UserInfo> baseDate =
await apiService.queryInfo().catchError((onError) {
_refreshController.refreshFailed();
@ -165,7 +189,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;
@ -199,14 +224,13 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
child: SingleChildScrollView(
child: Container(
child: Stack(
// alignment: Alignment.centerRight,
children: [
Container(
height: 502.h,
height: 306.h,
decoration: BoxDecoration(
// color: Color(0xFF32A060)
image: DecorationImage(
fit: BoxFit.cover,
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
@ -216,40 +240,43 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
builder: (context, snapshot) {
return Column(
children: [
///
MineView(
userInfo,
() {
MineView(userInfo, () {
_toUserInfo();
},
() {
}, () {
toIntegralPage();
},
(){
}, () {
setState(() {
totalMsg = 0;
});
}, totalMsg,
infoNumber,
ranks
),
//////
MineNavbar(
couponNum,
userInfo,
infoNumber,
() {
toIntegralPage();
},
totalMsg,
infoNumber
),
/// VIP等级信息
MineVipEntry(
tag: "vip",
ranks: ranks,
userInfo: userInfo,
rank: double.tryParse(
userInfo?.expendAmount ?? "0")
.toInt(),
rankMax:
userInfo?.memberRankVo?.nextOrigin ?? 0,
createTime: userInfo?.createTime ?? "",
),
// MineVipEntry(
// tag: "vip",
// ranks: ranks,
// userInfo: userInfo,
// rank: double.tryParse(userInfo?.expendAmount ?? "0")
// .toInt(),
// rankMax: userInfo?.memberRankVo?.nextOrigin ?? 0,
// createTime: userInfo?.createTime ?? "",
// ),
///
MineOrderView(),
// MineOrderView(),
///广
spreadImage(),
@ -265,7 +292,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
// /////
// attention(),
//
// ///
// WalletCoupon(),
],
@ -293,8 +320,9 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
);
},
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),
margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 30.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,7 +348,9 @@ 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,
@ -331,23 +361,25 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
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,7 +422,7 @@ 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: 30.h, left: 14.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/invite_friends');

8
lib/mine/mine_view/community_follow.dart

@ -14,6 +14,11 @@ import 'package:shared_preferences/shared_preferences.dart';
import '../fans_page.dart';
class CommunityFollow extends StatefulWidget {
final Map<String, dynamic> arguments;
CommunityFollow({this.arguments});
@override
State<StatefulWidget> createState() {
return _CommunityFollow();
@ -24,11 +29,13 @@ class _CommunityFollow extends State<CommunityFollow>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
ApiService apiService;
SocialInfo infoNumber;
int status;
@override
void initState() {
super.initState();
querySocialInfo();
status = widget.arguments["status"];
}
///(//)
@ -51,6 +58,7 @@ class _CommunityFollow extends State<CommunityFollow>
Widget build(BuildContext context) {
return DefaultTabController(
length: 2,
initialIndex: status,
child: Scaffold(
appBar: MyAppBar(
title: "",

2
lib/mine/mine_view/mine_item.dart

@ -20,7 +20,7 @@ class _MineItem extends State<MineItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.fromLTRB(16.w,0.h, 16.w, 15.h),
margin: EdgeInsets.fromLTRB(16.w,0.h, 16.w,30.h),
// padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration(
color: Colors.white,

301
lib/mine/mine_view/mine_navbar.dart

@ -0,0 +1,301 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../retrofit/data/social_info.dart';
import '../../retrofit/data/user_info.dart';
class MineNavbar extends StatefulWidget {
final String couponNum;
final UserInfo userInfo;
final SocialInfo infoNumber;
final GestureTapCallback toIntegralPage;
MineNavbar(this.couponNum,this.userInfo,this.infoNumber,this.toIntegralPage);
@override
State<StatefulWidget> createState() {
return _MineNavbar();
}
}
class _MineNavbar extends State<MineNavbar> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.fromLTRB(13.5.w, 15.h, 13.5.w,30.h),
padding: EdgeInsets.only(
top: 26.h,
bottom: 24.h,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed(
'/router/order_history_page',
arguments: {"status": 0});
});
},
child: mineTopItem(
S.of(context).dingdan,
"assets/image/mine_order.webp",
),
),
),
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/mine_wallet');
});
},
child: mineTopItem(
"钱包",
"assets/image/wallet.webp",
),
),
),
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/vip_pay_code');
});
},
child: mineTopItem(
"会员码",
"assets/image/vip_code.webp",
),
),
),
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/setting_page');
});
},
child: mineTopItem(
S.of(context).shezhi,
"assets/image/set.webp",
),
),
),
],
),
Container(
width: double.infinity,
margin: EdgeInsets.only(top:17.h,left: 16.w,right: 16.w,bottom: 27.h),
child: Flex(
children: List.generate(120, (_) {
return SizedBox(
width: 1,
height: 1,
child: DecoratedBox(
decoration: BoxDecoration(color: Color(0xFFEDEDED)),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
Row(
children: [
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/coupon_page');
});
},
child: mineBottomItem(
widget?.couponNum ?? "0",
S.of(context).youhuiquan,
),
),
),
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
widget.toIntegralPage();
});
},
child: mineBottomItem(
widget?.userInfo?.points?? "0",
"积分",
),
),
),
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/communityFollow',arguments: {
"status":0
});
});},
child: mineBottomItem(
"${widget?.infoNumber?.follow ?? "0"}",
S.of(context).guanzhu,
),
),
),
///
Expanded(
child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/communityFollow',arguments: {
"status":1
});
});
},
child: mineBottomItem(
"${widget?.infoNumber?.fans ?? "0"}",
S.of(context).fensi,
),
),
),
],
)
],
),
);
}
///
Widget mineTopItem(text, icon) {
return Container(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 6.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
icon,
width: 23,
height: 23,
),
SizedBox(
height: 5.h,
),
Text(
text,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 12.sp,
color: Color(0xFF0D0D0D),
),
),
],
),
);
}
///
Widget mineBottomItem(textTop, text) {
return Container(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 6.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
textTop,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 18.sp,
color: Color(0xFF000000),
),
),
SizedBox(
height:11.h,
),
Text(
text,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 12.sp,
color: Color(0xFF4D4D4D),
),
),
],
),
);
}
}

172
lib/mine/mine_view/mine_view.dart

@ -3,12 +3,9 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_svg/svg.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/msg_stats.dart';
import 'package:huixiang/retrofit/data/social_info.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
@ -21,6 +18,9 @@ import 'package:huixiang/view_widget/request_permission.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../retrofit/data/rank.dart';
import '../../view_widget/mine_vip_entry.dart';
// import 'package:qrscan/qrscan.dart' as scanner;
class MineView extends StatefulWidget {
@ -30,8 +30,10 @@ class MineView extends StatefulWidget {
final Function messageZero;
final int totalMsg;
final SocialInfo infoNumber;
final List<Rank> ranks;
MineView(this.userInfo, this.toUserInfo, this.toIntegralPage,this.messageZero,this.totalMsg,this.infoNumber);
MineView(this.userInfo, this.toUserInfo, this.toIntegralPage,
this.messageZero, this.totalMsg, this.infoNumber,this.ranks);
@override
State<StatefulWidget> createState() {
@ -41,6 +43,7 @@ class MineView extends StatefulWidget {
class _MineView extends State<MineView> {
ApiService apiService;
String levelText = "普通用户";
///
queryWiped(memberCouponId) async {
@ -60,8 +63,6 @@ class _MineView extends State<MineView> {
}
}
@override
Widget build(BuildContext context) {
return Column(
@ -77,7 +78,9 @@ class _MineView extends State<MineView> {
alignment: Alignment.center,
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/system_msg_page').then((value) {
Navigator.of(context)
.pushNamed('/router/system_msg_page')
.then((value) {
widget.messageZero();
});
},
@ -115,14 +118,11 @@ class _MineView extends State<MineView> {
backgroup: Color(0xFFFF441A),
fontSize: 8.sp,
radius: 100,
)
),
)),
)
],
),
)
)
),
))),
InkWell(
onTap: () {
toScan();
@ -137,21 +137,21 @@ class _MineView extends State<MineView> {
),
),
),
InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/setting_page');
},
child: Container(
padding: EdgeInsets.all(8.h),
margin: EdgeInsets.only(right: 12.w),
child: Image.asset(
"assets/image/icon_mine_setting.webp",
width: 32,
height: 32,
color: Colors.white,
),
),
),
// InkWell(
// onTap: () {
// Navigator.of(context).pushNamed('/router/setting_page');
// },
// child: Container(
// padding: EdgeInsets.all(8.h),
// margin: EdgeInsets.only(right: 12.w),
// child: Image.asset(
// "assets/image/icon_mine_setting.webp",
// width: 32,
// height: 32,
// color: Colors.white,
// ),
// ),
// ),
],
),
),
@ -188,7 +188,8 @@ class _MineView extends State<MineView> {
///
activityShowAlertDialog(result.toString());
return;
}if(result.toString().contains("type\":\"wiped")){
}
if (result.toString().contains("type\":\"wiped")) {
///
queryWiped(jsonDecode(result.toString())["memberCouponId"]);
return;
@ -213,6 +214,19 @@ class _MineView extends State<MineView> {
"tableId": int.tryParse(tableId),
},
);
return;
}
String title = uri.queryParameters["title"];
if (result.toString().contains("http:") ||
result.toString().contains("https:")) {
///
Navigator.of(context).pushNamed(
'/router/scan_web',
arguments: {
"result": result,
"title":title,
},
);
}
} else {
await Permission.camera.request();
@ -248,21 +262,21 @@ class _MineView extends State<MineView> {
MImage(
widget.userInfo == null ? "" : widget.userInfo.headimg,
isCircle: true,
width: 58,
height: 58,
width: 60,
height: 60,
fit: BoxFit.cover,
errorSrc: "assets/image/default_user.webp",
fadeSrc: "assets/image/default_user.webp",
),
Positioned(
bottom: 0,
right: 2.w,
child: Image.asset(
"assets/image/icon_mine_edit.webp",
width: 17,
height: 17,
),
),
// Positioned(
// bottom: 0,
// right: 2.w,
// child: Image.asset(
// "assets/image/icon_mine_edit.webp",
// width: 17,
// height: 17,
// ),
// ),
],
),
),
@ -300,7 +314,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,
@ -325,34 +339,35 @@ class _MineView extends State<MineView> {
color: Color(0xFFFFFFFF),
),
)
: Row(
children: [
Text(
"${S.of(context).guanzhu} ${widget?.infoNumber?.follow ?? "0"}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
fontFamily: 'JDZhengHT',
color: Color(0xFFFFFFFF),
),
),
Container(
width: 1.w,
height: 12.h,
margin: EdgeInsets.symmetric(horizontal: 3.w),
color: Color(0xFFFFFFFF),
),
Text(
"${S.of(context).fensi} ${widget?.infoNumber?.fans ?? "0"}",
style: TextStyle(
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
),
],
),
: mineVip(),
// Row(
// children: [
// Text(
// "${S.of(context).guanzhu} ${widget?.infoNumber?.follow ?? "0"}",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.regular,
// fontFamily: 'JDZhengHT',
// color: Color(0xFFFFFFFF),
// ),
// ),
// Container(
// width: 1.w,
// height: 12.h,
// margin: EdgeInsets.symmetric(horizontal: 3.w),
// color: Color(0xFFFFFFFF),
// ),
// Text(
// "${S.of(context).fensi} ${widget?.infoNumber?.fans ?? "0"}",
// style: TextStyle(
// fontSize: 12.sp,
// fontFamily: 'JDZhengHT',
// fontWeight: MyFontWeight.regular,
// color: Color(0xFFFFFFFF),
// ),
// ),
// ],
// ),
],
),
),
@ -375,12 +390,12 @@ class _MineView extends State<MineView> {
widget.toIntegralPage();
},
child: Container(
padding: EdgeInsets.only(top: 4.h, bottom: 4.h, right: 16.w,left: 7.w),
padding: EdgeInsets.only(
top: 4.h, bottom: 4.h, right: 16.w, left: 7.w),
margin: EdgeInsets.only(right: 14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white
),
color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -410,4 +425,19 @@ class _MineView extends State<MineView> {
),
);
}
Widget mineVip(){
return Container(
child: MineVipEntry(
tag: "vip",
ranks: widget.ranks,
userInfo: widget.userInfo,
rank: double.tryParse(widget.userInfo?.expendAmount ?? "0")
.toInt(),
rankMax: widget.userInfo?.memberRankVo?.nextOrigin ?? 0,
createTime: widget.userInfo?.createTime ?? "",
),
);
}
}

2
lib/mine/mine_wallet_page.dart

@ -458,7 +458,7 @@ class _MineWalletPage extends State<MineWalletPage> {
Expanded(
flex: 7,
child: Text(
userBill.title,
userBill.type,
style: TextStyle(
color: Colors.black,
fontSize: 12.sp,

79
lib/mine/personal_page.dart

@ -109,18 +109,15 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
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) {
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,
@ -146,6 +143,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
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;
@ -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();
}
@ -170,6 +166,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
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;
@ -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)) {
@ -324,7 +320,9 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
@override
Widget build(BuildContext context) {
return SmartRefresher(
return Scaffold(
backgroundColor: Colors.white,
body:SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: true,
@ -350,7 +348,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 +357,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 +400,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 +436,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 +470,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 +483,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 +508,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
S.of(context).guanzhu,
@ -542,7 +542,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
S.of(context).fensi,
@ -575,7 +575,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
),
),
SizedBox(
height: 4,
height: 4.h,
),
Text(
S.of(context).dongtai,
@ -608,10 +608,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 +631,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,12 +640,13 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
fontWeight: MyFontWeight.semi_bold,
),
)),
dynamicList()
dynamicList(),
],
),
),
],
)),
)
);
}
@ -657,8 +658,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,
@ -672,7 +673,7 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
builder: (context) => PhotoViewGalleryScreen(
images: [
(memberInfor?.headimg ?? "").isEmpty
? "https://lmg.jj20.com/up/allimg/tx30/09041130358711081.jpg"
? "https://i.postimg.cc/Pq6vjfnw/default-1.webp"
: memberInfor?.headimg
], //list
index: 0, //index
@ -691,7 +692,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 +717,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 +752,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:80.h),
)
: ListView.builder(
physics: NeverScrollableScrollPhysics(),
@ -760,9 +763,9 @@ class _PersonalPage extends State<PersonalPage> with WidgetsBindingObserver {
articles[position],
memberId == "0" ? 1 : 0,
exitFull: () {
// setState(() {
// _onRefresh();
// });
setState(() {
_onRefresh();
});
},
removalDynamic: () {
setState(() {

4
lib/mine/recharge_page.dart

@ -296,6 +296,7 @@ class _RechargePage extends State<RechargePage> {
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 2;
@ -328,6 +329,7 @@ class _RechargePage extends State<RechargePage> {
),
SizedBox(height:10.h),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 3;
@ -632,7 +634,7 @@ class _RechargePage extends State<RechargePage> {
Widget checkView(var index) {
return Container(
padding: EdgeInsets.only(right: 16.w),
padding: EdgeInsets.only(right: 16.w,left: 46.w),
alignment: Alignment.center,
child: Image.asset(
checkIndex != index

58
lib/mine/scan_web.dart

@ -0,0 +1,58 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:webview_flutter/webview_flutter.dart';
class ScanWeb extends StatefulWidget {
final Map<String, dynamic> arguments;
ScanWeb({this.arguments});
@override
State<StatefulWidget> createState() {
return _ScanWeb();
}
}
class _ScanWeb extends State<ScanWeb> {
var controller = new ScrollController();
WebViewController webViewController;
String result;
String title;
@override
void initState() {
super.initState();
result = widget.arguments["result"];
title = widget.arguments["title"];
EasyLoading.show(status: S.current.zhengzaijiazai);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title:title ?? "",
titleColor: Colors.black,
background: Colors.transparent,
leadingColor: Colors.black,
),
body:
WebView(
initialUrl:result,
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController controller){
webViewController =controller;
},
onProgress: (int progress) async {
if(widget.arguments["title"] != null)
return;
title = await webViewController?.getTitle();
setState((){});
EasyLoading.dismiss();
},
),
);
}
}

33
lib/mine/user_info_page.dart

@ -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')),
});
}
@ -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),
@ -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;
@ -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(),
],
),
@ -378,8 +387,7 @@ class _UserInfoPage extends State<UserInfoPage> {
child: Icon(
Icons.keyboard_arrow_right,
size: 20.sp,
)
);
));
}
Widget buildValue(type, value) {
@ -419,7 +427,8 @@ class _UserInfoPage extends State<UserInfoPage> {
),
);
} else {
return Expanded(child: Text(
return Expanded(
child: Text(
value,
maxLines: 1,
overflow: TextOverflow.ellipsis,

192
lib/mine/vip_pay_code.dart

@ -0,0 +1,192 @@
import 'dart:async';
import 'dart:convert';
import 'package:barcode_widget/barcode_widget.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bmflocation/flutter_bmflocation.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/product.dart';
import 'package:huixiang/retrofit/data/vip_card.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/scan.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/location.dart';
import 'package:huixiang/utils/painter_bg.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../retrofit/data/user_info.dart';
import '../view_widget/classic_header.dart';
class VipPayCode extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _VipPayCode();
}
}
class _VipPayCode extends State<VipPayCode> {
ApiService apiService;
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
@override
void initState() {
super.initState();
queryUser();
}
UserInfo userInfo;
final RefreshController refreshController = RefreshController();
bool vipCodeText = false;
Timer _timer;
bool isDispose = false;
///
queryUser() async {
try{
SharedPreferences value = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {
refreshController.refreshFailed();});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)),
});
setState(() {});
refreshController.refreshCompleted();
}else{
refreshController.refreshFailed();
}
}finally{
refreshCode();
}
}
refreshCode(){
if (_timer != null) return;
const oneSec = const Duration(minutes: 2);
var callback = ((timer) {
if (isDispose) return;
queryUser();
});
_timer = Timer.periodic(oneSec, callback);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "会员码",
background: Color(0xFF32A060),
titleColor: Colors.white,
brightness: Brightness.dark,
leadingColor: Colors.white,
),
body: Container(
color: Color(0xFF32A060),
height: double.infinity,
padding: EdgeInsets.only(top: 45.h),
child: Stack(
alignment: Alignment.topCenter,
children: [
Container(
color: Color(0xFF32A060),
// height: 485.h,
padding: EdgeInsets.only(top: 47.h),
child: Container(
height: 438.h,
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(6),
),
margin: EdgeInsets.symmetric(horizontal: 16.w,),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 46.h,),
Text(
"请保持屏幕常亮,并对准扫码盒或枪口",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF4D4D4D),
),
),
SizedBox(height: 30.h,),
QrImage(
data: userInfo != null
? (userInfo?.vipScanNo ?? "")
: "",
version: QrVersions.auto,
size: 200.w,
gapless: true,
),
],
),
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(56),
color: Color(0xFF32A060),
border: Border.all(
color: Color(0xFF32A060),
width: 8.w,
),
),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(56),
color: Colors.white,
border: Border.all(
color: Colors.white,
width: 2.w,
),
),
child: MImage(
userInfo?.headimg ?? "",
width: 80,
height: 80,
radius: BorderRadius.circular(56),
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
),
),
],
),
),
);
}
}

17
lib/order/edit_remarks_page.dart

@ -5,6 +5,9 @@ import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class EditRemarksPage extends StatefulWidget {
final Map<String, dynamic> arguments;
EditRemarksPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _EditRemarksPage();
@ -14,6 +17,14 @@ class EditRemarksPage extends StatefulWidget {
class _EditRemarksPage extends State<EditRemarksPage> {
TextEditingController commentTextController = TextEditingController();
@override
void initState() {
super.initState();
if((widget.arguments["remake"]??"") != "")
commentTextController.text = widget.arguments["remake"];
}
@override
Widget build(BuildContext context) {
return Scaffold(
@ -75,7 +86,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
controller: commentTextController,
keyboardType: TextInputType.multiline,
maxLines: 10,
decoration: InputDecoration(
decoration:
InputDecoration(
isDense: true,
hintText: '请填写备注信息,例如:面包切一刀',
hintStyle: TextStyle(
@ -97,7 +109,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
),
GestureDetector(
onTap: (){
Navigator.pop(context,commentTextController.text);
String notes = commentTextController.text;
Navigator.pop(context,notes);
},
child: Container(
padding: EdgeInsets.all(16.h),

2
lib/order/exchange_order_page.dart

@ -878,7 +878,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
width: 10,
),
Text(
S.of(context).pingtaiyue,
S.of(context).huixiangqianbao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),

6
lib/order/order_detail_page.dart

@ -34,11 +34,11 @@ class OrderDetailPage extends StatefulWidget {
class _OrderDetailPage extends State<OrderDetailPage> {
ApiService apiService;
MinApiService minService;
int jumpState;
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) {
apiService = ApiService(
Dio(),
@ -48,6 +48,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
);
queryDetails();
});
jumpState = widget.arguments["jumpState"];
}
///
@ -183,6 +184,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
paySelected,
_orderCancel,
orderInfo,
jumpState
),
///
@ -225,7 +227,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
payResult(BaseData baseData) async{
await queryDetails();
Future.delayed(Duration(milliseconds: 400), () {
Future.delayed(Duration(milliseconds: 800), () {
EasyLoading.dismiss();
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
});

21
lib/order/order_history_page.dart

@ -155,7 +155,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
return InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/order_details',
arguments: {"id": orderInfos[position].id});
arguments: {"id": orderInfos[position].id,"jumpState":2});
},
child: orderItem(orderInfos[position]),
);
@ -212,6 +212,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
}
setState(() {});
} else {
SmartDialog.showToast(baseData?.msg ?? "",alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
}
@ -468,6 +469,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
text: orderInfo.finalPayPrice,
style: TextStyle(
fontSize: 12.sp,
fontWeight: FontWeight.bold,
color: Colors.black,
),
@ -568,16 +570,11 @@ class _OrderHistoryList extends State<OrderHistoryList>
queryDetails(id) async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
apiService = ApiService(Dio(),
context: context, token: value.getString("token"), showLoading: true);
}
BaseData<OrderInfo> baseData = await apiService
.orderDetail(id)
.catchError((error) {});
BaseData<OrderInfo> baseData =
await apiService.orderDetail(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
return baseData.data;
}
@ -598,7 +595,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
minService,
orderInfo,
(BaseData baseData) {
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
SmartDialog.showToast(
baseData?.msg == "ok" ? "订单支付成功" : baseData?.msg,
alignment: Alignment.center);
Future.delayed(Duration(seconds: 3), () {
_onRefresh();
});

10
lib/order/order_view/order_address.dart

@ -22,6 +22,7 @@ class OrderAddress extends StatefulWidget {
final Function orderCancel;
final Function() carryOnPay;
final OrderInfo orderInfo;
final int jumpState;
OrderAddress(
this.orderStatus,
@ -33,7 +34,8 @@ class OrderAddress extends StatefulWidget {
this.center,
this.carryOnPay,
this.orderCancel,
this.orderInfo,);
this.orderInfo,
this.jumpState);
@override
State<StatefulWidget> createState() {
@ -271,7 +273,10 @@ class _OrderAddress extends State<OrderAddress> {
widget.orderInfo.storeVO.storeName,
);
} else {
Navigator.of(context).pushNamed(
if(widget.jumpState == 1){
Navigator.of(context).pop();
}else if(widget.jumpState == 2){
Navigator.of(context).popAndPushNamed(
'/router/store_order',
arguments: {
"id": widget.orderInfo.storeVO.id,
@ -280,6 +285,7 @@ class _OrderAddress extends State<OrderAddress> {
},
);
}
}
}

8
lib/order/order_view/order_pay_selected.dart

@ -70,7 +70,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
"助农积分",
S.of(context).zhunongjifen,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -101,7 +101,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child: Text(
S.of(context).pingtaiyue,
S.of(context).huixiangqianbao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -132,7 +132,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
S.of(context).dianpuyue,
S.of(context).mendianyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -164,7 +164,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
"绿币余额",
S.of(context).lvbizhifu,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),

367
lib/order/write_off_page.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:barcode_widget/barcode_widget.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -13,9 +14,13 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../view_widget/classic_header.dart';
import '../view_widget/my_footer.dart';
class WriteOffPage extends StatefulWidget {
final arguments;
@ -31,6 +36,7 @@ class _WriteOffPage extends State<WriteOffPage> {
dynamic coupon;
ApiService apiService;
CouponDetail queryCoupon;
final RefreshController refreshController = RefreshController();
@override
void initState() {
@ -79,23 +85,43 @@ class _WriteOffPage extends State<WriteOffPage> {
background: Color(0xFF32A060),
leadingColor: Colors.white,
),
body: Container(
body: SmartRefresher(
controller: refreshController,
enablePullDown: false,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
Container(
alignment: Alignment.topCenter,
height: 530.h,
child: Stack(
alignment: Alignment.topCenter,
children: [
Image.asset(
"assets/image/icon_write_off_bg.webp",
"assets/image/write_off_bg.webp",
width: MediaQuery.of(context).size.width * 0.912,
height: 540.h,
fit: BoxFit.fill,
),
LayoutBuilder(builder: (context, constraints) {
return Container(
alignment: Alignment.center,
width: constraints.constrainWidth() * 0.912,
padding:EdgeInsets.only(top: 24.h),
child: Column(
children: [
Expanded(
child: Container(
Container(
child: Column(
children: [
Text(
@ -106,7 +132,7 @@ class _WriteOffPage extends State<WriteOffPage> {
color: Color(0xFF353535)),
),
SizedBox(
height: 8.h,
height:11.h,
),
Text(
(coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
@ -122,10 +148,8 @@ class _WriteOffPage extends State<WriteOffPage> {
),
alignment: Alignment.center,
),
flex: 6,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
margin: EdgeInsets.only(left: 20.w, right: 20.w,top:16.h,bottom:30.h),
child: MySeparator(
width: 5.w,
height: 1.h,
@ -164,7 +188,7 @@ class _WriteOffPage extends State<WriteOffPage> {
),
),
SizedBox(
height: 12.h,
height: 15.h,
),
BarcodeWidget(
barcode: Barcode.code128(useCode128C: true),
@ -197,11 +221,266 @@ class _WriteOffPage extends State<WriteOffPage> {
height: 1.h,
color: Color(0xFFA29E9E),
),
margin: EdgeInsets.only(left: 20.w, right: 20.w),
margin: EdgeInsets.only(left: 20.w, right: 20.w,bottom:20.h),
),
],
),
);
}),
//
// LayoutBuilder(builder: (context, constraints) {
// return Container(
// width: constraints.constrainWidth() * 0.912,
// child: Column(
// children: [
// Expanded(
// child: Container(
// child: Column(
// children: [
// Text(
// coupon != null ? coupon["couponName"] : "",
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: FontWeight.bold,
// color: Color(0xFF353535)),
// ),
// SizedBox(
// height: 8.h,
// ),
// Text(
// (coupon["useStartTime"] == null || coupon["useEndTime"] == null) ? "" : S.of(context).youxiaoqi(
// "${coupon["useStartTime"].replaceAll("-", ".").split(" ")[0]}-${coupon["useEndTime"].replaceAll("-", ".").split(" ")[0]}"),
// style: TextStyle(
// fontSize: 12.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// ),
// alignment: Alignment.center,
// ),
// flex: 6,
// ),
// Container(
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
// child: MySeparator(
// width: 5.w,
// height: 1.h,
// color: Color(0xFFA29E9E),
// ),
// ),
// Expanded(
// child: Container(
// alignment: Alignment.center,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(height: 5.h,),
// Text(
// coupon != null
// ? "${coupon["memberCouponId"].substring(0, 4)} "
// "${coupon["memberCouponId"].substring(4, 8)} "
// "${coupon["memberCouponId"].substring(8, 12)} "
// "${coupon["memberCouponId"].substring(12, 16)} "
// "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
// : "",
// style: TextStyle(
// fontSize: 14.sp,
// wordSpacing: coupon == null
// ? 10
// : (MediaQuery.of(context).size.width -
// 64.w) /
// (((coupon["memberCouponId"].length) * 4)),
// letterSpacing: coupon == null
// ? 8
// : (MediaQuery.of(context).size.width -
// 64.w) /
// (((coupon["memberCouponId"].length) * 4)),
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFF353535),
// ),
// ),
// SizedBox(
// height: 12.h,
// ),
// BarcodeWidget(
// barcode: Barcode.code128(useCode128C: true),
// data: coupon != null ? coupon["memberCouponId"] : "",
// height: 72.h,
// color: Colors.black,
// drawText: false,
// ),
// SizedBox(
// height: 16.h,
// ),
// Expanded(child: QrImage(
// data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
// version: QrVersions.auto,
// size: 200.w,
// gapless: true,
// ),),
// SizedBox(
// height: 35.h,
// ),
// ],
// ),
// margin: EdgeInsets.symmetric(horizontal: 20.w),
// ),
// flex: 27,
// ),
// Container(
// child: MySeparator(
// width: 5.w,
// height: 1.h,
// color: Color(0xFFA29E9E),
// ),
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// width: 3.w,
// height: 15.h,
// margin:
// EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(3),
// color: Color(0xFF20662A),
// ),
// ),
// Text(
// S.of(context).shiyongtiaojian,
// style: TextStyle(
// fontWeight: FontWeight.bold,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Expanded(
// child: Text(
// S
// .of(context)
// .qianwanghuixiangmendianduihuanhexiao,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// color: Color(0xFF353535)),
// ),
// flex: 1,
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// width: 3.w,
// height: 15.h,
// margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(3),
// color: Color(0xFF20662A),
// ),
// ),
// Text(
// S.of(context).shiyongshuoming,
// style: TextStyle(
// fontWeight: FontWeight.bold,
// fontSize: 14.sp,
// color: Color(0xFF353535)),
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Text(
// S.of(context).zitiduihuanquan,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Text(
// S.of(context).huixiangrenyimendian,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// flex: 13,
// ),
// Expanded(
// child: Container(),
// flex: 3,
// ),
// ],
// ),
// );
// })
],
),
),
Container(
width: MediaQuery.of(context).size.width * 0.912,
padding: EdgeInsets.only(left:18.w, bottom:15.h, right:18.w),
margin:EdgeInsets.only(bottom: 21.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(6),
bottomRight: Radius.circular(6),),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 3,
spreadRadius: 0,
),
],
),
Expanded(
child: Container(
padding: EdgeInsets.fromLTRB(20.w, 15.h, 20.w, 15.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
@ -230,6 +509,7 @@ class _WriteOffPage extends State<WriteOffPage> {
),
],
),
SizedBox(height:12.h,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@ -245,12 +525,14 @@ class _WriteOffPage extends State<WriteOffPage> {
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
height: 1.5.h,
color: Color(0xFF353535)),
),
flex: 1,
),
],
),
SizedBox(height:16.h,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@ -258,7 +540,7 @@ class _WriteOffPage extends State<WriteOffPage> {
Container(
width: 3.w,
height: 15.h,
margin: EdgeInsets.fromLTRB(4, 7, 4, 7),
margin: EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A),
@ -273,54 +555,25 @@ class _WriteOffPage extends State<WriteOffPage> {
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 11.w,
),
Text(
S.of(context).zitiduihuanquan,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 11.w,
),
Text(
S.of(context).huixiangrenyimendian,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
Container(
child: Html(
data:
coupon != null ? coupon["remark"] : "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
)
],
),
)
],
),
),
flex: 13,
),
Expanded(
child: Container(),
flex: 3,
),
],
),
);
})
],
),
),
);

72
lib/qr/qr_code_scan.dart

@ -57,19 +57,43 @@ class _QrCodeScanPage extends State<QrCodeScanPage> {
right: 0,
),
Positioned(
child: MyAppBar(
title: "扫码",
titleColor: Colors.white,
leadingColor: Colors.white,
brightness: Brightness.dark,
background: Colors.transparent,
action: Container(
alignment: Alignment.center,
margin: EdgeInsets.only(right: 16.w),
child: GestureDetector(
child: Container(
margin: EdgeInsets.only(left:12.w,right: 16.w,top: 16.h),
child:Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pop();
},
child: Container(
padding: EdgeInsets.symmetric(horizontal:10.w),
alignment: Alignment.centerLeft,
child: Image.asset(
"assets/image/return_left.webp",
fit: BoxFit.fill,
color: Colors.white,
),
),
),
Spacer(),
Expanded(child:Text(
S.of(context).saoma,
style: TextStyle(
color: Colors.white,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
pickImage();
},
child:Container(
padding: EdgeInsets.symmetric(horizontal:10.w),
child: Text(
S.of(context).xiangce,
style: TextStyle(
@ -80,8 +104,34 @@ class _QrCodeScanPage extends State<QrCodeScanPage> {
),
),
),
],
),
top: 0,
),
// MyAppBar(
// title: "扫码",
// titleColor: Colors.white,
// leadingColor: Colors.white,
// brightness: Brightness.dark,
// background: Colors.transparent,
// action: Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(right: 16.w),
// child: GestureDetector(
// onTap: () {
// pickImage();
// },
// child: Text(
// S.of(context).xiangce,
// style: TextStyle(
// color: Colors.black,
// fontSize: 18.sp,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ),
// ),
top:MediaQuery.of(context).padding.top,
left: 0,
right: 0,
),

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;

3
lib/retrofit/data/user_info.dart

@ -20,6 +20,7 @@ class UserInfo {
UserInfo();
String vipNo;
String vipScanNo;
String nickname;
String headimg;
bool userType;
@ -54,6 +55,7 @@ class UserInfo {
factory UserInfo.fromJson(Map<String, dynamic> json) =>
UserInfo()
..vipNo = json['vipNo'] as String
..vipScanNo =json['vipScanNo'] as String
..nickname = json['nickname'] as String
..headimg = json['headimg'] as String
..userType = json['userType'] as bool
@ -87,6 +89,7 @@ class UserInfo {
Map<String, dynamic> toJson() => <String, dynamic>{
'vipNo': this.vipNo,
'vipScanNo':this.vipScanNo,
'nickname': this.nickname,
'headimg': this.headimg,
'userType': this.userType,

2
lib/retrofit/retrofit_api.dart

@ -497,7 +497,7 @@ abstract class ApiService {
Future<BaseData> wiped(@Path("memberCouponId") String memberCouponId);
///
@GET("/coupon/detail/")
@GET("/coupon/detail/{memberCouponId}")
Future<BaseData<CouponDetail>> couponDetail(@Path("") String memberCouponId);
///

4
lib/retrofit/retrofit_api.g.dart

@ -866,7 +866,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<PageInfo<OrderInfo>>.fromJson(
_result.data,
(json) => PageInfo<OrderInfo>.fromJson(
(json) => ((json??"") == "")?null:PageInfo<OrderInfo>.fromJson(
json,
(json) => OrderInfo.fromJson(json),
),
@ -1862,7 +1862,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/',
final _result = await _dio.request<Map<String, dynamic>>('coupon/detail/$memberCouponId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',

6
lib/setting/logout_ing.dart

@ -422,7 +422,7 @@ class _LogoutIng extends State<LogoutIng> {
Padding(
padding: EdgeInsets.only(bottom: 13),
child: Text(
(balance == "0.00" && money == "0.00") ? "由于当于帐号已注销,系统将自动退出登录":"您的平台余额及店铺余额未使用完!",
(balance == "0.00" && money == "0.00") ? "由于当于帐号已注销,系统将自动退出登录":"您的回乡钱包余额及门店余额未使用完!",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.sp,
@ -434,7 +434,7 @@ class _LogoutIng extends State<LogoutIng> {
),
if(balance != "0.00" && money != "0.00" || balance != "0.00" || money != "0.00")
Text(
"${S.of(context).pingtaiyue}$money",
"${S.of(context).huixiangqianbao}$money",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.sp,
@ -444,7 +444,7 @@ class _LogoutIng extends State<LogoutIng> {
),
if(balance != "0.00" && money != "0.00" || balance != "0.00" || money != "0.00")
Text(
"${S.of(context).dianpuyue}:¥ $balance",
"${S.of(context).mendianyue}:¥ $balance",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.sp,

22
lib/settlement/settlement.dart

@ -82,7 +82,7 @@ class _Settlement extends State<Settlement> {
int count1 = 0;
String productId;
bool orderButton = false;
bool useVipPriceSelect = false;
bool useVipPriceSelect = true;
bool showVipTips = false;
bool isRaiseChannel = false;
@ -122,6 +122,7 @@ class _Settlement extends State<Settlement> {
storeId: storeId,
showLoading: false
);
queryMemberInfo();
if (promotions != null && promotions != "" && tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
@ -256,6 +257,20 @@ class _Settlement extends State<Settlement> {
}
}
///
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({
@ -683,6 +698,7 @@ class _Settlement extends State<Settlement> {
'/router/order_details',
arguments: {
"id": orderId,
"jumpState":1,
},
);
// Navigator.of(context).pop();
@ -756,7 +772,7 @@ class _Settlement extends State<Settlement> {
payChannel,
tableId ?? 0);
}, queryAddress, storeInfo, address,
selectedAddress, pageType),
selectedAddress, pageType,widget.arguments["distance"]),
SizedBox(
height: 16,
@ -795,7 +811,7 @@ class _Settlement extends State<Settlement> {
() {
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
arguments: {"remake":remakers}
).then((value) => {
setState(() {
if (value != null) remakers = value;

6
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -47,7 +47,7 @@ class ActivityCouponRemarks extends StatefulWidget {
}
class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
bool vipSelect = false;
bool vipSelect = true;
@override
Widget build(BuildContext context) {
@ -76,7 +76,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if(!(widget?.settleOrderInfo?.isRaise ?? false))
if(!(widget?.settleOrderInfo?.isRaise ?? false) && (widget?.settleOrderInfo?.memberVO?.isVip ?? false))
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -84,7 +84,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
Expanded(
flex: 1,
child: Text(
"VIP价格",
"VIP权益",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,

26
lib/settlement/settlement_view/distribution.dart

@ -26,9 +26,10 @@ class DistributionMode extends StatefulWidget {
final StoreInfo storeInfo;
final Address address;
final String pageType;
final double distance;
DistributionMode(this.queryOrderInfo, this.queryAddress, this.storeInfo,
this.address, this.selectedNewAddress, this.pageType);
this.address, this.selectedNewAddress, this.pageType, this.distance);
@override
State<StatefulWidget> createState() {
@ -261,11 +262,21 @@ class _DistributionMode extends State<DistributionMode> {
Column(
children: [
RoundButton(
// width: 41.w,
height: 13,
text: distance.length > 3
? "${distance}km"
: "距离您${distance}km",
? ((widget.distance ?? 0) > 1000
? "${((widget.distance ?? 0) / 1000 * 100).toInt() / 100.0}km"
: S.of(context).mi(
((widget.distance ?? 0) *
100)
.toInt() /
100.0))
: "距离您${(widget.distance ?? 0) > 1000 ?
"${((widget.distance ?? 0) / 1000 * 100).toInt() / 100.0}km"
: S.of(context).mi(((widget.distance ?? 0) * 100).toInt() / 100.0)}",
// distance.length > 3
// ? "${distance}km"
// : "距离您${distance}km",
textColor: Color(0xFF34A262),
fontWeight: MyFontWeight.semi_bold,
radius: 7.5,
@ -310,12 +321,13 @@ class _DistributionMode extends State<DistributionMode> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
(widget.storeInfo.storeName == "一心回乡商城") ?
Icon(
(widget.storeInfo.storeName == "一心回乡商城")
? Icon(
Icons.local_shipping,
color: Color(0xFF727272),
size: 24,
):Image.asset(
)
: Image.asset(
"assets/image/icon_permission_location.webp",
height: 24.h,
width: 24.w,

13
lib/settlement/settlement_view/pay_method.dart

@ -90,6 +90,7 @@ class _PayMethod extends State<PayMethod> {
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 1;
@ -118,7 +119,7 @@ class _PayMethod extends State<PayMethod> {
width: 10,
),
Text(
S.of(context).pingtaiyue,
S.of(context).huixiangqianbao,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -134,6 +135,7 @@ class _PayMethod extends State<PayMethod> {
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 2;
@ -162,7 +164,7 @@ class _PayMethod extends State<PayMethod> {
width: 10,
),
Text(
S.of(context).dianpuyue,
S.of(context).mendianyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -178,6 +180,7 @@ class _PayMethod extends State<PayMethod> {
),
if(mGreenMoney!="0.00" && !(widget.settleOrderInfo?.isRaise ?? false))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 3;
@ -215,7 +218,7 @@ class _PayMethod extends State<PayMethod> {
width: 10,
),
Text(
"绿币余额",
S.of(context).lvbizhifu,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
@ -231,6 +234,7 @@ class _PayMethod extends State<PayMethod> {
),
if(mRaiseMoney!="0" && (widget.settleOrderInfo?.isRaise ?? false))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 4;
@ -284,6 +288,7 @@ class _PayMethod extends State<PayMethod> {
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
checkIndex = 5;
@ -320,7 +325,7 @@ class _PayMethod extends State<PayMethod> {
Widget checkView(var index) {
return Container(
padding: EdgeInsets.only(right: 16.w),
padding: EdgeInsets.only(right:36.w),
alignment: Alignment.center,
child: Image.asset(
checkIndex != index

2
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -105,7 +105,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
);
}
if(widget.useVipPriceSelect ){
if(widget.useVipPriceSelect && widget.settleOrderInfo.memberVO.isVip && (!widget.settleOrderInfo.isRaise) && (widget?.settleOrderInfo?.discountAmount!= "0")){
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠", widget?.settleOrderInfo?.discountAmount ?? ""));
}

25
lib/store/shop_details_page.dart

@ -65,6 +65,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
String storeId;
String parentId;
int numberOfPeople = 0;
int index;
@override
void initState() {
@ -91,7 +92,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
buildCount();
}
///
queryStoreInfo() async {
SharedPreferences value = await SharedPreferences.getInstance();
@ -152,7 +152,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
});
}
///
queryMiNiDetail(id) async {
BaseData<MiNiDetail> baseData =
@ -938,10 +937,8 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
child: Container(
margin: EdgeInsets.only(left: 16, top: 52),
padding: EdgeInsets.all(5),
child: Icon(
Icons.arrow_back_ios,
size: 24,
color: Color(0xFF353535),
child: Image.asset(
"assets/image/integral_return.webp",
),
),
),
@ -959,9 +956,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
context,
state,
) {
return WillPopScope(
onWillPop: () async => false,
child:Container(
return Container(
alignment: Alignment.topCenter,
padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16),
height: MediaQuery.of(context).size.height / 3 * 2,
@ -1095,7 +1090,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
setState(() {
counts -= 1;
});
reduce(miNiDetail, selectSkus);
// reduce(miNiDetail, selectSkus);
});
},
child: Icon(
@ -1103,11 +1098,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
color: Color(0xFF32A060),
size: 24,
)
// Image.asset(
// "assets/image/reduce.webp",
// width: 22,
// height: 22,
// ),
),
Padding(
padding: EdgeInsets.only(left: 8, right: 8),
@ -1124,7 +1114,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
onTap: () {
state(() {
counts += 1;
add(miNiDetail, selectSkus);
// add(miNiDetail, selectSkus);
});
},
child: Icon(
@ -1151,13 +1141,14 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
callback: () {
state(() {
_addShopCar(miNiDetail, selectSkus, counts);
counts = 1;
Navigator.of(context).pop();
});
},
),
],
),
));
);
});
},
backgroundColor: Colors.transparent,

48
lib/store/store_order.dart

@ -515,12 +515,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
Spacer(),
GestureDetector(
onTap: () {
// if(AppUtils.compareTime(storeInfo.openStartTime,DateFormat('HH:mm:ss').format(DateTime.now()))
// &&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){
if(AppUtils.compareTime(storeInfo.openStartTime,DateFormat('HH:mm:ss').format(DateTime.now()))
&&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){
toDownOrder();
// }
// else
// SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center);
}
else
SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center);
},
child: RoundButton(
width: 103.w,
@ -649,6 +649,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
"cid": cid,
"shoppingCart": shopCarGoods,
"numberOfPeople": numberOfPeople,
"distance":widget.arguments["distance"],
},
);
if (tableId > 0) {
@ -737,15 +738,16 @@ class _StoreOrderPage extends State<StoreOrderPage>
_queryMiNiDetail(String id, int count) async {
EasyLoading.show(status: S.current.zhengzaijiazai);
if (count < 0) {
shopCarGoods.shoppingCartSkuItemList.forEach((element) {
shopCarGoods.shoppingCartSkuItemList.forEach((element) async{
if (element.productId == id) {
shopCartReduce(element);
await shopCartReduce(element);
setState(() {});
}
});
return;
}
BaseData<MiNiDetail> baseData = await minService.miNiDetail(id);
EasyLoading.dismiss();
if (baseData != null && baseData.isSuccess) {
showStoreSelector(baseData.data, id, count);
}
@ -758,20 +760,19 @@ class _StoreOrderPage extends State<StoreOrderPage>
} else {
EasyLoading.dismiss();
dialogShowing = true;
SmartDialog.show(
widget: ProductSku(
showModalBottomSheet(
backgroundColor: Colors.transparent,
context: context,
builder: (_) {
return ProductSku(
miNiDetail,
shopCarGoods,
id,
_addShopCar,
add,
reduce,
),
onDismiss: () {
dialogShowing = false;
},
alignmentTemp: Alignment.bottomCenter,
);
});
}
}
@ -822,12 +823,10 @@ class _StoreOrderPage extends State<StoreOrderPage>
},
],
});
EasyLoading.dismiss();
// EasyLoading.dismiss();
if (baseDate != null && baseDate.isSuccess) {
queryShopCar().then((value) {
this.shopCarGoods = value;
this.shopCarGoods = await queryShopCar();
setState(() {});
});
} else {
SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center);
}
@ -917,7 +916,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
if (productSku == null) return;
String skuId = productSku.id;
if (shopCarGoods == null) {
await _addShopCar(miNiDetail, selectSkus, 2);
await _addShopCar(miNiDetail, selectSkus, 1);
return;
}
int shopSkuIndex = shopCarGoods.shoppingCartSkuItemList
@ -932,17 +931,16 @@ class _StoreOrderPage extends State<StoreOrderPage>
.firstWhere((element) => skuId == element.id);
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
} else {
await _addShopCar(miNiDetail, selectSkus, 2);
await _addShopCar(miNiDetail, selectSkus, 1);
return;
}
BaseData<List<ShoppingCart>> baseDate =
await minService.shoppingCartSingle(shopCarTemp);
if (baseDate.isSuccess) {
queryShopCar().then((value) {
this.shopCarGoods = value;
this.shopCarGoods = await queryShopCar();
debugPrint("count.toString()");
setState(() {});
});
}
}
@ -956,7 +954,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
if (productSku == null) return;
String skuId = productSku.id;
if (shopCarGoods == null) {
await _addShopCar(miNiDetail, selectSkus, 2);
await _addShopCar(miNiDetail, selectSkus, 1);
return;
}
ShoppingCartSkuItemListBean shopSkuItem = shopCarGoods
@ -970,7 +968,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum -= 1;
}
} else {
await _addShopCar(miNiDetail, selectSkus, 2);
await _addShopCar(miNiDetail, selectSkus, 1);
return;
}
shopCarGoods.tableId = "$tableId";

184
lib/store/store_view/product_sku.dart

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -9,24 +10,18 @@ import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/round_button.dart';
class ProductSku extends StatefulWidget {
final MiNiDetail miNiDetail;
final String productId;
final Function(MiNiDetail miNiDetail, List<String> selectSkus, int count) addShopCar;
final Function(MiNiDetail miNiDetail, List<String> selectSkus, int count)
addShopCar;
final Function(MiNiDetail miNiDetail, List<String> selectSkus) add;
final Function(MiNiDetail miNiDetail, List<String> selectSkus) reduce;
final ShoppingCart shopCarGoods;
final int buttonType;
ProductSku(
this.miNiDetail,
this.shopCarGoods,
this.productId,
this.addShopCar,
this.add,
this.reduce,
{ this.buttonType}
);
ProductSku(this.miNiDetail, this.shopCarGoods, this.productId,
this.addShopCar, this.add, this.reduce,
{this.buttonType});
@override
State<StatefulWidget> createState() {
@ -36,8 +31,9 @@ class ProductSku extends StatefulWidget {
class _ProductSku extends State<ProductSku> {
List<String> selectSkus = [];
int count = 1;
int count = 1, realCount = 0;
String selectedPrice = "";
bool _isTapEd = false;
@override
void initState() {
@ -63,10 +59,13 @@ class _ProductSku extends State<ProductSku> {
if (productSku == null) return;
selectedPrice = productSku.skuPrice;
String skuId = productSku.id;
if (widget.shopCarGoods == null || widget.shopCarGoods.shoppingCartSkuItemList == null) return;
int shopSkuIndex = widget.shopCarGoods.shoppingCartSkuItemList.indexWhere((element) => skuId == element.id);
if (widget.shopCarGoods == null ||
widget.shopCarGoods.shoppingCartSkuItemList == null) return;
int shopSkuIndex = widget.shopCarGoods.shoppingCartSkuItemList
.indexWhere((element) => skuId == element.id);
if (shopSkuIndex >= 0) {
count = widget.shopCarGoods.shoppingCartSkuItemList[shopSkuIndex].buyNum;
realCount = count;
}
}
@ -81,13 +80,13 @@ class _ProductSku extends State<ProductSku> {
return gg;
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
debugPrint("ssssasdadsasdadasd");
SmartDialog.dismiss();
// debugPrint("ssssasdadsasdadasd");
// SmartDialog.dismiss();
Navigator.of(context).pop();
return true;
},
child: StatefulBuilder(builder: (context1, state) {
@ -124,7 +123,8 @@ class _ProductSku extends State<ProductSku> {
SizedBox(
width: 10,
),
Expanded(child:Column(
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -141,7 +141,10 @@ class _ProductSku extends State<ProductSku> {
padding: EdgeInsets.only(top: 4, bottom: 7),
child: Text(
"已选: " +
(selectSkus.map((e) => "$e").toList().toString()),
(selectSkus
.map((e) => "$e")
.toList()
.toString()),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -175,8 +178,8 @@ class _ProductSku extends State<ProductSku> {
)),
InkWell(
onTap: () {
// Navigator.of(context).pop();
SmartDialog.dismiss();
Navigator.of(context).pop();
// SmartDialog.dismiss();
},
child: Image.asset(
"assets/image/cancel.webp",
@ -187,11 +190,14 @@ class _ProductSku extends State<ProductSku> {
),
],
),
if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0)
if (widget.miNiDetail.attrList != null &&
widget.miNiDetail.attrList.length > 0)
SizedBox(
height: 10,
),
if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0 && widget.miNiDetail.attrList[0].attrName!="")
if (widget.miNiDetail.attrList != null &&
widget.miNiDetail.attrList.length > 0 &&
widget.miNiDetail.attrList[0].attrName != "")
Expanded(
child: ListView.builder(
itemCount: widget.miNiDetail.attrList.length,
@ -231,12 +237,15 @@ class _ProductSku extends State<ProductSku> {
),
),
InkWell(
onTap: () {
if (count > 1)
setState(() {
onTap: () async {
if(count == 1)
return;
_isTapEd = true;
EasyLoading.show(status: S.current.zhengzaijiazai);
await widget.reduce(widget.miNiDetail, selectSkus);
count -= 1;
});
widget.reduce(widget.miNiDetail, selectSkus);
setState(() {});
EasyLoading.dismiss();
},
child: Image.asset(
"assets/image/reduce.webp",
@ -256,11 +265,17 @@ class _ProductSku extends State<ProductSku> {
),
),
InkWell(
onTap: () {
setState(() {
onTap: () async {
_isTapEd = true;
EasyLoading.show(status: S.current.zhengzaijiazai);
if (count == 1 && realCount == 0)
await widget.addShopCar(
widget.miNiDetail, selectSkus, 2);
else
await widget.add(widget.miNiDetail, selectSkus);
count += 1;
});
widget.add(widget.miNiDetail, selectSkus);
setState(() {});
EasyLoading.dismiss();
},
child: Image.asset(
"assets/image/add.webp",
@ -284,8 +299,9 @@ class _ProductSku extends State<ProductSku> {
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
callback: () {
// Navigator.of(context).pop();
SmartDialog.dismiss();
Navigator.of(context).pop();
// SmartDialog.dismiss();
if (!_isTapEd)
widget.addShopCar(widget.miNiDetail, selectSkus, 1);
},
),
@ -300,18 +316,21 @@ class _ProductSku extends State<ProductSku> {
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
callback: () {
// Navigator.of(context).pop();
SmartDialog.dismiss();
Navigator.of(context).pop();
// SmartDialog.dismiss();
widget.addShopCar(widget.miNiDetail, selectSkus, count);
},
),
///
if (widget.buttonType == 2)
Row(
children: [
Expanded(child: GestureDetector(
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pushReplacementNamed('/router/group_details');
Navigator.of(context)
.pushReplacementNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,
@ -350,8 +369,8 @@ class _ProductSku extends State<ProductSku> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"原价购买",
style: TextStyle(
fontSize: 12.sp,
@ -362,10 +381,13 @@ class _ProductSku extends State<ProductSku> {
],
),
),
),),
Expanded(child: GestureDetector(
),
),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).popAndPushNamed('/router/bargain_details');
Navigator.of(context)
.popAndPushNamed('/router/bargain_details');
},
child: Container(
alignment: Alignment.center,
@ -408,29 +430,32 @@ class _ProductSku extends State<ProductSku> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"我要砍价",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),),
),
),
],
),
)),),
)),
),
],
),
///
if (widget.buttonType == 3)
Row(
children: [
Expanded(child:GestureDetector(
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).popAndPushNamed('/router/group_details');
Navigator.of(context)
.popAndPushNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,
@ -469,8 +494,8 @@ class _ProductSku extends State<ProductSku> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"原价购买",
style: TextStyle(
fontSize: 12.sp,
@ -481,10 +506,13 @@ class _ProductSku extends State<ProductSku> {
],
),
),
),),
Expanded(child:GestureDetector(
),
),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).popAndPushNamed('/router/bargain_details');
Navigator.of(context)
.popAndPushNamed('/router/bargain_details');
},
child: Container(
alignment: Alignment.center,
@ -527,27 +555,32 @@ class _ProductSku extends State<ProductSku> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"我要秒杀",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),),
),
),
],
),
)),),
)),
),
],
),
///
if (widget.buttonType == 4)
Row(
children: [
Expanded(child: GestureDetector(
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).popAndPushNamed('/router/group_details');
Navigator.of(context)
.popAndPushNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,
@ -586,8 +619,8 @@ class _ProductSku extends State<ProductSku> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"单人购买",
style: TextStyle(
fontSize: 12.sp,
@ -599,9 +632,11 @@ class _ProductSku extends State<ProductSku> {
),
),
)),
Expanded(child:GestureDetector(
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).popAndPushNamed('/router/bargain_details');
Navigator.of(context)
.popAndPushNamed('/router/bargain_details');
},
child: Container(
alignment: Alignment.center,
@ -644,18 +679,20 @@ class _ProductSku extends State<ProductSku> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"我要开团",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),),
),
),
],
),
)),),
)),
),
],
),
SizedBox(
@ -669,7 +706,8 @@ class _ProductSku extends State<ProductSku> {
}
Widget attrItem(Function fc, AttrListBean attrListBean, position) {
if (attrListBean.attrValueList != null && attrListBean.attrValueList.length > 0)
if (attrListBean.attrValueList != null &&
attrListBean.attrValueList.length > 0)
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -727,7 +765,8 @@ class _ProductSku extends State<ProductSku> {
return Wrap(
runSpacing: 10.0,
spacing: 10.0,
children: arrays.take(arrays.length).map<Widget>((AttrValueListBean tag) {
children:
arrays.take(arrays.length).map<Widget>((AttrValueListBean tag) {
return GestureDetector(
onTap: () {
fc(tag.attrValue);
@ -763,5 +802,4 @@ class _ProductSku extends State<ProductSku> {
),
));
}
}

70
lib/store/store_view/shop_goods.dart

@ -94,10 +94,10 @@ class _ShopGoods extends State<ShopGoods> {
Widget build(BuildContext context) {
return Container(
color: Colors.white,
padding: EdgeInsets.only(
right: 16.w,
// bottom: 20.h,
),
// padding: EdgeInsets.only(
// right: 16.w,
// // bottom: 20.h,
// ),
height: 123.h,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
@ -125,7 +125,8 @@ class _ShopGoods extends State<ShopGoods> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
Padding(padding: EdgeInsets.only(right: 16.w),
child: Row(
children: [
Expanded(
child: Text(
@ -156,11 +157,12 @@ class _ShopGoods extends State<ShopGoods> {
// ),
// ),
],
),
),),
SizedBox(
height: 2.h,
),
Row(
Padding(padding: EdgeInsets.only(right: 16.w),
child: Row(
children: [
Expanded(
child: Text(
@ -180,11 +182,12 @@ class _ShopGoods extends State<ShopGoods> {
width: 10,
),
],
),
)),
SizedBox(
height: 7.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
@ -219,23 +222,11 @@ class _ShopGoods extends State<ShopGoods> {
// ),
],
),
Spacer(),
if (!widget.isShopCart &&
(widget.productListBean?.attrStyle ?? 0) == 1)
Stack(
children: [
Container(
margin: EdgeInsets.only(right: 8, top: 4),
child: RoundButton(
// width: 49.w,
text: S.of(context).xuanguige,
textColor: Colors.white,
fontWeight: MyFontWeight.medium,
radius: 3,
backgroup: Color(0xFF32A060),
fontSize: 11.sp,
padding: EdgeInsets.symmetric(vertical: 5.h,horizontal: 3.w),
callback: () {
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () async{
if(widget.storeInfo.posType.code == "NORMALSTORE"&& widget.tableId == 0){
showDeleteDialog();
}else{
@ -247,6 +238,21 @@ class _ShopGoods extends State<ShopGoods> {
0);
}
},
child:Container(
padding: EdgeInsets.only(right: 16.w),
child: Stack(
children: [
Container(
padding: EdgeInsets.only(left:35.w,top: 4.h,bottom: 4.h,),
margin: EdgeInsets.only(right: 8, top: 4),
child: RoundButton(
text: S.of(context).xuanguige,
textColor: Colors.white,
fontWeight: MyFontWeight.medium,
radius: 3,
backgroup: Color(0xFF32A060),
fontSize: 11.sp,
padding: EdgeInsets.symmetric(vertical: 5.h,horizontal: 3.w),
),
),
Positioned(
@ -266,26 +272,32 @@ class _ShopGoods extends State<ShopGoods> {
),
),
],
),
),)),
if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
InkWell(
onTap: () {
Spacer(),
if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () async{
if(widget.storeInfo.posType.code == "NORMALSTORE" && widget.tableId == 0){
showDeleteDialog();
}else{
widget.reduce(widget.shoppingCartSkuItemListBean);}
},
child: Container(
padding: EdgeInsets.only(left: 15.w,right: 6.w),
child: Image.asset(
"assets/image/reduce.webp",
width: 22,
height: 22.h,
),
),
),
if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
Container(
width: 30,
alignment: Alignment.center,
child: Text(
"${widget.count}",
@ -299,6 +311,7 @@ class _ShopGoods extends State<ShopGoods> {
if (widget.isShopCart ||
(widget.productListBean?.attrStyle ?? 0) == 0)
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () async{
if(widget.storeInfo.posType.code == "NORMALSTORE" && widget.tableId == 0){
showDeleteDialog();
@ -317,12 +330,15 @@ class _ShopGoods extends State<ShopGoods> {
widget.queryShoppingCart();
}
},
child: Container(
padding: EdgeInsets.only(left: 6.w,right:16.w),
child: Image.asset(
"assets/image/add.webp",
width: 22,
height: 22.h,
),
),
),
],
),
SizedBox(

3
lib/union/union_list.dart

@ -87,7 +87,8 @@ class _UnionList extends State<UnionList> {
arguments: {
"id": widget.storeList[position].id,
"tenant": widget.storeList[position].tenantCode,
"storeName": widget.storeList[position].storeName
"storeName": widget.storeList[position].storeName,
"distance":widget.storeList[position].distance
},
);
}

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(

6
lib/view_widget/activity_poster.dart

@ -22,7 +22,9 @@ class ActivityPoster extends StatefulWidget {
class _ActivityPoster extends State<ActivityPoster> {
@override
Widget build(BuildContext context) {
return Container(
return WillPopScope(
onWillPop: () async => false,
child:Container(
width: double.infinity,
alignment: Alignment.center,
margin: EdgeInsets.only(
@ -69,7 +71,7 @@ class _ActivityPoster extends State<ActivityPoster> {
) )
],
),
);
));
}
/// contentType 0123,4:,5:

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,

218
lib/view_widget/mine_vip_entry.dart

@ -32,6 +32,9 @@ class MineVipEntry extends StatelessWidget {
String topLeft = "";
String levelText = "普通用户";
Color logoColor = Color(0xFFCACACA);
Color levelTextColor = Color(0xFFCACACA);
Color levelTextBackdrop = Color(0xFFFFF8EC);
@override
Widget build(BuildContext context) {
@ -54,109 +57,188 @@ class MineVipEntry extends StatelessWidget {
case 1:
{
levelText = "${S.of(context).yinkahuiyuan}";
logoColor = Color(0xFFA0C4E7);
levelTextColor = Color(0xFF61ABF3);
levelTextBackdrop = Color(0xFFC1DBF4);
break;
}
case 2:
{
levelText = "${S.of(context).jinkahuiyuan}";
logoColor = Color(0xFFFBB43A);
levelTextColor = Color(0xFFFBB43A);
levelTextBackdrop = Color(0xFFFFECD2);
break;
}
case 3:
{
levelText = "${S.of(context).gongchuanghuiyuan}";
logoColor = Color(0xFF352822);
levelTextColor = Color(0xFF92755D);
levelTextBackdrop = Color(0xFFFFECD2);
break;
}
}
Widget widget = Container(
height:20.h,
width: double.infinity,
padding: EdgeInsets.only(top: 12.h, bottom: 22.h, left: 12.w, right: 12.w),
margin: EdgeInsets.only(top: 23.h,left: 13.5.w,right: 13.5.w,bottom:15.h),
child: Row(
children: [
Container(
height: double.infinity,
padding: EdgeInsets.symmetric(horizontal:3.w,vertical:4.h),
decoration: BoxDecoration(
color: Color(0xFF3D3D5D),
borderRadius: BorderRadius.circular(6),
color: logoColor,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
bottomLeft: Radius.circular(4),),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Image.asset(
"assets/image/vip_logo.webp",
width: 24,
height: 24,
child: Image.asset(
"assets/image/mine_vip_logo.webp",
fit: BoxFit.cover,
// width: 13.w,
// height: 11.h,
),
SizedBox(
width: 5.w,
),
Expanded(
child: Text(
levelText,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFFEAD2)),
)),
Container(
padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
height: double.infinity,
padding: EdgeInsets.symmetric(horizontal:3.w,vertical:3.h),
decoration: BoxDecoration(
color: Color(0xFFFFECD2),
borderRadius: BorderRadius.circular(10),
),
child: Text(
S.of(context).chakanquanyi,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF92755D),
),
color: levelTextBackdrop,
borderRadius: BorderRadius.only(
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),),
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
),
)
],
),
SizedBox(
height: 16.h,
),
Container(
height: 4.h,
child: ClipRRect(
borderRadius: BorderRadius.circular(6.5),
child: LinearProgressIndicator(
value: rankMax > (rank ?? 0)
? ((vipLevel < curLevel)
? rankMax / rankMax
: (rank ?? 0) / rankMax)
: 0,
backgroundColor: Color(0xFF222233),
color: Color(0xFFFFECD2),
),
child:Row(
children: [
Text(
levelText,
textAlign: TextAlign.center,
style: TextStyle(
color: levelTextColor,
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
),
SizedBox(
height: 8.h,
Image.asset(
"assets/image/icon_right.webp",
fit: BoxFit.cover,
width: 8,
height: 8,
color: levelTextColor,
),
Text(
rank > rankMax
? S.of(context).dangqiandengji
: "消费金额¥${rank.toStringAsFixed(2).toString()}${S.of(context).xiayidengji}还需¥${(rankMax - (rank ?? 0)).toStringAsFixed(2)}",
style: TextStyle(
color: Color(0xFFFFEAD2),
fontWeight: MyFontWeight.light,
fontFamily: 'JDZhengHT',
fontSize: 14.sp,
],
),
)
],
));
),
);
// Container(
// width: double.infinity,
// padding: EdgeInsets.only(top: 12.h, bottom: 22.h, left: 12.w, right: 12.w),
// margin: EdgeInsets.only(top: 23.h,left: 13.5.w,right: 13.5.w,bottom:15.h),
// decoration: BoxDecoration(
// color: Color(0xFF3D3D5D),
// borderRadius: BorderRadius.circular(6),
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// )
// ],
// ),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// Image.asset(
// "assets/image/vip_logo.webp",
// width: 24,
// height: 24,
// ),
// SizedBox(
// width: 5.w,
// ),
// Expanded(
// child: Text(
// levelText,
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFFFFEAD2)),
// )),
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// decoration: BoxDecoration(
// color: Color(0xFFFFECD2),
// borderRadius: BorderRadius.circular(10),
// ),
// child: Text(
// S.of(context).chakanquanyi,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFF92755D),
// ),
// ),
// )
// ],
// ),
// SizedBox(
// height: 16.h,
// ),
// Container(
// height: 4.h,
// child: ClipRRect(
// borderRadius: BorderRadius.circular(6.5),
// child: LinearProgressIndicator(
// value: rankMax > (rank ?? 0)
// ? ((vipLevel < curLevel)
// ? rankMax / rankMax
// : (rank ?? 0) / rankMax)
// : 0,
// backgroundColor: Color(0xFF222233),
// color: Color(0xFFFFECD2),
// ),
// ),
// ),
// SizedBox(
// height: 8.h,
// ),
// Text(
// rank > rankMax
// ? S.of(context).dangqiandengji
// : "消费金额¥${rank.toStringAsFixed(2).toString()}${S.of(context).xiayidengji}还需¥${(rankMax - (rank ?? 0)).toStringAsFixed(2)}",
// style: TextStyle(
// color: Color(0xFFFFEAD2),
// fontWeight: MyFontWeight.light,
// fontFamily: 'JDZhengHT',
// fontSize: 14.sp,
// ),
// )
// ],
// ));
return GestureDetector(
onTap: () {

4
lib/view_widget/my_appbar.dart

@ -16,6 +16,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Size preferredSize;
final double toolbarHeight;
final bool leading;
final bool centerTitle;
final Brightness brightness;
final Function exit;
@ -34,6 +35,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.titleSize = 18,
this.brightness = Brightness.light,
this.leading = true,
this.centerTitle = false,
this.exit
}) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight),
super(key: key) {
@ -79,7 +81,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
)
: Container(),
titleSpacing: 2,
centerTitle: false,
centerTitle: centerTitle,
leadingWidth: leading ? 56 : 10.w,
title: ((title == null || title == "") && titleChild != null)
? titleChild

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,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save