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

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

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