提交 f380693b authored 作者: yueweilu's avatar yueweilu

【APK-书架】优惠券没有到开始使用时间显示,显示优化建议

上级 c5a7162d
......@@ -72,6 +72,7 @@ class CouponModel {
CouponModel({
this.couponRecId,
this.endTime,
this.startTime,
this.couponId,
this.useStatus,
this.couponName,
......@@ -83,6 +84,7 @@ class CouponModel {
CouponModel.fromJson(dynamic json) {
couponRecId = json['coupon_rec_id'];
endTime = json['end_time'];
startTime = json['start_time'];
couponId = json['coupon_id'];
useStatus = json['use_status'];
couponName = json['coupon_name'];
......@@ -93,6 +95,7 @@ class CouponModel {
num? couponRecId;
String? endTime;
String? startTime;
num? couponId;
num? useStatus;
String? couponName;
......@@ -103,6 +106,7 @@ class CouponModel {
CouponModel copyWith({
num? couponRecId,
String? endTime,
String? startTime,
num? couponId,
num? useStatus,
String? couponName,
......@@ -113,6 +117,7 @@ class CouponModel {
CouponModel(
couponRecId: couponRecId ?? this.couponRecId,
endTime: endTime ?? this.endTime,
startTime: startTime ?? this.startTime,
couponId: couponId ?? this.couponId,
useStatus: useStatus ?? this.useStatus,
couponName: couponName ?? this.couponName,
......@@ -124,7 +129,8 @@ class CouponModel {
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['coupon_rec_id'] = couponRecId;
// map['end_time'] = endTime;
map['end_time'] = endTime;
map['start_time'] = startTime;
map['coupon_id'] = couponId;
map['use_status'] = useStatus;
map['coupon_name'] = couponName;
......
......@@ -74,7 +74,7 @@ class BuildItem extends StatelessWidget {
Gaps.vGaps5,
Text('满${model.normPrice}${model.reducedPrice}元',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
Gaps.vGaps5,
Text('有效至:${model.endTime}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
model.type ==1?Text('有效至:${model.endTime}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),):Text('有效期${model.startTime}${model.endTime}',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c9),),
],
),
if (model.type == 1) GestureDetector(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论