diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 186b7155..ffed3a25 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/ios/Runner.xcodeproj/project.pbxproj "b/ios/\t.xcodeproj/project.pbxproj" similarity index 99% rename from ios/Runner.xcodeproj/project.pbxproj rename to "ios/\t.xcodeproj/project.pbxproj" index fda8700d..84c23e99 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ "b/ios/\t.xcodeproj/project.pbxproj" @@ -650,7 +650,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 3.2.29; + MARKETING_VERSION = 3.2.30; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -849,7 +849,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 3.2.29; + MARKETING_VERSION = 3.2.30; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -939,7 +939,7 @@ "$(PROJECT_DIR)/baidu", "$(PROJECT_DIR)/Runner/baidu", ); - MARKETING_VERSION = 3.2.29; + MARKETING_VERSION = 3.2.30; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -970,7 +970,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject " " */ = { isa = XCConfigurationList; buildConfigurations = ( 97C147031CF9000F007C117D /* Debug */, diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata "b/ios/\t.xcodeproj/project.xcworkspace/contents.xcworkspacedata" similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to "ios/\t.xcodeproj/project.xcworkspace/contents.xcworkspacedata" diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist "b/ios/\t.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist" similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to "ios/\t.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist" diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings "b/ios/\t.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings" similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to "ios/\t.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings" diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme "b/ios/\t.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme" similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to "ios/\t.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme" diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 98f4107b..e1132683 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -75,8 +75,6 @@ PODS: - mob_sharesdk/ShareSDKPlatforms/WeChat_Lite - mob_sharesdk/ShareSDKUI - SSZipArchive (2.4.3) - - thumbnails (0.0.1): - - Flutter - tobias (0.0.1): - Flutter - TPNS-iOS (1.3.4.1) @@ -116,7 +114,6 @@ DEPENDENCIES: - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) - sharesdk_plugin (from `.symlinks/plugins/sharesdk_plugin/ios`) - SSZipArchive (~> 2.4.2) - - thumbnails (from `.symlinks/plugins/thumbnails/ios`) - tobias (from `.symlinks/plugins/tobias/ios`) - tpns_flutter_plugin (from `.symlinks/plugins/tpns_flutter_plugin/ios`) - umeng_common_sdk (from `.symlinks/plugins/umeng_common_sdk/ios`) @@ -165,8 +162,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/shared_preferences_foundation/ios" sharesdk_plugin: :path: ".symlinks/plugins/sharesdk_plugin/ios" - thumbnails: - :path: ".symlinks/plugins/thumbnails/ios" tobias: :path: ".symlinks/plugins/tobias/ios" tpns_flutter_plugin: @@ -202,7 +197,6 @@ SPEC CHECKSUMS: shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 sharesdk_plugin: f29a6f471ae1c253e96636d62106c3f8d793948c SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef - thumbnails: bb4f4e9bb4b51c8ae4e6ad9a2fa81373f9b634ad tobias: 2aded9b83e3663b907360a800d8e3c13284f25c5 TPNS-iOS: 36c335eff80670de6ede780ab827f679d78f64ff tpns_flutter_plugin: ed7fae92efde473d5cb9fd33ac92caa2d64530a2 diff --git a/lib/settlement/settlement_view/pay_method.dart b/lib/settlement/settlement_view/pay_method.dart index 42aaabc5..1099015d 100644 --- a/lib/settlement/settlement_view/pay_method.dart +++ b/lib/settlement/settlement_view/pay_method.dart @@ -1,14 +1,12 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../../retrofit/data/min_order_info.dart'; import '../../retrofit/data/settleOrderInfo.dart'; -import '../../view_widget/settlement_tips_dialog.dart'; class PayMethod extends StatefulWidget { final Function(int payChannel) payChannelCheck; @@ -92,240 +90,276 @@ class _PayMethod extends State { ), ), if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 1; - }); - widget.payChannelCheck(4); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(1), - Expanded( - child: Container(), - flex: 1, - ), - Text( - "¥$money", - style: TextStyle( - fontSize: 14.sp, - fontFamily: 'JDZhengHT', - color: Color(0xff353535), - fontWeight: MyFontWeight.medium, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + double m = double.parse(money); + if (m == null) { + m = 0; + } + double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); + if (orderSum == null) { + orderSum = 0; + } + if (orderSum > m) { + return; + } + setState(() { + checkIndex = 1; + }); + widget.payChannelCheck(4); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + checkView(1, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(money) ?? 0)), + Expanded( + child: Container(), + flex: 1, ), - ), - SizedBox( - width: 10, - ), - Text( - S.of(context).huixiangqianbao, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - fontWeight: MyFontWeight.semi_bold, + Text( + "¥$money", + style: TextStyle( + fontSize: 14.sp, + fontFamily: 'JDZhengHT', + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(money) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.medium, + ), ), - ), - ], + SizedBox( + width: 10, + ), + Text( + S.of(context).huixiangqianbao, + style: TextStyle( + fontSize: 14.sp, + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(money) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), + ), + ], + ), ), - ), if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) - SizedBox( + SizedBox( height: 10, ), if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 2; - }); - widget.payChannelCheck(3); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(2), - Expanded( - child: Container(), - flex: 1, - ), - Text( - "¥$balance", - style: TextStyle( - fontSize: 14.sp, - fontFamily: 'JDZhengHT', - color: Color(0xff353535), - fontWeight: MyFontWeight.medium, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + double balanceMoney = double.parse(balance); + if (balanceMoney == null) { + balanceMoney = 0; + } + double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); + if (orderSum == null) { + orderSum = 0; + } + if (orderSum > balanceMoney) { + return; + } + setState(() { + checkIndex = 2; + }); + widget.payChannelCheck(3); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + checkView(2, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(balance) ?? 0)), + Expanded( + child: Container(), + flex: 1, + ), + Text( + "¥$balance", + style: TextStyle( + fontSize: 14.sp, + fontFamily: 'JDZhengHT', + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(balance) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.medium, + ), ), - ), - SizedBox( - width: 10, - ), - Text( - S.of(context).mendianyue, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - fontWeight: MyFontWeight.semi_bold, + SizedBox( + width: 10, + ), + Text( + S.of(context).mendianyue, + style: TextStyle( + fontSize: 14.sp, + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(balance) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), ), - ), - ], + ], + ), ), - ), if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) - SizedBox( + SizedBox( height: 10, ), if(mGreenMoney!="0.00" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - double greenMoney = double.parse(mGreenMoney); - if (greenMoney == null) { - greenMoney = 0; - } - if (widget.settleOrderInfo.orderNum > greenMoney) { - return; - } - setState(() { - checkIndex = 3; - // if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ - // print("discount-promotions: ${widget.promotions}"); - // print("discount-coupons: ${widget.coupons}"); - // print("discount-useVipPriceSelect: ${widget.useVipPriceSelect}"); - // print("discount-useBenefitSelect: ${widget.useBenefitSelect}"); - // SmartDialog.show( - // widget: SettlementTips( - // () { - // }, - // text: "绿币支付不参与任何活动优惠,请重新选择支付方式", - // )); - // return; - // } - }); - print("discount-payChannelCheck: 5"); - widget.payChannelCheck(5); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(3), - Spacer(flex: 1,), - Text( - "¥$mGreenMoney", - style: TextStyle( - fontSize: 14.sp, - fontFamily: 'JDZhengHT', - color: Color(0xff353535), - fontWeight: MyFontWeight.medium, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + double greenMoney = double.parse(mGreenMoney); + if (greenMoney == null) { + greenMoney = 0; + } + double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); + if (orderSum == null) { + orderSum = 0; + } + if (orderSum > greenMoney) { + return; + } + setState(() { + checkIndex = 3; + // if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ + // print("discount-promotions: ${widget.promotions}"); + // print("discount-coupons: ${widget.coupons}"); + // print("discount-useVipPriceSelect: ${widget.useVipPriceSelect}"); + // print("discount-useBenefitSelect: ${widget.useBenefitSelect}"); + // SmartDialog.show( + // widget: SettlementTips( + // () { + // }, + // text: "绿币支付不参与任何活动优惠,请重新选择支付方式", + // )); + // return; + // } + }); + print("discount-payChannelCheck: 5"); + widget.payChannelCheck(5); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + checkView(3, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mGreenMoney) ?? 0)), + Spacer(flex: 1,), + Text( + "¥$mGreenMoney", + style: TextStyle( + fontSize: 14.sp, + fontFamily: 'JDZhengHT', + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mGreenMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.medium, + ), ), - ), - SizedBox( - width: 10, - ), - Text( - S.of(context).lvbizhifu, - style: TextStyle( - fontSize: 14.sp, - color: widget.settleOrderInfo.orderNum > (double.parse(mGreenMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), - fontWeight: MyFontWeight.semi_bold, + SizedBox( + width: 10, + ), + Text( + S.of(context).lvbizhifu, + style: TextStyle( + fontSize: 14.sp, + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mGreenMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), ), - ), - ], + ], + ), ), - ), if(mGreenMoney != "0.00" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) - SizedBox( + SizedBox( height: 10, ), if(mRaiseMoney != "0" && (widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false))) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 4; - if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ - SmartDialog.show( - widget: SettlementTips( - () {}, - text: "助农积分不参与任何活动优惠,请重新选择支付方式", - ), - ); + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + double raiseMoney = double.parse(mRaiseMoney); + if (raiseMoney == null) { + raiseMoney = 0; + } + double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); + if (orderSum == null) { + orderSum = 0; + } + if (orderSum > raiseMoney) { return; } - }); - widget.payChannelCheck(7); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - checkView(4), - Expanded( - child: Container(), - flex: 1, - ), - Text( - "¥$mRaiseMoney", - style: TextStyle( - fontSize: 14.sp, - fontFamily: 'JDZhengHT', - color: Color(0xff353535), - fontWeight: MyFontWeight.medium, + setState(() { + checkIndex = 4; + // if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ + // SmartDialog.show( + // widget: SettlementTips( + // () {}, + // text: "助农积分不参与任何活动优惠,请重新选择支付方式", + // ), + // ); + // return; + // } + }); + widget.payChannelCheck(7); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + checkView(4, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mRaiseMoney) ?? 0)), + Spacer( + flex: 1, + ), + Text( + "¥$mRaiseMoney", + style: TextStyle( + fontSize: 14.sp, + fontFamily: 'JDZhengHT', + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mRaiseMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.medium, + ), ), - ), - SizedBox( - width: 10, - ), - Text( - S.of(context).zhunongjifen, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - fontWeight: MyFontWeight.semi_bold, + SizedBox( + width: 10, + ), + Text( + S.of(context).zhunongjifen, + style: TextStyle( + fontSize: 14.sp, + color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mRaiseMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), ), - ), - ], + ], + ), ), - ), if(mRaiseMoney !="0" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - checkIndex = 5; - widget.payChannelCheck(1); - }); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - checkView(5), - Spacer(), - Image.asset("assets/image/icon_we_chat.webp"), - Padding( - padding: EdgeInsets.only(left: 8.w), - child: Text( - S.of(context).weixinzhifu, - style: TextStyle( - fontSize: 14.sp, - color: Color(0xff353535), - fontWeight: MyFontWeight.semi_bold, + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + checkIndex = 5; + widget.payChannelCheck(1); + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + checkView(5), + Spacer(), + Image.asset("assets/image/icon_we_chat.webp"), + Padding( + padding: EdgeInsets.only(left: 8.w), + child: Text( + S.of(context).weixinzhifu, + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff353535), + fontWeight: MyFontWeight.semi_bold, + ), ), ), - ), - ], + ], + ), ), - ), ], ), ); @@ -333,7 +367,15 @@ class _PayMethod extends State { var checkIndex = 5; - Widget checkView(var index) { + Widget checkView(var index, {bool isHide = false}) { + + if (isHide) { + return Container( + padding: EdgeInsets.only(right:36.w), + alignment: Alignment.center, + ); + } + return Container( padding: EdgeInsets.only(right:36.w), alignment: Alignment.center,