From b8e0a467f6cac782b6106e994f0e3b7747a94d7c Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Wed, 15 Jun 2022 17:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=B7=B2=E4=BD=BF=E7=94=A8;=20=E5=A2=9E=E5=8A=A0=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=94=AF=E4=BB=98ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../community_view/community_dynamic.dart | 1 - lib/generated/intl/messages_en.dart | 4 + lib/generated/intl/messages_zh_CN.dart | 4 + lib/generated/intl/messages_zh_Hans_CN.dart | 4 + lib/generated/intl/messages_zh_Hant_CN.dart | 4 + lib/generated/intl/messages_zh_TW.dart | 4 + lib/generated/l10n.dart | 40 ++ lib/l10n/intl_en.arb | 4 + lib/l10n/intl_zh_CN.arb | 4 + lib/l10n/intl_zh_Hans_CN.arb | 4 + lib/l10n/intl_zh_Hant_CN.arb | 4 + lib/l10n/intl_zh_TW.arb | 4 + lib/login/new_login_page.dart | 6 +- lib/main.dart | 6 + lib/main_page.dart | 2 +- lib/mine/coupon_page.dart | 32 +- lib/mine/mine_vip/mine_attainment_page.dart | 2 +- lib/retrofit/data/user_info.dart | 3 + lib/retrofit/min_api.dart | 2 +- lib/retrofit/retrofit_api.dart | 10 +- lib/retrofit/retrofit_api.g.dart | 43 ++ lib/setting/account_security_page.dart | 131 +++++ lib/setting/platform_code_page.dart | 478 ++++++++++++++++++ lib/setting/setting_page.dart | 9 + .../shopping_home/activity_banner.dart | 2 +- lib/store/store_view/store_order_list.dart | 2 +- lib/union/union_list.dart | 26 +- lib/union/union_page.dart | 1 + lib/view_widget/new_coupon_widget.dart | 38 +- lib/view_widget/pay_selected_dialog.dart | 115 +++++ pubspec.lock | 7 + pubspec.yaml | 3 +- 32 files changed, 955 insertions(+), 44 deletions(-) create mode 100644 lib/setting/account_security_page.dart create mode 100644 lib/setting/platform_code_page.dart create mode 100644 lib/view_widget/pay_selected_dialog.dart diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index 04388a99..07a19639 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -13,7 +13,6 @@ import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/custom_image.dart'; -import 'package:huixiang/view_widget/icon_text.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/share_dialog.dart'; diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index b4a94f76..844c9ac8 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -217,6 +217,7 @@ class MessageLookup extends MessageLookupByLibrary { "fapiao" : MessageLookupByLibrary.simpleMessage("发票"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), "fasong" : MessageLookupByLibrary.simpleMessage("发送"), + "fasongduanxin" : MessageLookupByLibrary.simpleMessage("发送短信"), "faxingshijian" : m4, "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换码"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), @@ -393,6 +394,7 @@ class MessageLookup extends MessageLookupByLibrary { "pinglun" : MessageLookupByLibrary.simpleMessage("评论"), "pinglun_" : m21, "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平台余额"), + "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平台支付密码"), "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介绍"), "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登录既同意"), @@ -675,8 +677,10 @@ class MessageLookup extends MessageLookupByLibrary { "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"), "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), + "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("账号安全"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("账号信息"), + "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("账号与安全"), "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("账号注销说明"), "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 3eac4b60..c76bed19 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -217,6 +217,7 @@ class MessageLookup extends MessageLookupByLibrary { "fapiao" : MessageLookupByLibrary.simpleMessage("发票"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), "fasong" : MessageLookupByLibrary.simpleMessage("发送"), + "fasongduanxin" : MessageLookupByLibrary.simpleMessage("发送短信"), "faxingshijian" : m4, "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换码"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), @@ -391,6 +392,7 @@ class MessageLookup extends MessageLookupByLibrary { "pinglun" : MessageLookupByLibrary.simpleMessage("评论"), "pinglun_" : m21, "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平台余额"), + "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平台支付密码"), "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介绍"), "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登录既同意"), @@ -671,7 +673,9 @@ class MessageLookup extends MessageLookupByLibrary { "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"), "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), + "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("账号安全"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), + "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("账号与安全"), "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("账号注销说明"), "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index d428be63..e683bd84 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -217,6 +217,7 @@ class MessageLookup extends MessageLookupByLibrary { "fapiao" : MessageLookupByLibrary.simpleMessage("发票"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), "fasong" : MessageLookupByLibrary.simpleMessage("发送"), + "fasongduanxin" : MessageLookupByLibrary.simpleMessage("发送短信"), "faxingshijian" : m4, "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换码"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"), @@ -391,6 +392,7 @@ class MessageLookup extends MessageLookupByLibrary { "pinglun" : MessageLookupByLibrary.simpleMessage("评论"), "pinglun_" : m21, "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平台余额"), + "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平台支付密码"), "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介绍"), "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登录既同意"), @@ -671,7 +673,9 @@ class MessageLookup extends MessageLookupByLibrary { "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暂无评论,快来评论吧"), "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暂无线上门店"), "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暂无优惠券可领取"), + "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("账号安全"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("账号授权"), + "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("账号与安全"), "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("账号注销说明"), "zhanghuyue" : MessageLookupByLibrary.simpleMessage("账户余额"), "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫骑手"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 602bb2a4..b99d36ed 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -215,6 +215,7 @@ class MessageLookup extends MessageLookupByLibrary { "fapiao" : MessageLookupByLibrary.simpleMessage("發票"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("發票助手"), "fasong" : MessageLookupByLibrary.simpleMessage("發送"), + "fasongduanxin" : MessageLookupByLibrary.simpleMessage("發送短信"), "faxingshijian" : m4, "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用!"), @@ -389,6 +390,7 @@ class MessageLookup extends MessageLookupByLibrary { "pinglun" : MessageLookupByLibrary.simpleMessage("評論"), "pinglun_" : m21, "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平臺餘額"), + "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平臺支付密碼"), "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介紹"), "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登錄既同意"), @@ -668,8 +670,10 @@ class MessageLookup extends MessageLookupByLibrary { "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"), "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"), "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"), + "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("賬號安全"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("賬號授權"), "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("賬號信息"), + "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("賬號與安全"), "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("賬號注銷説明"), "zhanghuyue" : MessageLookupByLibrary.simpleMessage("賬戶餘額"), "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 786248a3..35853b66 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -217,6 +217,7 @@ class MessageLookup extends MessageLookupByLibrary { "fapiao" : MessageLookupByLibrary.simpleMessage("發票"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("發票助手"), "fasong" : MessageLookupByLibrary.simpleMessage("發送"), + "fasongduanxin" : MessageLookupByLibrary.simpleMessage("發送短信"), "faxingshijian" : m4, "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用!"), @@ -391,6 +392,7 @@ class MessageLookup extends MessageLookupByLibrary { "pinglun" : MessageLookupByLibrary.simpleMessage("評論"), "pinglun_" : m21, "pingtaiyue" : MessageLookupByLibrary.simpleMessage("平臺餘額"), + "pingtaizhifumima" : MessageLookupByLibrary.simpleMessage("平臺支付密碼"), "pinpai" : MessageLookupByLibrary.simpleMessage("品牌"), "pinpaijieshao" : MessageLookupByLibrary.simpleMessage("品牌介紹"), "privacy_policy1" : MessageLookupByLibrary.simpleMessage("登錄既同意"), @@ -671,8 +673,10 @@ class MessageLookup extends MessageLookupByLibrary { "zanwupinglun" : MessageLookupByLibrary.simpleMessage("暫無評論,快去評論吧~"), "zanwuxianshangjindian" : MessageLookupByLibrary.simpleMessage("暫無綫上門店"), "zanwuyouhuiquankelingqu" : MessageLookupByLibrary.simpleMessage("暫無優惠券可領取"), + "zhanghaoanquan" : MessageLookupByLibrary.simpleMessage("賬號安全"), "zhanghaoshouquan" : MessageLookupByLibrary.simpleMessage("賬號授權"), "zhanghaoxinxi" : MessageLookupByLibrary.simpleMessage("賬號信息"), + "zhanghaoyuanquan" : MessageLookupByLibrary.simpleMessage("賬號與安全"), "zhanghaozhuxiaoshuoming" : MessageLookupByLibrary.simpleMessage("賬號注銷説明"), "zhanghuyue" : MessageLookupByLibrary.simpleMessage("賬戶餘額"), "zhengzaihujiaoqishou" : MessageLookupByLibrary.simpleMessage("正在呼叫騎手"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 9c9b0efd..a60c18c5 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -6035,6 +6035,46 @@ class S { ); } + /// `账号与安全` + String get zhanghaoyuanquan { + return Intl.message( + '账号与安全', + name: 'zhanghaoyuanquan', + desc: '', + args: [], + ); + } + + /// `账号安全` + String get zhanghaoanquan { + return Intl.message( + '账号安全', + name: 'zhanghaoanquan', + desc: '', + args: [], + ); + } + + /// `平台支付密码` + String get pingtaizhifumima { + return Intl.message( + '平台支付密码', + name: 'pingtaizhifumima', + desc: '', + args: [], + ); + } + + /// `发送短信` + String get fasongduanxin { + return Intl.message( + '发送短信', + name: 'fasongduanxin', + desc: '', + args: [], + ); + } + /// `并使用本机号码登录` String get privacy_policy4 { return Intl.message( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 2fd00698..3bd012b3 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -630,6 +630,10 @@ "zhanghaozhuxiaoshuoming": "账号注销说明", "lijilingqu": "立即领取", "fanhuishouye": "返回首页", + "zhanghaoyuanquan": "账号与安全", + "zhanghaoanquan": "账号安全", + "pingtaizhifumima": "平台支付密码", + "fasongduanxin": "发送短信", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index dd62bda0..ce111ab1 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -624,6 +624,10 @@ "zhanghaozhuxiaoshuoming": "账号注销说明", "lijilingqu": "立即领取", "fanhuishouye": "返回首页", + "zhanghaoyuanquan": "账号与安全", + "zhanghaoanquan": "账号安全", + "pingtaizhifumima": "平台支付密码", + "fasongduanxin": "发送短信", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 3a39d221..5058fd70 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -624,6 +624,10 @@ "zhanghaozhuxiaoshuoming": "账号注销说明", "lijilingqu": "立即领取", "fanhuishouye": "返回首页", + "zhanghaoyuanquan": "账号与安全", + "zhanghaoanquan": "账号安全", + "pingtaizhifumima": "平台支付密码", + "fasongduanxin": "发送短信", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index ed417912..b952aa89 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -616,6 +616,10 @@ "zhanghaozhuxiaoshuoming": "賬號注銷説明", "lijilingqu": "立即領取", "fanhuishouye": "返回首頁", + "zhanghaoyuanquan": "賬號與安全", + "zhanghaoanquan": "賬號安全", + "pingtaizhifumima": "平臺支付密碼", + "fasongduanxin": "發送短信", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 6c370a5e..65bde74b 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -618,6 +618,10 @@ "zhanghaozhuxiaoshuoming": "賬號注銷説明", "lijilingqu": "立即領取", "fanhuishouye": "返回首頁", + "zhanghaoyuanquan": "賬號與安全", + "zhanghaoanquan": "賬號安全", + "pingtaizhifumima": "平臺支付密碼", + "fasongduanxin": "發送短信", diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index e5c776f3..5669523d 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -503,9 +503,9 @@ class _NewLoginPage extends State { ), flex: 4, ), - SizedBox( - width: 17.h, - ), + // SizedBox( + // width: 17.h, + // ), Expanded( child: Container( alignment: Alignment.bottomCenter, diff --git a/lib/main.dart b/lib/main.dart index 45a7e988..798cc44b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -48,10 +48,12 @@ import 'package:huixiang/qr/invite_friends.dart'; import 'package:huixiang/qr/qr_code_scan.dart'; import 'package:huixiang/qr/qr_share.dart'; import 'package:huixiang/setting/about_page.dart'; +import 'package:huixiang/setting/account_security_page.dart'; import 'package:huixiang/setting/help_feedback_page.dart'; import 'package:huixiang/setting/logout_ing.dart'; import 'package:huixiang/setting/logout_page.dart'; import 'package:huixiang/setting/permission_setting_page.dart'; +import 'package:huixiang/setting/platform_code_page.dart'; import 'package:huixiang/setting/setting_page.dart'; import 'package:huixiang/setting/treaty_page.dart'; import 'package:huixiang/store/report_assess%20.dart'; @@ -395,4 +397,8 @@ Map routers = { CouponPage(), '/router/welfare_exchange': (context, {arguments}) => WelfareExchange(), + '/router/account_security_page': (context, {arguments}) => + AccountSecurityPage(), + '/router/platform_code_page': (context, {arguments}) => + PlatformCodePage(arguments:arguments), }; diff --git a/lib/main_page.dart b/lib/main_page.dart index acd0675c..b81743f9 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -354,7 +354,7 @@ class _MainPage extends State with WidgetsBindingObserver { PackageInfo packageInfo = await PackageInfo.fromPlatform(); BaseData baseData = await apiService.appVersion().catchError((onError) {}); if (baseData != null && baseData.isSuccess) { - baseData.data.appLastVersion = "2.0.17"; + // baseData.data.appLastVersion = "2.0.17"; // baseData.data.appLastVersionUp = "1.0.1"; if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion) && AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){ diff --git a/lib/mine/coupon_page.dart b/lib/mine/coupon_page.dart index 933bc3d3..eae30d08 100644 --- a/lib/mine/coupon_page.dart +++ b/lib/mine/coupon_page.dart @@ -146,6 +146,36 @@ class _CouponPage extends State { ), ), )), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + state = 2; + _onRefresh(); + }); + }, + child: Container( + width: double.infinity, + alignment: Alignment.center, + decoration: BoxDecoration( + border: Border( + top: BorderSide(width: 1, color: Color(0xFF32A060)), + bottom: BorderSide(width:1, color: Color(0xFF32A060)), + ), + color: state == 2 ? Color(0xFF32A060) : Color( + 0xFFFFFFFF), + ), + child: Text( + "已使用", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 15.sp, + color: state ==2 ? Color(0xFFFFFFFF) : Color( + 0xFF32A060), + ), + ), + ), + )), Expanded( child: GestureDetector( onTap: () { @@ -246,7 +276,7 @@ class _CouponPage extends State { : NoDataView( src: "assets/image/ka.webp", isShowBtn: false, - text: "目前暂无优惠券,请到领劵中心领取哦~", + text: state == 1 ? "目前暂无优惠券,请到领劵中心领取哦~" :(state == 2 ? "目前暂无已使用的优惠券哦~" :"目前暂无失效的优惠券哦~"), fontSize: 16.sp, margin: EdgeInsets.only(top: 120.h, left: 60, right: 60), ), diff --git a/lib/mine/mine_vip/mine_attainment_page.dart b/lib/mine/mine_vip/mine_attainment_page.dart index 5710f5f5..71665f2f 100644 --- a/lib/mine/mine_vip/mine_attainment_page.dart +++ b/lib/mine/mine_vip/mine_attainment_page.dart @@ -369,7 +369,7 @@ class _MineAttainmentPage extends State { height: 6.h, ), Text( - "再${vipBadgesList.length >index ? vipBadgesList[index].name :""} ${achievementDetail.length > checkPosition ?achievementDetail[checkPosition].lessScore :""} 即可升级", + "再${vipBadgesList.length >index ? vipBadgesList[index].name :""} ${AppUtils.calculateDouble(double.tryParse(achievementDetail.length > checkPosition ?achievementDetail[checkPosition].lessScore :"") ?? 0)} 即可升级", style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, diff --git a/lib/retrofit/data/user_info.dart b/lib/retrofit/data/user_info.dart index 2eb63867..4653f724 100644 --- a/lib/retrofit/data/user_info.dart +++ b/lib/retrofit/data/user_info.dart @@ -43,6 +43,7 @@ class UserInfo { String inviteCode; String signature; String background; + bool hasPayPassword; @@ -71,6 +72,7 @@ class UserInfo { ..inviteCode = json['inviteCode'] as String ..signature = json['signature'] as String ..background = json['background'] as String + ..hasPayPassword = json['hasPayPassword'] as bool ..memberRankVo = json['memberRankVo'] == null ? null : MemberRank.fromJson(json['memberRankVo'] as Map); @@ -99,6 +101,7 @@ class UserInfo { 'inviteCode' : this.inviteCode, 'signature' : this.signature, 'background' : this.background, + 'hasPayPassword' : this.hasPayPassword, 'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(), }; } diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index c619dc66..72a86318 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -39,7 +39,7 @@ part 'min_api.g.dart'; // const base_url = "http://192.168.10.37:8765/app/"; -const localBaseUrl = "https://pos.api.lotus-wallet.com/app/";///本地 +const localBaseUrl = "http://192.168.10.236:8765/app/";///本地 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index e97d9cdc..84bef5f0 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -71,7 +71,7 @@ part 'retrofit_api.g.dart'; // const base_url = "http://192.168.10.132:8766/app/";///詹云久 -const localBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///本地 +const localBaseUrl = "http://192.168.10.236:8766/app/";///本地 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 @RestApi(baseUrl: localBaseUrl) @@ -528,4 +528,12 @@ abstract class ApiService { @GET("/home/recommendRank") Future> recommendRank(); + ///发送修改支付密码的短信验证 + @GET("/member/sendVerifyByUpdatePayPwd") + Future sendVerifyByUpdatePayPwd(); + + ///修改支付密码 + @POST("/member/updatePayPwd") + Future updatePayPwd(@Body() Map param); + } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 6c5be3ef..c5912d65 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2002,4 +2002,47 @@ class _ApiService implements ApiService { ); return value; } + + @override + Future> sendVerifyByUpdatePayPwd() async { + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + '/member/sendVerifyByUpdatePayPwd', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => json as dynamic, + ); + return value; + } + + @override + Future> updatePayPwd(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>('/member/updatePayPwd', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => json as dynamic, + ); + return value; + } } diff --git a/lib/setting/account_security_page.dart b/lib/setting/account_security_page.dart new file mode 100644 index 00000000..e89a463d --- /dev/null +++ b/lib/setting/account_security_page.dart @@ -0,0 +1,131 @@ +import 'dart:convert'; + +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class AccountSecurityPage extends StatefulWidget { + @override + State createState() { + return _AccountSecurityPage(); + } +} + +class _AccountSecurityPage extends State { + ApiService apiService; + UserInfo userInfo; + + @override + void initState() { + super.initState(); + SharedPreferences.getInstance().then((value) => { + apiService = ApiService(Dio(), + context: context, token: value.getString("token")), + queryUser(), + }); + + } + + queryUser() async { + BaseData baseDate = + await apiService.queryInfo().catchError((onError) { + }); + if (baseDate != null && baseDate.isSuccess) { + userInfo = baseDate.data; + SharedPreferences.getInstance().then( + (value) => { + value.setString('user', jsonEncode(baseDate.data)), + }, + ); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + leading: GestureDetector( + child: Icon( + Icons.arrow_back_ios, + color: Colors.black, + ), + onTap: () { + Navigator.of(context).pop(); + }), + title: Text( + S.of(context).zhanghaoanquan, + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 17.sp, + color: Color(0xFF0D0D0D), + ), + ), + centerTitle: true, + elevation: 0.0, + ), + body: Container( + decoration: new BoxDecoration( + border: + Border(bottom: BorderSide(color: Color(0xffF7F7F7), width: 0.0)), + color: Color(0xffF7F7F7), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).popAndPushNamed('/router/platform_code_page',arguments:{"userInfo":userInfo}); + }, + child: Container( + padding: EdgeInsets.all(15), + margin: EdgeInsets.only(top: 14.h), + decoration: BoxDecoration( + color: Colors.white, + ), + child: Row( + children: [ + Expanded( + child: Text( + "平台支付密码", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 15.sp, + color: Color(0xFF353535), + ), + ), + flex: 1, + ), + Text( + "修改", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF4D4D4D)), + ), + SizedBox( + width:8.w, + ), + Icon( + Icons.keyboard_arrow_right, + size: 20, + ), + ], + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/setting/platform_code_page.dart b/lib/setting/platform_code_page.dart new file mode 100644 index 00000000..ac946d38 --- /dev/null +++ b/lib/setting/platform_code_page.dart @@ -0,0 +1,478 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/user_info.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/flutter_utils.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/view_widget/pay_selected_dialog.dart'; +import 'package:pin_input_text_field/pin_input_text_field.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class PlatformCodePage extends StatefulWidget { + final Map arguments; + PlatformCodePage({this.arguments}); + + @override + State createState() { + return _PlatformCodePage(); + } +} + +class _PlatformCodePage extends State { + ApiService apiService; + int codeType = 0; + UserInfo userInfo; + + @override + void initState() { + super.initState(); + } + + ///发送修改支付密码的短信验证 + sendCode() async { + if (apiService == null) { + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService(Dio(), + context: context, token: value.getString("token"), showLoading: true); + } + BaseData baseData = + await apiService.sendVerifyByUpdatePayPwd().catchError((onError) {}); + if (baseData != null && baseData.isSuccess) { + codeType = 1; + SmartDialog.showToast(baseData.data, alignment: Alignment.center); + } else { + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + } + } + + ///修改支付密码 + modifyPayCode(String payCode,String code) async { + if (apiService == null) { + SharedPreferences value = await SharedPreferences.getInstance(); + apiService = ApiService(Dio(), + context: context, token: value.getString("token"), showLoading: true); + } + BaseData baseData = await apiService.updatePayPwd({ + "newPayPwd": payCode, + "smsCode": code, + }).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + codeType=4; + SmartDialog.showToast(baseData.data, alignment: Alignment.center); + } else { + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + } + } + + @override + Widget build(BuildContext context) { + return GestureDetector( + behavior: HitTestBehavior.translucent, + onTap: () { + FocusScope.of(context).requestFocus(FocusNode()); + }, + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + leading: GestureDetector( + child: Icon( + Icons.arrow_back_ios, + color: Colors.black, + ), + onTap: () { + Navigator.of(context).pop(); + }), + title: Text( + S.of(context).pingtaizhifumima, + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 17.sp, + color: Color(0xFF0D0D0D), + ), + ), + centerTitle: true, + elevation: 0.0, + ), + body: Column( + children: [ + if(codeType == 0) + verification(), + if(codeType ==1) + verificationIssued(), + if(codeType == 2 || codeType ==3) + settingCode(), + // if(codeType == 3) + // againSettingCode(), + if(codeType == 4) + codeSuccess(), + ], + ), + )); + } + + ///设置密码 + Widget settingCode() { + return Container( + alignment: Alignment.center, + margin: EdgeInsets.only(top: 28.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + codeType== 3?"请再次输入6位数字密码":"请输入6位数字密码", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 12.h, + ), + Text( + "将用于一心回乡APP下单时平台余额消费", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFFA29E9E), + ), + ), + Container( + margin: EdgeInsets.only(top: 24.h, bottom: 31.h), + padding: EdgeInsets.only(left: 48.w, right: 48.w), + height: 45.h, + child: PinInputTextField( + decoration: BoxLooseDecoration( + strokeColorBuilder: FixedColorBuilder(Color(0xFFEBEAEA)), + textStyle: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + radius: Radius.circular(4.r)), + ), + ), + GestureDetector( + onTap: (){ + setState(() { + codeType = 3; + if(codeType == 3) + modifyPayCode("123656", "5394"); + }); + }, + child: Container( + width: 163.w, + height: 46.h, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFBBE7CC), + borderRadius: BorderRadius.circular(23.r), + ), + child: Text( + codeType== 3?"确认":"下一步", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFFFFFFFF), + ), + ), + ), + ) + ], + ), + ); + } + + ///再次输入密码 + Widget againSettingCode() { + return Container( + alignment: Alignment.center, + margin: EdgeInsets.only(top: 28.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "请再次输入6位数字密码", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 12.h, + ), + Text( + "将用于一心回乡APP下单时平台余额消费", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFFA29E9E), + ), + ), + Container( + margin: EdgeInsets.only(top: 24.h, bottom: 31.h), + padding: EdgeInsets.only(left: 48.w, right: 48.w), + height: 45.h, + child: PinInputTextField( + decoration: BoxLooseDecoration( + strokeColorBuilder: FixedColorBuilder(Color(0xFFEBEAEA)), + textStyle: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + radius: Radius.circular(4.r)), + ), + ), + GestureDetector( + onTap: (){ + setState(() { + codeType = 4; + }); + }, + child: Container( + width: 163.w, + height: 46.h, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFBBE7CC), + borderRadius: BorderRadius.circular(23.r), + ), + child: Text( + "确认", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFFFFFFFF), + ), + ), + ), + ) + ], + ), + ); + } + + ///忘记密码-验证 + Widget verification() { + return Container( + alignment: Alignment.center, + margin: EdgeInsets.only(top: 28.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "为了确认身份,我们需要验证您的手机号", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 14.h, + ), + Text( + "点击发送短信,将会发送验证码至手机", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Color(0xFFA29E9E), + ), + ), + SizedBox( + height: 14.h, + ), + Text( + AppUtils.phoneEncode(widget.arguments["userInfo"]?.phone ?? ""), + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 14.sp, + color: Color(0xFF353535), + ), + ), + GestureDetector( + onTap: () { + // sendCode(); + setState(() { + codeType = 1; + }); + }, + child: Container( + width: 163.w, + height: 46.h, + alignment: Alignment.center, + margin: EdgeInsets.only(top: 34.h), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(23.r), + ), + child: Text( + S.of(context).fasongduanxin, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFFFFFFFF), + ), + ), + ), + ) + ], + ), + ); + } + + ///验证码已发状态 + Widget verificationIssued() { + return Container( + alignment: Alignment.center, + margin: EdgeInsets.only(top: 28.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "验证码已发至 176****998", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 14.h, + ), + Text( + "55S后可重发", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 14.sp, + color: Color(0xFFA29E9E), + ), + ), + SizedBox( + height: 14.h, + ), + Container( + margin: EdgeInsets.only(top: 24.h, bottom: 31.h), + padding: EdgeInsets.only(left: 48.w, right: 48.w), + height: 55.h, + child: PinInputTextField( + pinLength: 4, + decoration: BoxLooseDecoration( + strokeColorBuilder: FixedColorBuilder(Color(0xFFEBEAEA)), + textStyle: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 20.sp, + color: Color(0xFF353535), + ), + radius: Radius.circular(4.r), + ), + ), + ), + GestureDetector( + onTap: () { + setState(() { + codeType = 2; + }); + }, + child: Container( + width: 163.w, + height: 46.h, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFBBE7CC), + borderRadius: BorderRadius.circular(23.r), + ), + child: Text( + "下一步", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFFFFFFFF), + ), + ), + )) + ], + ), + ); + } + + ///设置密码成功状态 + Widget codeSuccess() { + return Container( + alignment: Alignment.center, + margin: EdgeInsets.only(top: 31.h), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/image/icon_order_success.webp", + fit: BoxFit.cover, + width: 76, + height: 76, + ), + SizedBox( + height: 16.h, + ), + Text( + "设置密码成功", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 21.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 69.h, + ), + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + width: double.infinity, + height: 46.h, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(4.r), + ), + margin: EdgeInsets.symmetric(horizontal: 16.w), + child: Text( + S.of(context).queren, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 18.sp, + color: Color(0xFFFFFFFF), + ), + ), + ), + ) + ], + ), + ); + } + + ///平台支付密码弹窗 + assessShowBottomSheet() { + showModalBottomSheet( + context: context, + backgroundColor: Colors.transparent, + isScrollControlled: true, + builder: (context) { + return PaySelectedDialog(); + }, + ); + } +} diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index 0e5161ca..d6864c9f 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -97,6 +97,15 @@ class _SettingPage extends State { SizedBox( height: 16.h, ), + // GestureDetector( + // child: settingSingleItem(S.of(context).zhanghaoyuanquan), + // onTap: () { + // Navigator.of(context).pushNamed('/router/account_security_page'); + // }, + // ), + SizedBox( + height: 16.h, + ), GestureDetector( onTap: () { showCupertinoModalPopup( diff --git a/lib/store/shopping/shopping_home/activity_banner.dart b/lib/store/shopping/shopping_home/activity_banner.dart index 0dba3317..d21cc490 100644 --- a/lib/store/shopping/shopping_home/activity_banner.dart +++ b/lib/store/shopping/shopping_home/activity_banner.dart @@ -38,7 +38,7 @@ class _ActivityBanner extends State { return Container( margin: EdgeInsets.only(bottom:10), child: AspectRatio( - aspectRatio: 1.32, + aspectRatio: 1.27, child: Swiper( viewportFraction: 0.9, scale: 0.7, diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index b9d76d88..e0fa77a7 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -131,7 +131,7 @@ class _StoreOrderListPage extends State { onTap: () { if (widget.storeInfo.posType.code == "NORMALSTORE" && - widget.storeInfo.storeName == "百年川椒(光谷店)"||widget.storeInfo.storeName == "百年川椒(汉街店)") + widget.storeInfo.storeName == "百年川椒(光谷店)"||widget.storeInfo.storeName == "回乡农场火锅") return; else goShopDetailsPage(position); diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index 0ae3d6e6..5b2092af 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -58,19 +58,19 @@ class _UnionList extends State { if (widget.storeList[position].posType.code == "NORMALSTORE") { showDeleteDialog(); } - // else if (widget.storeList[position].posType.code == - // "RETAILSTORE" && - // widget.storeList[position].storeName == "一心回乡商城") { - // Navigator.of(context).pushNamed( - // '/router/shopping_mall_home', - // arguments: { - // "type": 0, - // "id": widget.storeList[position].id, - // "tenant": widget.storeList[position].tenantCode, - // "storeName": widget.storeList[position].storeName - // }, - // ); - // } + else if (widget.storeList[position].posType.code == + "DIRECT" && + widget.storeList[position].storeName == "一心回乡商城") { + Navigator.of(context).pushNamed( + '/router/shopping_mall_home', + arguments: { + "type": 0, + "id": widget.storeList[position].id, + "tenant": widget.storeList[position].tenantCode, + "storeName": widget.storeList[position].storeName + }, + ); + } else { Navigator.of(context).pushNamed( diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 395b1399..c9be6c29 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -295,6 +295,7 @@ class UnionPageState extends State FocusScope.of(context).requestFocus(FocusNode()); }, child:Scaffold( + resizeToAvoidBottomInset: false, appBar: MyAppBar( title: "", leading: false, diff --git a/lib/view_widget/new_coupon_widget.dart b/lib/view_widget/new_coupon_widget.dart index 17714a8c..050786fd 100644 --- a/lib/view_widget/new_coupon_widget.dart +++ b/lib/view_widget/new_coupon_widget.dart @@ -71,7 +71,7 @@ class NewCouponWidget extends StatelessWidget { topLeft: Radius.circular(6), bottomLeft: Radius.circular(6), ), - color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3) :Color(0xFF32A060), ) ), Expanded( @@ -103,7 +103,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), ), ):Row( mainAxisAlignment: MainAxisAlignment.start, @@ -116,7 +116,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), ), ), Column( @@ -130,7 +130,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), ), ), SizedBox(height: 5,), @@ -141,7 +141,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), ), ) @@ -160,12 +160,12 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.regular, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF4D4D4D), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xFF4D4D4D), ), ), Icon( Icons.keyboard_arrow_right, - color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), size: 20, ) ], @@ -397,7 +397,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 22.sp, fontWeight: MyFontWeight.medium, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), SizedBox( @@ -412,7 +412,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 35.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -425,7 +425,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -445,7 +445,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 26.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -456,7 +456,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -476,7 +476,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 26.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -487,7 +487,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -507,7 +507,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 22.sp, fontWeight: MyFontWeight.medium, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), SizedBox( @@ -520,7 +520,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 35.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -545,7 +545,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 37.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), SizedBox( @@ -556,7 +556,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 20.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], @@ -566,7 +566,7 @@ class NewCouponWidget extends StatelessWidget { style: TextStyle( fontSize: 12.sp, fontWeight: MyFontWeight.semi_bold, - color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), + color: (coupon.status ==2 || coupon.status == 3) ? Color(0xFFB3B3B3):Color(0xff32A060), ), ), ], diff --git a/lib/view_widget/pay_selected_dialog.dart b/lib/view_widget/pay_selected_dialog.dart new file mode 100644 index 00000000..d64ba68d --- /dev/null +++ b/lib/view_widget/pay_selected_dialog.dart @@ -0,0 +1,115 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:pin_input_text_field/pin_input_text_field.dart'; + +class PaySelectedDialog extends StatefulWidget { + + @override + State createState() { + return _PaySelectedDialog(); + } + +} + +class _PaySelectedDialog extends State { + @override + Widget build(BuildContext context) { + return StatefulBuilder( + builder: (BuildContext context, StateSetter setState) { + return Container( + width: double.infinity, + height: 250.h, + padding: EdgeInsets.only( + left: 16.w, + right: 16.w, + top: 20.h, + bottom: 20.h, + ), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Color(0x000000).withAlpha(25), + offset: Offset(0, 1), + blurRadius: 12.0, + ), + ], + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(8), + topRight: Radius.circular(8),), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Align( + alignment: Alignment.center, + child: Text( + "请输入支付密码", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF000000), + ), + ), + )), + GestureDetector( + onTap: () { + setState(() { + Navigator.of(context).pop(); + }); + }, + child: Icon( + Icons.close, + color: Colors.black, + size: 20, + ), + ), + SizedBox(width: 14), + ], + ), + Container( + margin: EdgeInsets.only(top: 24.h, bottom:10.h), + padding: EdgeInsets.only(left: 48.w, right: 48.w), + height: 40.h, + child: PinInputTextField( + decoration: BoxLooseDecoration( + strokeColorBuilder: FixedColorBuilder(Color(0xFFEBEAEA)), + textStyle: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 18.sp, + color: Color(0xFF353535), + ), + radius: Radius.circular(4.r), + ), + ), + ), + GestureDetector( + onTap: (){}, + child: Text( + "忘记密码?", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 12.sp, + color: Color(0xFF32A060), + ), + ), + ) + ], + ), + ); + }, + ); + } + + + + +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index a16036f5..2d7f0280 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -511,6 +511,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.13.0" + pin_input_text_field: + dependency: "direct main" + description: + name: pin_input_text_field + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.2" platform: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 075d3bec..79c9a6ef 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 一心回乡. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 2.0.20+10 +version: 2.0.22+11 environment: sdk: ">=2.7.0 <3.0.0" @@ -43,6 +43,7 @@ dependencies: retrofit: ^1.3.4+1 json_annotation: ^3.1.1 logger: ^1.0.0 + pin_input_text_field: ^4.1.2 android_intent_plus: ^1.0.2 flutter_screenutil: ^5.0.0+1