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, + ), + ), + )) + , + ], + ), ], ), ),