Browse Source

查询店铺详情接口新增两个字段(usePlatformVip usePlatformPay);

会员优惠选择,会员日,会员卡都根据usePlatformVip判断是否显示该优惠;
new_revision_app
wurong 2 years ago
parent
commit
1bfe6fc475
  1. 6
      lib/retrofit/data/store_info.dart
  2. 3
      lib/settlement/settlement.dart
  3. 9
      lib/settlement/settlement_view/vip_discounts_select.dart

6
lib/retrofit/data/store_info.dart

@ -47,6 +47,8 @@ class StoreInfo {
String businessService; String businessService;
Mini mini; Mini mini;
bool useErp; bool useErp;
bool usePlatformVip;
bool usePlatformPay;
String expireTime; String expireTime;
String vipFee; String vipFee;
MemberSource memberSource; MemberSource memberSource;
@ -107,6 +109,8 @@ class StoreInfo {
..businessService = json['businessService'] as String ..businessService = json['businessService'] as String
..mini = json['mini'] == null ? null : Mini.fromJson(json['mini']) ..mini = json['mini'] == null ? null : Mini.fromJson(json['mini'])
..useErp = json['useErp'] as bool ..useErp = json['useErp'] as bool
..usePlatformVip = json['usePlatformVip'] as bool
..usePlatformPay = json['usePlatformPay'] as bool
..expireTime = json['expireTime'] as String ..expireTime = json['expireTime'] as String
..vipFee = json['vipFee'] as String ..vipFee = json['vipFee'] as String
..memberSource = json['memberSource'] != null ? MemberSource.fromJson(json['memberSource']) : null ..memberSource = json['memberSource'] != null ? MemberSource.fromJson(json['memberSource']) : null
@ -153,6 +157,8 @@ class StoreInfo {
'businessService': this.businessService, 'businessService': this.businessService,
'mini': this.mini.toJson(), 'mini': this.mini.toJson(),
'useErp': this.useErp, 'useErp': this.useErp,
'usePlatformVip': this.usePlatformVip,
'usePlatformPay': this.usePlatformPay,
'expireTime': this.expireTime, 'expireTime': this.expireTime,
'vipFee': this.vipFee, 'vipFee': this.vipFee,
'memberSource': this.memberSource.toJson(), 'memberSource': this.memberSource.toJson(),

3
lib/settlement/settlement.dart

@ -950,7 +950,8 @@ class _Settlement extends State<Settlement> {
vipSelectCheck, vipSelectCheck,
settleOrderInfo, settleOrderInfo,
minOrderInfo, minOrderInfo,
payChannel,), payChannel,
storeInfo),
///// /////
if (settleOrderInfo != null || if (settleOrderInfo != null ||

9
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/min_order_info.dart';
import '../../retrofit/data/settleOrderInfo.dart'; import '../../retrofit/data/settleOrderInfo.dart';
import '../../retrofit/data/store_info.dart';
import '../../view_widget/settlement_tips_dialog.dart'; import '../../view_widget/settlement_tips_dialog.dart';
class VipDiscountsSelect extends StatefulWidget { class VipDiscountsSelect extends StatefulWidget {
@ -12,8 +13,9 @@ class VipDiscountsSelect extends StatefulWidget {
final SettleOrderInfo settleOrderInfo; final SettleOrderInfo settleOrderInfo;
final MinOrderInfo minOrderInfo; final MinOrderInfo minOrderInfo;
final int payChannel; 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 @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -48,7 +50,7 @@ class _VipDiscountsSelect extends State<VipDiscountsSelect> {
), ),
child: Column( child: Column(
children: [ children: [
Padding(padding:EdgeInsets.only(bottom: 14.h), Padding(padding:EdgeInsets.only(bottom: (widget?.storeInfo?.usePlatformVip ?? false) == true ? 14.h :0),
child: GestureDetector( child: GestureDetector(
onTap: (){ onTap: (){
setState(() { setState(() {
@ -89,7 +91,7 @@ class _VipDiscountsSelect extends State<VipDiscountsSelect> {
], ],
), ),
),), ),),
if((widget?.settleOrderInfo?.isVipDay?? false) == true) if((widget?.settleOrderInfo?.isVipDay?? false) == true || (widget?.storeInfo?.usePlatformVip ?? false) == true)
Padding(padding:EdgeInsets.only(bottom: 14.h), Padding(padding:EdgeInsets.only(bottom: 14.h),
child: GestureDetector( child: GestureDetector(
onTap: (){ onTap: (){
@ -131,6 +133,7 @@ class _VipDiscountsSelect extends State<VipDiscountsSelect> {
], ],
), ),
),), ),),
if((widget?.storeInfo?.usePlatformVip ?? false) == true)
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
setState(() { setState(() {

Loading…
Cancel
Save