Browse Source

更改ios结算支付vip价格样式;

dart3_last
wurong 2 years ago
parent
commit
7c660a2270
  1. BIN
      assets/image/2x/vip_price.webp
  2. BIN
      assets/image/2x/vip_unprice.webp
  3. BIN
      assets/image/3x/vip_price.webp
  4. BIN
      assets/image/3x/vip_unprice.webp
  5. BIN
      assets/image/vip_price.webp
  6. BIN
      assets/image/vip_unprice.webp
  7. 53
      lib/settlement/settlement_view/activity_coupon_remarks.dart

BIN
assets/image/2x/vip_price.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/vip_unprice.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/vip_price.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/3x/vip_unprice.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/vip_price.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
assets/image/vip_unprice.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

53
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -36,8 +38,7 @@ class ActivityCouponRemarks extends StatefulWidget {
this.editRemark, this.editRemark,
this.tableId, this.tableId,
this.vipPriceSelect, this.vipPriceSelect,
this.showVipTips this.showVipTips);
);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -64,12 +65,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
// height: 122.h / (!widget.placeOrder ? 2 : 1), // height: 122.h / (!widget.placeOrder ? 2 : 1),
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 16, right: 16, top: 15, bottom: 14),
left: 16,
right: 16,
top: 15,
bottom: 14
),
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 16, left: 16,
right: 16, right: 16,
@ -96,6 +92,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
), ),
), ),
Platform.isAndroid ?
Switch.adaptive( Switch.adaptive(
value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect, value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@ -111,10 +108,37 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
} }
}); });
}, },
), ):
GestureDetector(
onTap: () {
setState(() {
// (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect,
if ((widget?.settleOrderInfo?.memberVO?.isVip ?? false)) {
vipSelect = !vipSelect;
widget.vipPriceSelect(vipSelect);
} else {
widget.showVipTips();
return;
}
});
},
child: Container(
padding: EdgeInsets.only(bottom: 18.w),
alignment: Alignment.center,
child: Image.asset(
vipSelect
? "assets/image/vip_price.webp"
: "assets/image/vip_unprice.webp",
width: 38.w,
height: 20.h,
),
),
)
], ],
), ),
if (widget.placeOrder && widget?.settleOrderInfo?.benefitDiscountAmount != null && widget?.settleOrderInfo?.benefitDiscountAmount != "0") if (widget.placeOrder &&
widget?.settleOrderInfo?.benefitDiscountAmount != null &&
widget?.settleOrderInfo?.benefitDiscountAmount != "0")
Container( Container(
margin: EdgeInsets.only(bottom: 13), margin: EdgeInsets.only(bottom: 13),
child: Row( child: Row(
@ -286,11 +310,10 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
String coupon = ""; String coupon = "";
if (widget.coupons == null || widget.coupons == "") { if (widget.coupons == null || widget.coupons == "") {
coupon = "未选择任何优惠券"; coupon = "未选择任何优惠券";
if(widget.placeOrder) if (widget.placeOrder) if (widget.minOrderInfo == null ||
if(widget.minOrderInfo == null || widget.minOrderInfo.orderInfoVo.couponList == null) {
widget.minOrderInfo.orderInfoVo.couponList == null) coupon = "未选择任何优惠券";
{coupon = "未选择任何优惠券";} } else if (widget.promotions != null && widget.promotions != "") {
else if(widget.promotions != null && widget.promotions != ""){
coupon = "优惠券与活动不可同享"; coupon = "优惠券与活动不可同享";
} }
if (widget.settleOrderInfo == null || if (widget.settleOrderInfo == null ||

Loading…
Cancel
Save