From af8a18b6dc74ce79b15278887a87b8adf2cfa397 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Fri, 31 Mar 2023 18:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8=E5=A2=9E=E5=8A=A0=EF=BC=8C=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=88=B8=EF=BC=8C=E4=B8=8D=E5=8F=AF=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/retrofit/data/settleOrderInfo.dart | 3 +++ lib/settlement/settlement_view/coupon.dart | 25 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/lib/retrofit/data/settleOrderInfo.dart b/lib/retrofit/data/settleOrderInfo.dart index 26204a46..678d794e 100644 --- a/lib/retrofit/data/settleOrderInfo.dart +++ b/lib/retrofit/data/settleOrderInfo.dart @@ -254,6 +254,7 @@ class CouponListBean { bool isMaxCoupon; dynamic productList; bool isEx; + String usableReason; static CouponListBean fromJson(Map map) { @@ -285,6 +286,7 @@ class CouponListBean { couponListBean.allProduct = map['allProduct']; couponListBean.isMaxCoupon = map['isMaxCoupon']; couponListBean.productList = map['productList']; + couponListBean.usableReason = map['usableReason']; return couponListBean; } @@ -315,6 +317,7 @@ class CouponListBean { "allProduct": allProduct, "isMaxCoupon": isMaxCoupon, "productList": productList, + "usableReason":usableReason, }; } diff --git a/lib/settlement/settlement_view/coupon.dart b/lib/settlement/settlement_view/coupon.dart index b9e31079..1c607033 100644 --- a/lib/settlement/settlement_view/coupon.dart +++ b/lib/settlement/settlement_view/coupon.dart @@ -262,6 +262,31 @@ class _CouponWidget extends State { ), ], ), + if ((widget.couponList?.isEx ?? false) && ((widget.couponList?.usable??"") == "")) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded(child: Text( + "不可用原因:", + style: TextStyle( + color: Color(0xFF353535), + fontSize: 10.sp, + ), + )), + Expanded(child: Align( + alignment: Alignment.centerRight, + child: Text( + widget.couponList.usableReason ?? "", + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF353535), + fontSize: 10.sp, + ), + ), + )) + , + ], + ), ], ), ),