|
|
|
@ -19,6 +19,7 @@ class MarriageData { |
|
|
|
final String describeInfo; |
|
|
|
final String createTime; |
|
|
|
final int genderCode; |
|
|
|
final int visitCount; |
|
|
|
final List<PhotoItem> photoList; |
|
|
|
final bool isLive; // 是否为直播类型 |
|
|
|
|
|
|
|
@ -48,6 +49,7 @@ class MarriageData { |
|
|
|
required this.createTime, |
|
|
|
required this.photoList, |
|
|
|
required this.genderCode, |
|
|
|
required this.visitCount, |
|
|
|
this.isLive = false, |
|
|
|
}); |
|
|
|
|
|
|
|
@ -70,6 +72,7 @@ class MarriageData { |
|
|
|
describeInfo: json['describeInfo'] ?? '', |
|
|
|
createTime: json['createTime'] ?? '', |
|
|
|
genderCode: json['genderCode'] ?? 0, |
|
|
|
visitCount: json['visitCount'] ?? 0, |
|
|
|
photoList: (json['photoList'] as List<dynamic>?)?.map((e) => PhotoItem.fromJson(e as Map<String, dynamic>)).toList() ?? [], |
|
|
|
isLive: json['isLive'] ?? json['liveStatus'] ?? false, // 支持isLive或liveStatus字段 |
|
|
|
); |
|
|
|
@ -95,6 +98,7 @@ class MarriageData { |
|
|
|
describeInfo: userInfo.describeInfo ?? '', |
|
|
|
createTime: userInfo.createTime ?? '', |
|
|
|
genderCode: userInfo.genderCode?.toInt() ?? 0, |
|
|
|
visitCount: userInfo.visitCount?.toInt() ?? 0, |
|
|
|
photoList: (userInfo.photoList ?? []).map((photo) => PhotoItem( |
|
|
|
photoUrl: photo.photoUrl ?? '', |
|
|
|
auditStatus: photo.auditStatus, |
|
|
|
|