From 1bfe6fc475379c050235ba953480e5015ecbcf4c Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 29 Jun 2023 15:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BA=97=E9=93=BA=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=88usePlatformVip=20=20=20=20=20usePlat?= =?UTF-8?q?formPay=EF=BC=89=EF=BC=9B=20=E4=BC=9A=E5=91=98=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E9=80=89=E6=8B=A9=EF=BC=8C=E4=BC=9A=E5=91=98=E6=97=A5?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E5=91=98=E5=8D=A1=E9=83=BD=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?usePlatformVip=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=AF=A5=E4=BC=98=E6=83=A0=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/data/store_info.dart | 6 ++++++ lib/settlement/settlement.dart | 3 ++- lib/settlement/settlement_view/vip_discounts_select.dart | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/retrofit/data/store_info.dart b/lib/retrofit/data/store_info.dart index e0db90d5..ed58193d 100644 --- a/lib/retrofit/data/store_info.dart +++ b/lib/retrofit/data/store_info.dart @@ -47,6 +47,8 @@ class StoreInfo { String businessService; Mini mini; bool useErp; + bool usePlatformVip; + bool usePlatformPay; String expireTime; String vipFee; MemberSource memberSource; @@ -107,6 +109,8 @@ class StoreInfo { ..businessService = json['businessService'] as String ..mini = json['mini'] == null ? null : Mini.fromJson(json['mini']) ..useErp = json['useErp'] as bool + ..usePlatformVip = json['usePlatformVip'] as bool + ..usePlatformPay = json['usePlatformPay'] as bool ..expireTime = json['expireTime'] as String ..vipFee = json['vipFee'] as String ..memberSource = json['memberSource'] != null ? MemberSource.fromJson(json['memberSource']) : null @@ -153,6 +157,8 @@ class StoreInfo { 'businessService': this.businessService, 'mini': this.mini.toJson(), 'useErp': this.useErp, + 'usePlatformVip': this.usePlatformVip, + 'usePlatformPay': this.usePlatformPay, 'expireTime': this.expireTime, 'vipFee': this.vipFee, 'memberSource': this.memberSource.toJson(), diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index f5d0a966..d2bc5d6c 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -950,7 +950,8 @@ class _Settlement extends State { vipSelectCheck, settleOrderInfo, minOrderInfo, - payChannel,), + payChannel, + storeInfo), ///优惠券/备注/会员优惠金额 if (settleOrderInfo != null || diff --git a/lib/settlement/settlement_view/vip_discounts_select.dart b/lib/settlement/settlement_view/vip_discounts_select.dart index 1148fc90..6a017e50 100644 --- a/lib/settlement/settlement_view/vip_discounts_select.dart +++ b/lib/settlement/settlement_view/vip_discounts_select.dart @@ -5,6 +5,7 @@ import 'package:huixiang/utils/font_weight.dart'; import '../../retrofit/data/min_order_info.dart'; import '../../retrofit/data/settleOrderInfo.dart'; +import '../../retrofit/data/store_info.dart'; import '../../view_widget/settlement_tips_dialog.dart'; class VipDiscountsSelect extends StatefulWidget { @@ -12,8 +13,9 @@ class VipDiscountsSelect extends StatefulWidget { final SettleOrderInfo settleOrderInfo; final MinOrderInfo minOrderInfo; final int payChannel; + final StoreInfo storeInfo; - VipDiscountsSelect(this.vipSelectCheck,this.settleOrderInfo,this.minOrderInfo,this.payChannel); + VipDiscountsSelect(this.vipSelectCheck,this.settleOrderInfo,this.minOrderInfo,this.payChannel,this.storeInfo); @override State createState() { @@ -48,7 +50,7 @@ class _VipDiscountsSelect extends State { ), child: Column( children: [ - Padding(padding:EdgeInsets.only(bottom: 14.h), + Padding(padding:EdgeInsets.only(bottom: (widget?.storeInfo?.usePlatformVip ?? false) == true ? 14.h :0), child: GestureDetector( onTap: (){ setState(() { @@ -89,7 +91,7 @@ class _VipDiscountsSelect extends State { ], ), ),), - if((widget?.settleOrderInfo?.isVipDay?? false) == true) + if((widget?.settleOrderInfo?.isVipDay?? false) == true || (widget?.storeInfo?.usePlatformVip ?? false) == true) Padding(padding:EdgeInsets.only(bottom: 14.h), child: GestureDetector( onTap: (){ @@ -131,6 +133,7 @@ class _VipDiscountsSelect extends State { ], ), ),), + if((widget?.storeInfo?.usePlatformVip ?? false) == true) GestureDetector( onTap: (){ setState(() {