diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index d99bf661..bdb208b6 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -186,6 +186,7 @@ 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 81880E8F5E90EA6E5E0D57EB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 89847A4826A14482008C8077 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -447,6 +448,7 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( + 89847A4826A14482008C8077 /* Runner.entitlements */, 6EE8F2E42695813500237A5E /* UniMPSDK */, 6EE8F2E32695806400237A5E /* Class */, 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, @@ -706,6 +708,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; @@ -903,6 +906,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; @@ -995,6 +999,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c5375023..fb2dffc4 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -40,7 +40,7 @@ $(MARKETING_VERSION) CFBundleSignature ???? + CFBundleURLTypes + + + + CFBundleVersion $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS @@ -47,6 +52,8 @@ 定位 NSLocationAlwaysUsageDescription 是否允许访问位置信息 + NSLocationUsageDescription + NSLocationWhenInUseUsageDescription 定位 NSMicrophoneUsageDescription diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 4a356aa9..84a4a0b3 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -111,10 +111,12 @@ class MessageLookup extends MessageLookupByLibrary { "dangqiandengji" : MessageLookupByLibrary.simpleMessage("当前等级"), "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等级"), + "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家确认"), "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"), "diancan" : MessageLookupByLibrary.simpleMessage("点餐"), "dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"), "dingdan" : MessageLookupByLibrary.simpleMessage("订单"), + "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("订单待发货"), "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("订单待支付"), "dingdanhao" : MessageLookupByLibrary.simpleMessage("订单号"), "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), @@ -145,6 +147,7 @@ class MessageLookup extends MessageLookupByLibrary { "ge" : m4, "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), "gerenxinxi" : MessageLookupByLibrary.simpleMessage("个人信息"), + "gong" : MessageLookupByLibrary.simpleMessage("共"), "gongjijianshangpin" : m5, "gongli" : m6, "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和一心回乡服务协议"), @@ -152,6 +155,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "heji" : MessageLookupByLibrary.simpleMessage("合计:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"), @@ -169,6 +173,7 @@ class MessageLookup extends MessageLookupByLibrary { "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), "jifen" : MessageLookupByLibrary.simpleMessage("积分"), @@ -223,6 +228,7 @@ class MessageLookup extends MessageLookupByLibrary { "mi" : m14, "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), + "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), "peisong" : MessageLookupByLibrary.simpleMessage("配送"), @@ -332,6 +338,7 @@ class MessageLookup extends MessageLookupByLibrary { "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), "weihexiao" : MessageLookupByLibrary.simpleMessage("未核销"), "weikaiqi" : MessageLookupByLibrary.simpleMessage("未开启"), + "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), @@ -386,7 +393,8 @@ class MessageLookup extends MessageLookupByLibrary { "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), "youxiaoqizhi" : m26, - "yuan" : m27, + "yuan" : MessageLookupByLibrary.simpleMessage("元"), + "yuan_" : m27, "yue" : MessageLookupByLibrary.simpleMessage("余额"), "yue_" : m28, "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 6d2696cb..f754dcb6 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -111,10 +111,12 @@ class MessageLookup extends MessageLookupByLibrary { "dangqiandengji" : MessageLookupByLibrary.simpleMessage("当前等级"), "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("当前商品兑换核销码已核销完成"), "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等级"), + "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家确认"), "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用户取餐"), "diancan" : MessageLookupByLibrary.simpleMessage("点餐"), "dianwolingqu" : MessageLookupByLibrary.simpleMessage("点我领取"), "dingdan" : MessageLookupByLibrary.simpleMessage("订单"), + "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("订单待发货"), "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("订单待支付"), "dingdanhao" : MessageLookupByLibrary.simpleMessage("订单号"), "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), @@ -145,6 +147,7 @@ class MessageLookup extends MessageLookupByLibrary { "ge" : m4, "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多优惠券"), "gerenxinxi" : MessageLookupByLibrary.simpleMessage("个人信息"), + "gong" : MessageLookupByLibrary.simpleMessage("共"), "gongjijianshangpin" : m5, "gongli" : m6, "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("请勾选同意隐私服务和一心回乡服务协议"), @@ -152,6 +155,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), + "heji" : MessageLookupByLibrary.simpleMessage("合计:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核销成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核销码详情"), "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黄金会员"), @@ -169,6 +173,7 @@ class MessageLookup extends MessageLookupByLibrary { "input_code_hide" : MessageLookupByLibrary.simpleMessage("请输入验证码"), "input_phone" : MessageLookupByLibrary.simpleMessage("输入手机号"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("请输入你的手机号"), + "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加载失败"), "jiesuanjine" : MessageLookupByLibrary.simpleMessage("结算金额"), "jifen" : MessageLookupByLibrary.simpleMessage("积分"), @@ -223,6 +228,7 @@ class MessageLookup extends MessageLookupByLibrary { "mi" : m14, "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), + "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一个订单需要前往门店领取"), "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一个新的订单"), "peisong" : MessageLookupByLibrary.simpleMessage("配送"), @@ -332,6 +338,7 @@ class MessageLookup extends MessageLookupByLibrary { "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日信息得专属优惠劵"), "weihexiao" : MessageLookupByLibrary.simpleMessage("未核销"), "weikaiqi" : MessageLookupByLibrary.simpleMessage("未开启"), + "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息"), "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), @@ -386,7 +393,8 @@ class MessageLookup extends MessageLookupByLibrary { "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("优惠券领取"), "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("优惠金额无法累积积分,订单撤销或其他原因造成的未成功支付的订单,无法获得对应的积分。"), "youxiaoqizhi" : m26, - "yuan" : m27, + "yuan" : MessageLookupByLibrary.simpleMessage("元"), + "yuan_" : m27, "yue" : MessageLookupByLibrary.simpleMessage("余额"), "yue_" : m28, "yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index d6b7cfb4..8162fad1 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -111,10 +111,12 @@ class MessageLookup extends MessageLookupByLibrary { "dangqiandengji" : MessageLookupByLibrary.simpleMessage("當前等級"), "dangqianshangpinduihuanhexiaoma" : MessageLookupByLibrary.simpleMessage("當前商品兌換核銷碼已核銷完成 "), "daoxiayidengji" : MessageLookupByLibrary.simpleMessage("到下一等級"), + "dengdaishangjiaqueren" : MessageLookupByLibrary.simpleMessage("等待商家確認"), "dengdaiyonghuqucan" : MessageLookupByLibrary.simpleMessage("等待用戶取餐"), "diancan" : MessageLookupByLibrary.simpleMessage("點餐"), "dianwolingqu" : MessageLookupByLibrary.simpleMessage("點我領取"), "dingdan" : MessageLookupByLibrary.simpleMessage("訂單"), + "dingdandaifahuo" : MessageLookupByLibrary.simpleMessage("訂單待發貨"), "dingdandaizhifu" : MessageLookupByLibrary.simpleMessage("訂單待支付"), "dingdanhao" : MessageLookupByLibrary.simpleMessage("訂單號"), "dingdanqueren" : MessageLookupByLibrary.simpleMessage("订单确认"), @@ -145,6 +147,7 @@ class MessageLookup extends MessageLookupByLibrary { "ge" : m4, "gengduoyouhuiquan" : MessageLookupByLibrary.simpleMessage("更多優惠券"), "gerenxinxi" : MessageLookupByLibrary.simpleMessage("個人信息"), + "gong" : MessageLookupByLibrary.simpleMessage("共"), "gongjijianshangpin" : m5, "gongli" : m6, "gouxuanxieyi" : MessageLookupByLibrary.simpleMessage("請勾選同意隱私服務和一心回鄉服務協定"), @@ -152,6 +155,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanyu" : MessageLookupByLibrary.simpleMessage("關於"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), + "heji" : MessageLookupByLibrary.simpleMessage("合計:"), "hexiaochenggong" : MessageLookupByLibrary.simpleMessage("核銷成功"), "hexiaomaxiangqing" : MessageLookupByLibrary.simpleMessage("核銷碼詳情"), "huangjinhuiyuan" : MessageLookupByLibrary.simpleMessage("黃金會員"), @@ -169,6 +173,7 @@ class MessageLookup extends MessageLookupByLibrary { "input_code_hide" : MessageLookupByLibrary.simpleMessage("請輸入驗證碼"), "input_phone" : MessageLookupByLibrary.simpleMessage("輸入手機號"), "input_phone_hide" : MessageLookupByLibrary.simpleMessage("請輸入你的手機號"), + "jian" : MessageLookupByLibrary.simpleMessage("件"), "jiazaishibai" : MessageLookupByLibrary.simpleMessage("加載失敗"), "jiesuanjine" : MessageLookupByLibrary.simpleMessage("結算金額"), "jifen" : MessageLookupByLibrary.simpleMessage("積分"), @@ -223,6 +228,7 @@ class MessageLookup extends MessageLookupByLibrary { "mi" : m14, "mingxi" : MessageLookupByLibrary.simpleMessage("明細"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"), + "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), "ninyouyigedingdanyaolingqu" : MessageLookupByLibrary.simpleMessage("您有一個訂單需要前往門店領取"), "ninyouyigexindedingdan" : MessageLookupByLibrary.simpleMessage("您有一個新訂單"), "peisong" : MessageLookupByLibrary.simpleMessage("配送"), @@ -332,6 +338,7 @@ class MessageLookup extends MessageLookupByLibrary { "wanshanshengrixinxi_yhq" : MessageLookupByLibrary.simpleMessage("完善生日資訊得專屬優惠劵 "), "weihexiao" : MessageLookupByLibrary.simpleMessage("未核銷"), "weikaiqi" : MessageLookupByLibrary.simpleMessage("未開啓"), + "weilexiangnintuijianfujindemendianxinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息"), "weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "), "weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"), "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), @@ -386,7 +393,8 @@ class MessageLookup extends MessageLookupByLibrary { "youhuiquanlingqu" : MessageLookupByLibrary.simpleMessage("優惠券領取"), "youhuiquanwufajileijifen" : MessageLookupByLibrary.simpleMessage("優惠金額無法累積積分,訂單撤銷或其他原因造成的未成功支付的訂單,無法獲得對應的積分。"), "youxiaoqizhi" : m26, - "yuan" : m27, + "yuan" : MessageLookupByLibrary.simpleMessage("元"), + "yuan_" : m27, "yue" : MessageLookupByLibrary.simpleMessage("餘額"), "yue_" : m28, "yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 99b1cd68..fccab9b3 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -436,10 +436,10 @@ class S { } /// `{yuan}元` - String yuan(Object yuan) { + String yuan_(Object yuan) { return Intl.message( '$yuan元', - name: 'yuan', + name: 'yuan_', desc: '', args: [yuan], ); @@ -3335,20 +3335,91 @@ class S { ); } - /// `隐私政策` - String get yinsizhengce { + /// `已领取` + String get yilingqu { return Intl.message( - '隐私政策', - name: 'yinsizhengce', + '已领取', + name: 'yilingqu', desc: '', args: [], ); } - /// `已领取` - String get yilingqu { + + /// `合计:` + String get heji { return Intl.message( - '已领取', - name: 'yilingqu', + '合计:', + name: 'heji', + desc: '', + args: [], + ); + } + + /// `元` + String get yuan { + return Intl.message( + '元', + name: 'yuan', + desc: '', + args: [], + ); + } + + /// `共` + String get gong { + return Intl.message( + '共', + name: 'gong', + desc: '', + args: [], + ); + } + + /// `件` + String get jian { + return Intl.message( + '件', + name: 'jian', + desc: '', + args: [], + ); + } + + /// `您定位功能开关未开启,请点击去打開定位` + String get nindingweigongnengweikaiqi { + return Intl.message( + '您定位功能开关未开启,请点击去打開定位', + name: 'nindingweigongnengweikaiqi', + desc: '', + args: [], + ); + } + + /// `为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息` + String get weilexiangnintuijianfujindemendianxinxi { + return Intl.message( + '为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息', + name: 'weilexiangnintuijianfujindemendianxinxi', + desc: '', + args: [], + ); + } + + /// `等待商家确认` + String get dengdaishangjiaqueren { + return Intl.message( + '等待商家确认', + name: 'dengdaishangjiaqueren', + desc: '', + args: [], + ); + } + + /// `订单待发货` + String get dingdandaifahuo { + return Intl.message( + '订单待发货', + name: 'dingdandaifahuo', desc: '', args: [], ); diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 39e2b5e0..2cd642e9 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -372,7 +372,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { child: Text( S .of(context) - .yuan(double.tryParse(goods.worth).toInt()), + .yuan_(double.tryParse(goods.worth).toInt()), overflow: TextOverflow.ellipsis, style: TextStyle( color: Color(0xFF585858), diff --git a/lib/home/huixiang_brand_page.dart b/lib/home/huixiang_brand_page.dart index ae8de78a..c2fb48a0 100644 --- a/lib/home/huixiang_brand_page.dart +++ b/lib/home/huixiang_brand_page.dart @@ -333,83 +333,93 @@ class _BrandPage extends State Navigator.of(context).pushNamed('/router/founder_story_page'); }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ ClipOval( child: MImage( brandData == null ? "" : brandData.originAvatar, fit: BoxFit.cover, - width: 60, - height: 60, + width: 60.w, + height: 60.h, errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), clipBehavior: Clip.hardEdge, ), SizedBox( - width: 16, + width: 16.w, ), Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text.rich( - TextSpan(children: [ - TextSpan( - text: brandData == null ? "" : brandData.originator, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14, - color: Colors.black, + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text.rich( + TextSpan(children: [ + TextSpan( + text: + brandData == null ? "" : brandData.originator, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14.sp, + color: Colors.black, + ), ), - ), - TextSpan( - text: " 集团创办人", - style: TextStyle( - fontSize: 10, - color: Colors.black, + TextSpan( + text: " 集团创办人", + style: TextStyle( + fontSize: 10.sp, + color: Colors.black, + ), ), + ]), + textDirection: TextDirection.ltr, + ), + Text( + "李旭清女士于1993年创建以「地球公民责任」为企业理念,打造一个与环境共存共荣的永续有机产业的台湾回乡有机集团。" + "2018年10月李旭清女士带领20几位台湾核心干部返乡落地武汉,将台湾有机产业成功经验带回湖北家乡," + "将产业规模涵盖有机生态农业、食品加工、健康餐饮、文旅、电商、金融、信息、地产等领域。", + overflow: isShowMore + ? TextOverflow.visible + : TextOverflow.ellipsis, + maxLines: isShowMore ? 10 : 1, + style: TextStyle( + fontSize: 12.sp, + color: Colors.black, ), - ]), - textDirection: TextDirection.ltr, - ), - Text( - "李旭清女士于1993年创建以「地球公民责任」为企业理念,打造一个与环境共存共荣的永续有机产业的台湾回乡有机集团。" - "2018年10月李旭清女士带领20几位台湾核心干部返乡落地武汉,将台湾有机产业成功经验带回湖北家乡," - "将产业规模涵盖有机生态农业、食品加工、健康餐饮、文旅、电商、金融、信息、地产等领域。", - softWrap: true, - overflow: isShowMore?TextOverflow.visible:TextOverflow.ellipsis, - style: TextStyle(fontSize: 12, color: Colors.black), - ), - SizedBox(height: 3), - GestureDetector( - onTap: (){ - setState(() { - isShowMore=!isShowMore; - }); - }, - child: Expanded( + ), + SizedBox(height: 3.h), + GestureDetector( + onTap: () { + setState(() { + isShowMore = !isShowMore; + }); + }, child: Row( mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.max, children: [ Text( "更多", style: TextStyle( - fontSize: 12, color: Colors.black), + fontSize: 12.sp, + color: Colors.black, + ), ), Icon( (isShowMore != null && !isShowMore) ? Icons.chevron_right - : Icons.keyboard_arrow_up, + : Icons.keyboard_arrow_up, color: Colors.black, size: 18, ), ], ), ), - ), - ], + ], + ), ), flex: 1, ), @@ -462,12 +472,9 @@ class _BrandPage extends State // ), Row( children: [ - _ideaWidget("友爱", - "assets/image/icon_idea_ya.png"), - _ideaWidget("纯净", - "assets/image/icon_idea_cj.png"), - _ideaWidget("健康", - "assets/image/icon_idea_jk.png"), + _ideaWidget("友爱", "assets/image/icon_idea_ya.png"), + _ideaWidget("纯净", "assets/image/icon_idea_cj.png"), + _ideaWidget("健康", "assets/image/icon_idea_jk.png"), ], ), SizedBox( @@ -481,12 +488,9 @@ class _BrandPage extends State // ), Row( children: [ - _ideaWidget("有机", - "assets/image/icon_idea_yj.png"), - _ideaWidget("环保", - "assets/image/icon_idea_hb.png"), - _ideaWidget("智慧", - "assets/image/icon_idea_zh.png"), + _ideaWidget("有机", "assets/image/icon_idea_yj.png"), + _ideaWidget("环保", "assets/image/icon_idea_hb.png"), + _ideaWidget("智慧", "assets/image/icon_idea_zh.png"), ], ), ], @@ -515,20 +519,22 @@ class _BrandPage extends State Container( width: 63, height: 63, - child:Stack( + child: Stack( alignment: Alignment.center, children: [ Align( child: CircleAvatar( - child: Image.asset( - img), + child: Image.asset(img), radius: 100, ), ), - Text(text,style:TextStyle( - fontSize: 18, - fontWeight: FontWeight.w300, - color: Colors.white) ,) + Text( + text, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w300, + color: Colors.white), + ) ], ), // CircleAvatar( diff --git a/lib/home/main_home_page.dart b/lib/home/main_home_page.dart index 78e8efd0..64421c37 100644 --- a/lib/home/main_home_page.dart +++ b/lib/home/main_home_page.dart @@ -17,7 +17,7 @@ class MainHomePage extends StatefulWidget { class _MainHomePage extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { - var tabcontroller; + TabController tabcontroller; List _widgetOptions; @override @@ -94,6 +94,7 @@ class _MainHomePage extends State body: Container( padding: EdgeInsets.only(bottom: 76.h), child: TabBarView( + physics: BouncingScrollPhysics(), children: _widgetOptions, controller: tabcontroller, ), diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index 63441062..3a7eb408 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -312,7 +312,7 @@ class _PointsMallPage extends State Column( children: [ Text( - S.of(context).yuan(goods.worth), + S.of(context).yuan_(goods.worth), style: TextStyle( color: Color(0xFF585858), decoration: TextDecoration.lineThrough, diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 70f6d315..4b72177b 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -39,7 +39,7 @@ "jifengaodaodi": "积分从高到低", "jifendidaogao": "积分从低到高", "yiduihuanjian": "已兑换{jian}件", - "yuan": "{yuan}元", + "yuan_": "{yuan}元", "jifen_": "{jifen}积分", "jifenxiangqing": "积分详情", "dangqiandengji": "当前等级", @@ -347,6 +347,14 @@ "dianwolingqu": "点我领取", "chengweidianpuzhuanshuhuiyuan": "成为店铺专属会员,享专属权益", "yilingqu": "已领取", + "heji": "合计:", + "yuan": "元", + "gong": "共", + "jian": "件", + "nindingweigongnengweikaiqi": "您定位功能开关未开启,请点击去打開定位", + "weilexiangnintuijianfujindemendianxinxi": "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息", + "dengdaishangjiaqueren": "等待商家确认", + "dingdandaifahuo": "订单待发货", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index d8a5b909..40db22cb 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -39,7 +39,7 @@ "jifengaodaodi": "积分从高到低", "jifendidaogao": "积分从低到高", "yiduihuanjian": "已兑换{jian}件", - "yuan": "{yuan}元", + "yuan_": "{yuan}元", "jifen_": "{jifen}积分", "jifenxiangqing": "积分详情", "dangqiandengji": "当前等级", @@ -348,6 +348,14 @@ "chengweidianpuzhuanshuhuiyuan": "成为店铺专属会员,享专属权益", "yilingqu": "已领取", "yinsizhengce": "隐私政策", + "heji": "合计:", + "yuan": "元", + "gong": "共", + "jian": "件", + "nindingweigongnengweikaiqi": "您定位功能开关未开启,请点击去打開定位", + "weilexiangnintuijianfujindemendianxinxi": "为了向您推荐附近的门店信息,推荐您在使用期间让我们使用位置信息", + "dengdaishangjiaqueren": "等待商家确认", + "dingdandaifahuo": "订单待发货", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 52b0f635..d71faa90 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -39,7 +39,7 @@ "jifengaodaodi": "積分從高到低", "jifendidaogao": "積分從低到高", "yiduihuanjian": "已兌換{jian}件", - "yuan": "{yuan}元", + "yuan_": "{yuan}元", "jifen_": "{jifen}積分", "dangqiandengji": "當前等級", "jifendaoxiayidengji": "{jifen}積分 到下一個等級", @@ -340,6 +340,14 @@ "chengweidianpuzhuanshuhuiyuan": "成為專屬會員,享專屬權益", "yilingqu": "已領取", "yinsizhengce": "隱私政策", + "heji": "合計:", + "yuan": "元", + "gong": "共", + "jian": "件", + "nindingweigongnengweikaiqi": "您定位功能開關未開啟,請點擊去開啟定位", + "weilexiangnintuijianfujindemendianxinxi": "為了向您推薦附近的門店信息,推薦您在使用期間讓我們使用位置信息", + "dengdaishangjiaqueren": "等待商家確認", + "dingdandaifahuo": "訂單待發貨", diff --git a/lib/mine/mine_card_page.dart b/lib/mine/mine_card_page.dart index 67b544c7..ad242a80 100644 --- a/lib/mine/mine_card_page.dart +++ b/lib/mine/mine_card_page.dart @@ -1,15 +1,8 @@ -import 'package:dio/dio.dart'; + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/mine/vip_card_page.dart'; -import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; -import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/retrofit_api.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'coupons_page.dart'; diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index ddf6e6e8..c3e19be4 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -496,9 +496,6 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { ), ], ), - SizedBox( - height: 16.h, - ), Text( userinfo == null ? "NO.0" : "NO.${userinfo.vipNo}", style: TextStyle( @@ -506,9 +503,6 @@ class _MinePage extends State with AutomaticKeepAliveClientMixin { color: Color(0xFF2F2F2F), ), ), - SizedBox( - height: 8.h, - ), Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/mine/mine_vip_level_page.dart b/lib/mine/mine_vip_level_page.dart index 847eb2d6..85a85afa 100644 --- a/lib/mine/mine_vip_level_page.dart +++ b/lib/mine/mine_vip_level_page.dart @@ -1,4 +1,3 @@ -import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; @@ -107,7 +106,7 @@ class _MineVipLevelPage extends State { curLevel: widget.arguments["rankLevel"], padding: 6.w, rank: widget.arguments["points"], - rankMax: ranks[position].rankOrigin, + rankMax: (position < (ranks.length - 1)) ? ranks[position + 1].rankOrigin : ranks[position].rankOrigin, createTime: ranks[position].createTime, ); }, @@ -207,10 +206,9 @@ class _MineVipLevelPage extends State { children: ranks != null ? ranks.map((e) { return levelItem( - e, - ranks.indexOf(e) == 0 - ? 0 - : ranks[ranks.indexOf(e) - 1].rankOrigin); + e, ranks[ranks.indexOf(e)].rankOrigin, + ranks.indexOf(e) == (ranks.length - 1) + ? 0 : ranks[ranks.indexOf(e) + 1].rankOrigin); }).toList() : [], ), @@ -289,7 +287,7 @@ class _MineVipLevelPage extends State { ); } - Widget levelItem(Rank rank, rankOrigin) { + Widget levelItem(Rank rank, rankOrigin, rankOriginMax) { return Container( margin: EdgeInsets.symmetric(vertical: 8.h), child: Row( @@ -309,9 +307,7 @@ class _MineVipLevelPage extends State { ), Expanded( child: Text( - rank.rankOrigin == 0 - ? "0" - : "${rankOrigin + 1} - ${rank.rankOrigin}", + "$rankOrigin - ${rankOriginMax == 0 ? "无限" : rankOriginMax}", textAlign: TextAlign.center, style: TextStyle( fontSize: 14.sp, diff --git a/lib/mine/roll_center_page.dart b/lib/mine/roll_center_page.dart index 8e9fad55..cb2ccd4a 100644 --- a/lib/mine/roll_center_page.dart +++ b/lib/mine/roll_center_page.dart @@ -12,7 +12,6 @@ import 'package:huixiang/view_widget/item_title.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/new_coupon_widget.dart'; import 'package:huixiang/view_widget/receive_success.dart'; -import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/selector_store_dialog.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/lib/mine/vip_detail_page.dart b/lib/mine/vip_detail_page.dart index 05a62cc6..7661a32c 100644 --- a/lib/mine/vip_detail_page.dart +++ b/lib/mine/vip_detail_page.dart @@ -499,7 +499,7 @@ class _VipDetailPage extends State { ), ), TextSpan( - text: S.of(context).yuan("58.2"), + text: S.of(context).yuan_("58.2"), style: TextStyle( fontSize: 12.sp, fontWeight: FontWeight.bold, diff --git a/lib/order/exchange_order_detail_page.dart b/lib/order/exchange_order_detail_page.dart index e7a11ecb..10a9816f 100644 --- a/lib/order/exchange_order_detail_page.dart +++ b/lib/order/exchange_order_detail_page.dart @@ -330,7 +330,7 @@ class _ExchangeOrderDetailPage extends State { fontSize: 12, color: Color(0xFFA29E9E)), )), Text( - S.of(context).yuan(8), + S.of(context).yuan_(8), style: TextStyle( fontWeight: FontWeight.bold, fontSize: 12, @@ -379,7 +379,7 @@ class _ExchangeOrderDetailPage extends State { flex: 1, ), Text( - S.of(context).yuan(-3.0), + S.of(context).yuan_(-3.0), style: TextStyle( fontSize: 12, color: color, diff --git a/lib/order/order_detail_page.dart b/lib/order/order_detail_page.dart index f0e3b716..ba1733b4 100644 --- a/lib/order/order_detail_page.dart +++ b/lib/order/order_detail_page.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon_vo.dart'; import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/flutter_utils.dart'; @@ -104,9 +103,9 @@ class _OrderDetailPage extends State { titleSpacing: 2, leadingWidth: 56.w, bottom: PreferredSize( - preferredSize: Size(double.infinity, orderStatus >= 4 ? 88.h : 98.h), + preferredSize: Size(double.infinity, orderStatus >= 4 ? 98.h : 108.h), child: Container( - height: orderStatus >= 4 ? 88.h : 98.h, + height: orderStatus >= 4 ? 98.h : 108.h, padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h), child: Column( children: [ @@ -114,7 +113,7 @@ class _OrderDetailPage extends State { visible: center != null && center != "", child: Container( child: IconText( - S.of(context).dingdanyiwancheng, + (center != null && center != "") ? center : "", leftImage: "assets/image/icon_order_ok.png", iconSize: 40.w, textStyle: TextStyle( @@ -144,14 +143,12 @@ class _OrderDetailPage extends State { width: 42.w, height: 20.h, textColor: Colors.white, + fontSize: 12.sp, padding: EdgeInsets.fromLTRB(8.w, 1.h, 8.w, 1.h), backgroup: Color(0xFF32A060), radius: 15.w, ), - SizedBox( - height: 6.h, - ), Text( title, style: TextStyle( @@ -171,9 +168,12 @@ class _OrderDetailPage extends State { children: timeWidget(), ), ), - visible: (isTakeOut == 0) ? !(payStatus == 1) : - (isTakeOut == 1) ? !(payStatus == 1 && (sendStatus != 2 && sendStatus != 3)) : - !(payStatus == 1 && (sendStatus != 1)), + visible: (orderStatus >= 4) ? false : (isTakeOut == 0) + ? !(payStatus == 1) + : (isTakeOut == 1) + ? !(payStatus == 1 && + (sendStatus != 2 && sendStatus != 3)) + : !(payStatus == 1 && (sendStatus != 1)), ) ], ), @@ -230,7 +230,7 @@ class _OrderDetailPage extends State { } List timeWidget() { - if(orderInfo == null) return []; + if (orderInfo == null) return []; String hour = ""; String minute = ""; if (payStatus == 0) { @@ -325,69 +325,73 @@ class _OrderDetailPage extends State { title = S.of(context).dingdanyiwancheng; center = S.of(context).dingdanyiwancheng; break; - } - if (refundStatus == 1) { - title = S.of(context).dingdanyituikuan; - center = S.of(context).dingdanyituikuan; + case 5: + title = S.of(context).yiquxiao; + center = S.of(context).yiquxiao; + break; } } } else if (isTakeOut == 1) { if (payStatus == 0) { title = S.of(context).dingdandaizhifu; } else { - title = "等待商家确认"; - switch (sendStatus) { - case 1: - title = S.of(context).zhengzaihujiaoqishou; - break; - case 2: - title = S.of(context).qishouyijiedanquhuozhong; - break; - case 3: - title = S.of(context).qishoupeisongzhongyujisongdashijian; - break; - case 4: - title = S.of(context).dingdanyisongda; - center = S.of(context).dingdanyisongda; - switch (orderStatus) { - case 4: - title = S.of(context).dingdanyiwancheng; - center = S.of(context).dingdanyiwancheng; - break; - } - break; - } - if (refundStatus == 1) { - title = S.of(context).dingdanyituikuan; - center = S.of(context).dingdanyituikuan; + title = S.of(context).dengdaishangjiaqueren; + if (orderStatus < 4) { + switch (sendStatus) { + case 1: + title = S.of(context).zhengzaihujiaoqishou; + break; + case 2: + title = S.of(context).qishouyijiedanquhuozhong; + break; + case 3: + title = S.of(context).qishoupeisongzhongyujisongdashijian; + break; + case 4: + title = S.of(context).dingdanyisongda; + center = S.of(context).dingdanyisongda; + switch (orderStatus) { + case 4: + title = S.of(context).dingdanyiwancheng; + center = S.of(context).dingdanyiwancheng; + break; + } + break; + } + } else if (orderStatus == 4) { + title = S.of(context).dingdanyiwancheng; + center = S.of(context).dingdanyiwancheng; } } } else if (isTakeOut == 2) { if (payStatus == 0) { title = S.of(context).dingdandaizhifu; } else { - title = "订单待发货"; - switch (sendStatus) { - case 1: - title = S.of(context).shangjiayifahuo; - break; - case 4: - title = S.of(context).huopinyisongda; - center = S.of(context).huopinyisongda; - switch (orderStatus) { - case 4: - title = S.of(context).dingdanyiwancheng; - center = S.of(context).dingdanyiwancheng; - break; - } - break; - } - if (refundStatus == 1) { - title = S.of(context).dingdanyituikuan; - center = S.of(context).dingdanyituikuan; + title = S.of(context).dingdandaifahuo; + if (orderStatus < 4) { + switch (sendStatus) { + case 1: + title = S.of(context).shangjiayifahuo; + break; + case 4: + title = S.of(context).huopinyisongda; + center = S.of(context).huopinyisongda; + break; + } + } else if (orderStatus == 4) { + title = S.of(context).dingdanyiwancheng; + center = S.of(context).dingdanyiwancheng; } } } + if (orderStatus == 5) { + title = S.of(context).yiquxiao; + center = S.of(context).yiquxiao; + } + if (refundStatus == 1) { + title = S.of(context).dingdanyituikuan; + center = S.of(context).dingdanyituikuan; + } } Widget couponRemarks() { @@ -438,7 +442,7 @@ class _OrderDetailPage extends State { Text( S .of(context) - .yuan(orderInfo != null ? orderInfo.finalPayPrice : "0"), + .yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"), style: TextStyle( fontSize: 20.sp, color: Color(0xFF32A060), @@ -716,84 +720,90 @@ class _OrderDetailPage extends State { ), ), ), - Container( - margin: EdgeInsets.only(top: 20.h, bottom: 16.h), - child: MySeparator( - width: 5.w, - height: 1.h, - color: Color(0xFFA29E9E), + Visibility( + visible: orderStatus < 5, + child: Container( + margin: EdgeInsets.only(top: 20.h, bottom: 16.h), + child: MySeparator( + width: 5.w, + height: 1.h, + color: Color(0xFFA29E9E), + ), ), ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - InkWell( - onTap: () { - showModalBottomSheet( - context: context, - builder: (context) { - return PayInputWidget(); - }, - ); - }, - child: Column( - children: [ - Image.asset( - payStatus == 0 - ? "assets/image/icon_order_cancel.png" - : "assets/image/icon_request_refund.png", - width: 24.w, - height: 24.h, - fit: BoxFit.contain, - ), - SizedBox( - height: 8.h, - ), - Text( - payStatus == 0 - ? S.of(context).quxiaodingdan - : S.of(context).shenqingtuikuan, - style: TextStyle( - color: Color(0xFF353535), - fontSize: 12.sp, + Visibility( + visible: orderStatus < 5, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + showModalBottomSheet( + context: context, + builder: (context) { + return PayInputWidget(); + }, + ); + }, + child: Column( + children: [ + Image.asset( + payStatus == 0 + ? "assets/image/icon_order_cancel.png" + : "assets/image/icon_request_refund.png", + width: 24.w, + height: 24.h, + fit: BoxFit.contain, ), - ), - ], + SizedBox( + height: 8.h, + ), + Text( + payStatus == 0 + ? S.of(context).quxiaodingdan + : S.of(context).shenqingtuikuan, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 12.sp, + ), + ), + ], + ), ), - ), - GestureDetector( - onTap: () { - if (payStatus == 0) { - carryOnPay(); - } else {} - }, - child: Column( - children: [ - Image.asset( - payStatus == 0 - ? "assets/image/icon_order_renminbi.png" - : "assets/image/icon_order_agin.png", - width: 24.w, - height: 24.h, - fit: BoxFit.contain, - ), - SizedBox( - height: 8.h, - ), - Text( - payStatus == 0 - ? S.of(context).jixuzhifu - : S.of(context).zailaiyidan, - style: TextStyle( - color: Color(0xFF32A060), - fontSize: 12.sp, + GestureDetector( + onTap: () { + if (payStatus == 0) { + carryOnPay(); + } else {} + }, + child: Column( + children: [ + Image.asset( + payStatus == 0 + ? "assets/image/icon_order_renminbi.png" + : "assets/image/icon_order_agin.png", + width: 24.w, + height: 24.h, + fit: BoxFit.contain, ), - ), - ], + SizedBox( + height: 8.h, + ), + Text( + payStatus == 0 + ? S.of(context).jixuzhifu + : S.of(context).zailaiyidan, + style: TextStyle( + color: Color(0xFF32A060), + fontSize: 12.sp, + ), + ), + ], + ), ), - ), - ], + ], + ), ), ], ), @@ -843,12 +853,20 @@ class _OrderDetailPage extends State { } widgets.add(SizedBox(height: 20.h)); - if (orderInfo.isTakeOut != 0) { // 配送费 - widgets.add(discountItem(Color(0xFFFF7A1A), "配送费", "", orderInfo.postFee)); + if (orderInfo.isTakeOut != 0) { + // 配送费 + widgets.add( + discountItem(Color(0xFFFF7A1A), "配送费", "", "+${orderInfo.postFee}")); } - if (orderInfo.storeVO != null && orderInfo.storeVO.freePostAge != null) { // 配送费 - widgets.add(discountItem(Color(0xFF32A060), "配送费", "活动减免3元配送费", orderInfo.storeVO.freePostAge)); + if (orderInfo.orderDetail != null && + orderInfo.orderDetail.couponDTO != null) { + // 配送费 + widgets.add(discountItem( + Color(0xFF32A060), + "优惠券", + orderInfo.orderDetail.couponDTO.name, + orderInfo.orderDetail.couponDTO.money)); } if (orderInfo.storeVO != null && orderInfo.storeVO.couponVO != null) { @@ -1101,7 +1119,7 @@ class _OrderDetailPage extends State { ), ), Text( - S.of(context).yuan(productList.sellPrice), + S.of(context).yuan_(productList.sellPrice), style: TextStyle( fontWeight: FontWeight.bold, fontSize: 12.sp, @@ -1156,7 +1174,7 @@ class _OrderDetailPage extends State { flex: 1, ), Text( - S.of(context).yuan("$amount"), + S.of(context).yuan_("$amount"), style: TextStyle( fontSize: 12.sp, color: color, @@ -1198,7 +1216,7 @@ class _OrderDetailPage extends State { ), ), Text( - orderInfo != null ? "${(double.tryParse(orderInfo.orderSum) + double.tryParse(orderInfo.postFee))}" : "", + totalPrice(), textAlign: TextAlign.end, style: TextStyle( fontSize: 30.sp, @@ -1209,4 +1227,15 @@ class _OrderDetailPage extends State { ), ); } + + String totalPrice() { + if (orderInfo == null) return ""; + double totalPrice = (double.tryParse(orderInfo.orderSum) + + double.tryParse(orderInfo.postFee)); + if (orderInfo.orderDetail != null && + orderInfo.orderDetail.couponDTO != null) { + totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); + } + return "$totalPrice"; + } } diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index cdecd254..dabd8bf1 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -294,8 +294,7 @@ class _OrderHistoryList extends State fontSize: 14.sp, fontWeight: FontWeight.bold, color: (orderInfo != null && orderInfo.orderStatus == 4) - ? Color(0xFF32A060) - : Color(0xffFE951E), + ? Color(0xFF32A060) : (orderInfo != null && orderInfo.orderStatus >= 5) ? Colors.grey : Color(0xffFE951E), ), ), ), @@ -365,7 +364,7 @@ class _OrderHistoryList extends State TextSpan( children: [ TextSpan( - text: "共", + text: S.of(context).gong, style: TextStyle( fontSize: 12.sp, color: Color(0xFF868686), @@ -383,7 +382,7 @@ class _OrderHistoryList extends State ), ), TextSpan( - text: "件", + text: S.of(context).jian, style: TextStyle( fontSize: 12.sp, color: Color(0xFF868686), @@ -399,16 +398,14 @@ class _OrderHistoryList extends State TextSpan( children: [ TextSpan( - text: "合计:", + text: S.of(context).heji, style: TextStyle( fontSize: 12.sp, color: Color(0xFF868686), ), ), TextSpan( - text: S.of(context).yuan(orderInfo != null - ? orderInfo.finalPayPrice - : "0"), + text: totalPrice(orderInfo), style: TextStyle( fontSize: 12.sp, fontWeight: FontWeight.bold, @@ -416,7 +413,7 @@ class _OrderHistoryList extends State ), ), TextSpan( - text: "元", + text: S.of(context).yuan, style: TextStyle( fontSize: 12.sp, color: Color(0xFF868686), @@ -431,8 +428,12 @@ class _OrderHistoryList extends State height: 8.h, ), Row( - children: statusBtn( - orderInfo != null ? orderInfo.orderStatus : 0), + children: (orderInfo != null) ? statusBtn( + orderInfo.payStatus, + orderInfo.orderStatus, + orderInfo.isTakeOut, + orderInfo.sendStatus, + ) : [], ), ], ), @@ -443,6 +444,15 @@ class _OrderHistoryList extends State ); } + String totalPrice(orderInfo) { + if(orderInfo == null) return ""; + double totalPrice = (double.tryParse(orderInfo.orderSum) + double.tryParse(orderInfo.postFee)); + if(orderInfo.orderDetail != null && orderInfo.orderDetail.couponDTO != null) { + totalPrice -= double.tryParse(orderInfo.orderDetail.couponDTO.money); + } + return "$totalPrice"; + } + String statusText( refundStatus, orderStatus, payStatus, sendStatus, isTakeOut) { String statusText = ""; @@ -462,9 +472,6 @@ class _OrderHistoryList extends State statusText = S.of(context).yiwancheng; break; } - if (refundStatus == 1) { - statusText = S.of(context).yituikuan; - } } } else if (isTakeOut == 1) { if (payStatus == 0) { @@ -493,9 +500,6 @@ class _OrderHistoryList extends State break; } } - if (refundStatus == 1) { - statusText = S.of(context).yituikuan; - } } } else if (isTakeOut == 2) { if (payStatus == 0) { @@ -518,48 +522,20 @@ class _OrderHistoryList extends State break; } } - if (refundStatus == 1) { - statusText = S.of(context).yituikuan; - } } } + if (refundStatus == 1) { + statusText = S.of(context).yituikuan; + } + if (orderStatus == 5) { + statusText = S.of(context).yiquxiao; + } return statusText; } - List statusBtn(orderStatus) { - return [ - if (orderStatus == 2) - RoundButton( - text: S.of(context).querenshouhuo, - textColor: Colors.white, - fontSize: 12.sp, - backgroup: Color(0xFF32A060), - radius: 2, - padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), - ), - if (orderStatus == 2) - Container( - width: 72.w, - height: 24.h, - margin: EdgeInsets.only(right: 10.w), - child: TextButton( - onPressed: () { - Navigator.of(context) - .pushNamed('/router/logistics_information_page'); - }, - style: ButtonStyle( - padding: MaterialStateProperty.all(EdgeInsets.zero), - side: MaterialStateProperty.all( - BorderSide(color: Color(0xff32A060), width: 0.5), - ), - ), - child: Text( - S.of(context).chakanwuliu, - style: TextStyle(color: Color(0xff32A060), fontSize: 12.sp), - ), - ), - ), - if (orderStatus == 3) + List statusBtn(payStatus, orderStatus, isTakeOut, sendStatus) { + if (orderStatus > 4) { + return [ RoundButton( text: S.of(context).zailaiyidan, textColor: Colors.white, @@ -568,7 +544,9 @@ class _OrderHistoryList extends State radius: 2, padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), ), - if (orderStatus == 3) + SizedBox( + width: 10.w, + ), Container( width: 72.w, height: 24.h, @@ -593,59 +571,156 @@ class _OrderHistoryList extends State ), ), ), - if (orderStatus == 0 || orderStatus == 1) - RoundButton( - text: S.of(context).quzhifu, - textColor: Colors.white, - fontSize: 12.sp, - backgroup: Color(0xFF32A060), - radius: 2, - padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), - ), - SizedBox( - width: 10.w, - ), - if (orderStatus == 0 || orderStatus == 1) - Container( - width: 72.w, - height: 24.h, - child: TextButton( - onPressed: () {}, - style: ButtonStyle( - padding: MaterialStateProperty.all(EdgeInsets.zero), - side: MaterialStateProperty.all( - BorderSide( + ]; + } else { + if (payStatus == 0) { + return [ + RoundButton( + text: S.of(context).quzhifu, + textColor: Colors.white, + fontSize: 12.sp, + backgroup: Color(0xFF32A060), + radius: 2, + padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), + ), + SizedBox( + width: 10.w, + ), + Container( + width: 72.w, + height: 24.h, + child: TextButton( + onPressed: () {}, + style: ButtonStyle( + padding: MaterialStateProperty.all(EdgeInsets.zero), + side: MaterialStateProperty.all( + BorderSide( + color: Color(0xff32A060), + width: 0.5, + ), + ), + ), + child: Text( + S.of(context).quxiaozhifu, + style: TextStyle( color: Color(0xff32A060), - width: 0.5, + fontSize: 12.sp, ), ), ), - child: Text( - S.of(context).quxiaozhifu, - style: TextStyle( - color: Color(0xff32A060), - fontSize: 12.sp, + ), + ]; + } else { + if (orderStatus < 4) { + if (isTakeOut == 0) { + return [ + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.only(left: 37.w), + alignment: Alignment.centerLeft, + child: Text( + S.of(context).qudanhao("123"), + style: TextStyle( + fontSize: 16.sp, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), ), + ]; + } else if (isTakeOut == 1 || isTakeOut == 2) { + // } else if (isTakeOut == 2) { + if (sendStatus < 4) { + return [ + RoundButton( + text: S.of(context).querenshouhuo, + textColor: Colors.white, + fontSize: 12.sp, + backgroup: Color(0xFF32A060), + radius: 2, + padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), + ), + SizedBox( + width: 10.w, + ), + Container( + width: 72.w, + height: 24.h, + margin: EdgeInsets.only(right: 10.w), + child: TextButton( + onPressed: () { + Navigator.of(context) + .pushNamed('/router/logistics_information_page'); + }, + style: ButtonStyle( + padding: MaterialStateProperty.all(EdgeInsets.zero), + side: MaterialStateProperty.all( + BorderSide(color: Color(0xff32A060), width: 0.5), + ), + ), + child: Text( + S.of(context).chakanwuliu, + style: TextStyle(color: Color(0xff32A060), fontSize: 12.sp), + ), + ), + ), + ]; + } else { + return [ + RoundButton( + text: S.of(context).zailaiyidan, + textColor: Colors.white, + fontSize: 12.sp, + backgroup: Color(0xFF32A060), + radius: 2, + padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), + ), + ]; + } + } + } else if (orderStatus == 4) { + return [ + RoundButton( + text: S.of(context).zailaiyidan, + textColor: Colors.white, + fontSize: 12.sp, + backgroup: Color(0xFF32A060), + radius: 2, + padding: EdgeInsets.fromLTRB(17.w, 4.h, 17.w, 4.h), ), - ), - ), - if (orderStatus == 3) - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.only(left: 37.w), - alignment: Alignment.centerLeft, - child: Text( - S.of(context).qudanhao("123"), - style: TextStyle( - fontSize: 16.sp, - fontWeight: FontWeight.bold, - color: Colors.black, + SizedBox( + width: 10.w, + ), + Container( + width: 72.w, + height: 24.h, + margin: EdgeInsets.only(right: 10.w), + child: TextButton( + onPressed: () {}, + style: ButtonStyle( + padding: MaterialStateProperty.all(EdgeInsets.zero), + side: MaterialStateProperty.all( + BorderSide( + color: Color(0xff32A060), + width: 0.5, + ), + ), + ), + child: Text( + S.of(context).shanchudingdan, + style: TextStyle( + color: Color(0xff32A060), + fontSize: 12.sp, + ), + ), ), ), - ), - ), - ]; + ]; + } + } + } } List goodsItem(List products) { diff --git a/lib/retrofit/data/order_info.dart b/lib/retrofit/data/order_info.dart index 302278b8..c15bc11f 100644 --- a/lib/retrofit/data/order_info.dart +++ b/lib/retrofit/data/order_info.dart @@ -1,3 +1,5 @@ +import 'package:huixiang/retrofit/data/coupon_vo.dart'; + /// id : "1408358257373741056" /// createTime : "2021-06-25 17:35:49" /// createUser : "1404743858104827904" @@ -742,7 +744,7 @@ class OrderDetail { dynamic _discountMoney; dynamic _discountNumber; dynamic _activityName; - dynamic _couponDTO; + CouponDTO _couponDTO; String _orderSumPrice; String _paySumPrice; String _activityNoPrice; @@ -773,7 +775,7 @@ class OrderDetail { dynamic get activityName => _activityName; - dynamic get couponDTO => _couponDTO; + CouponDTO get couponDTO => _couponDTO; String get orderSumPrice => _orderSumPrice; @@ -819,7 +821,7 @@ class OrderDetail { dynamic discountMoney, dynamic discountNumber, dynamic activityName, - dynamic couponDTO, + CouponDTO couponDTO, String orderSumPrice, String paySumPrice, String activityNoPrice, @@ -877,7 +879,7 @@ class OrderDetail { _discountMoney = json["discountMoney"]; _discountNumber = json["discountNumber"]; _activityName = json["activityName"]; - _couponDTO = json["couponDTO"]; + _couponDTO = json["couponDTO"] != null ? CouponDTO.fromJson(json["couponDTO"]) : null; _orderSumPrice = json["orderSumPrice"]; _paySumPrice = json["paySumPrice"]; _activityNoPrice = json["activityNoPrice"]; @@ -1361,3 +1363,31 @@ class AddressExt { return map; } } + +class CouponDTO { + // "name": "超级满减", + // "num": null, + // "money": "20.00", + // "receiveMoney": null + + String name; + dynamic num; + String money; + dynamic receiveMoney; + + CouponDTO.fromJson(dynamic json) { + name = json["name"]; + num = json["num"]; + money = json["money"]; + receiveMoney = json["receiveMoney"]; + } + + Map toJson() { + var map = {}; + map["name"] = name; + map["num"] = num; + map["money"] = money; + map["receiveMoney"] = receiveMoney; + return map; + } +} diff --git a/lib/setting/help_feedback_page.dart b/lib/setting/help_feedback_page.dart index e650ec69..9277dcb6 100644 --- a/lib/setting/help_feedback_page.dart +++ b/lib/setting/help_feedback_page.dart @@ -34,7 +34,7 @@ class _HelpFeedbackPage extends State { }, child: Container( alignment: Alignment.centerRight, - margin: EdgeInsets.only(left: 10), + margin: EdgeInsets.only(left: 10.w), padding: EdgeInsets.all(6), child: Icon( Icons.arrow_back_ios, @@ -43,8 +43,8 @@ class _HelpFeedbackPage extends State { ), ), ), - titleSpacing: 2, - leadingWidth: 56, + titleSpacing: 2.w, + leadingWidth: 56.w, ), body: Container( decoration: new BoxDecoration( @@ -164,7 +164,7 @@ class _HelpFeedbackPage extends State { return Container( width: double.infinity, height: 186.h, - margin: const EdgeInsets.all(16), + margin: EdgeInsets.all(16), decoration: new BoxDecoration( color: Color(0xffffffff), borderRadius: BorderRadius.circular(4.0), @@ -213,16 +213,17 @@ class _HelpFeedbackPage extends State { _contactPhoneNumber() { return Container( width: double.infinity, - margin: const EdgeInsets.all(16), + margin: EdgeInsets.all(16.w), decoration: new BoxDecoration( color: Color(0xffffffff), borderRadius: BorderRadius.circular(4.0), boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0) + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) ], ), child: Column( diff --git a/lib/setting/treaty_page.dart b/lib/setting/treaty_page.dart index 6efa804e..bae7bebd 100644 --- a/lib/setting/treaty_page.dart +++ b/lib/setting/treaty_page.dart @@ -1,8 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; -import 'package:huixiang/utils/MyPainter.dart'; -import 'package:huixiang/view_widget/separator.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class TreatyPage extends StatefulWidget { diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 20237dad..b0347fc3 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -72,14 +72,22 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi aMapFlutterLocation.destroy(); } + bool iskeyboardShow = false; + @override void didChangeMetrics() { super.didChangeMetrics(); WidgetsBinding.instance.addPostFrameCallback((_) { setState(() { - if(MediaQuery.of(context).viewInsets.bottom==0){ - //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 - FocusScope.of(context).requestFocus(FocusNode()); + print("object: ${MediaQuery.of(context).viewInsets.bottom}"); + if(MediaQuery.of(context).viewInsets.bottom == 0){ + if (iskeyboardShow) { + iskeyboardShow = false; + //关闭键盘 软键盘关闭了, 清除输入控件的焦点, 否则重新进入页面会导致软键盘再弹出问题 + FocusScope.of(context).requestFocus(FocusNode()); + } + } else { + iskeyboardShow = true; } }); }); @@ -374,19 +382,55 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi return; } } + + print("object: isGranted: ${await Permission.location.isGranted}"); + print("object: isDenied: ${await Permission.location.isDenied}"); + print("object: isLimited: ${await Permission.location.isLimited}"); + print("object: isPermanentlyDenied: ${await Permission.location.isPermanentlyDenied}"); + print("object: isRestricted: ${await Permission.location.isRestricted}"); + print("object: isUndetermined: ${await Permission.location.isUndetermined}"); + print("object: shouldShowRequestRationale: ${await Permission.location.shouldShowRequestRationale}"); + print("object: status: ${await Permission.location.status}"); + print("object: value: -------------------------"); + if (await Permission.location.isPermanentlyDenied) { + print("object: requestDialog"); requestDialog(); refreshController.refreshCompleted(); } else if (await Permission.location.isGranted) { + print("object: showLoadingDialog"); showLoadingDialog(); aMapFlutterLocation.startLocation(); } else { - await Permission.location.request(); - // startLocation(); + if (Platform.isAndroid) { + await Permission.location.request(); + } else if (Platform.isIOS) { + //去设置中心 + iosLocationSetting(); + } refreshController.refreshCompleted(); } } + iosLocationSetting() async { + showCupertinoDialog( + context: context, + builder: (context) { + return RequestPermission( + "assets/image/icon_permission_location_bg.png", + S.of(context).nindingweigongnengweikaiqi, + S.of(context).weilexiangnintuijianfujindemendianxinxi, + S.of(context).queding, + (result) async { + if (result) { + + } + }, + heightRatioWithWidth: 0.84, + ); + }); + } + enableLocation() { showCupertinoDialog( context: context, @@ -453,7 +497,7 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi title: Container( height: 36.h, margin: EdgeInsets.fromLTRB(16.w, 0, 16.w, 0), - padding: EdgeInsets.fromLTRB(13.w, 6.h, 16.w, 6.h), + padding: EdgeInsets.fromLTRB(0, 6.h, 0, 6.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(4)), @@ -465,24 +509,21 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi spreadRadius: 0, ) ]), - child: Row( - children: [ - Icon( + child: TextField( + textInputAction: TextInputAction.search, + onEditingComplete: () { + startLocation(); + }, + controller: editingController, + cursorHeight: 30.h, + decoration: InputDecoration( + contentPadding: EdgeInsets.symmetric(vertical: 12.h), + prefixIcon: Icon( Icons.search, size: 24, color: Colors.black, ), - Expanded( - child: TextField( - textInputAction: TextInputAction.search, - onEditingComplete: () { - startLocation(); - }, - controller: editingController, - decoration: InputDecoration(border: InputBorder.none), - ), - ), - InkWell( + suffixIcon: InkWell( onTap: () { editingController.clear(); }, @@ -492,7 +533,8 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi color: Colors.grey, ), ), - ], + border: InputBorder.none, + ), ), ), flexibleSpace: FlexibleSpaceBar( @@ -614,8 +656,8 @@ class _UnionPage extends State with AutomaticKeepAliveClientMixin, Wi ) ], ), + Expanded(child: Container(), flex: 1,), Container( - margin: EdgeInsets.only(top: 16.h), child: Text( S.of(context).manlijiandaijinquan(50, 25), style: TextStyle( diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index e083c14b..d5bc39a7 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -1,4 +1,3 @@ -import 'dart:io'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 2c608663..9d7b0737 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -61,6 +61,9 @@ dependencies: shared_preferences: ^2.0.6 fluttertoast: ^8.0.7 +# url_launcher: ^6.0.5 +# app_links: ^2.1.0 + # crop_image: ^1.0.1 image_cropper: ^1.4.1 image_picker_gallery_camera: ^0.1.6