|
|
@ -18,6 +18,7 @@ class MarriageData { |
|
|
final String districtName; |
|
|
final String districtName; |
|
|
final String describeInfo; |
|
|
final String describeInfo; |
|
|
final String createTime; |
|
|
final String createTime; |
|
|
|
|
|
final int genderCode; |
|
|
final List<PhotoItem> photoList; |
|
|
final List<PhotoItem> photoList; |
|
|
|
|
|
|
|
|
// 为了兼容UI展示,添加一些计算属性 |
|
|
// 为了兼容UI展示,添加一些计算属性 |
|
|
@ -45,6 +46,7 @@ class MarriageData { |
|
|
required this.describeInfo, |
|
|
required this.describeInfo, |
|
|
required this.createTime, |
|
|
required this.createTime, |
|
|
required this.photoList, |
|
|
required this.photoList, |
|
|
|
|
|
required this.genderCode, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
factory MarriageData.fromJson(Map<String, dynamic> json) { |
|
|
factory MarriageData.fromJson(Map<String, dynamic> json) { |
|
|
@ -65,6 +67,7 @@ class MarriageData { |
|
|
districtName: json['districtName'] ?? '', |
|
|
districtName: json['districtName'] ?? '', |
|
|
describeInfo: json['describeInfo'] ?? '', |
|
|
describeInfo: json['describeInfo'] ?? '', |
|
|
createTime: json['createTime'] ?? '', |
|
|
createTime: json['createTime'] ?? '', |
|
|
|
|
|
genderCode: json['genderCode'] ?? 0, |
|
|
photoList: (json['photoList'] as List<dynamic>?)?.map((e) => PhotoItem.fromJson(e as Map<String, dynamic>)).toList() ?? [], |
|
|
photoList: (json['photoList'] as List<dynamic>?)?.map((e) => PhotoItem.fromJson(e as Map<String, dynamic>)).toList() ?? [], |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
@ -88,6 +91,7 @@ class MarriageData { |
|
|
districtName: userInfo.districtName ?? '', |
|
|
districtName: userInfo.districtName ?? '', |
|
|
describeInfo: userInfo.describeInfo ?? '', |
|
|
describeInfo: userInfo.describeInfo ?? '', |
|
|
createTime: userInfo.createTime ?? '', |
|
|
createTime: userInfo.createTime ?? '', |
|
|
|
|
|
genderCode: userInfo.genderCode?.toInt() ?? 0, |
|
|
photoList: (userInfo.photoList ?? []).map((photo) => PhotoItem( |
|
|
photoList: (userInfo.photoList ?? []).map((photo) => PhotoItem( |
|
|
photoUrl: photo.photoUrl ?? '', |
|
|
photoUrl: photo.photoUrl ?? '', |
|
|
auditStatus: photo.auditStatus, |
|
|
auditStatus: photo.auditStatus, |
|
|
|