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(() {