Browse Source

订单结算优惠券增加,不可使用券,不可使用说明

new_revision_app
wurong 2 years ago
parent
commit
af8a18b6dc
  1. 3
      lib/retrofit/data/settleOrderInfo.dart
  2. 25
      lib/settlement/settlement_view/coupon.dart

3
lib/retrofit/data/settleOrderInfo.dart

@ -254,6 +254,7 @@ class CouponListBean {
bool isMaxCoupon;
dynamic productList;
bool isEx;
String usableReason;
static CouponListBean fromJson(Map<String, dynamic> 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,
};
}

25
lib/settlement/settlement_view/coupon.dart

@ -262,6 +262,31 @@ class _CouponWidget extends State<CouponWidget> {
),
],
),
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,
),
),
))
,
],
),
],
),
),

Loading…
Cancel
Save