feat: 动态筛选&UP主筛选
This commit is contained in:
@ -7,5 +7,5 @@ enum DynamicsType {
|
||||
|
||||
extension BusinessTypeExtension on DynamicsType {
|
||||
String get values => ['all', 'video', 'pgc', 'article'][index];
|
||||
String get labels => ['全部', '视频投稿', '追番追剧', '专栏'][index];
|
||||
String get labels => ['全部', '视频', '追番', '专栏'][index];
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ class OpusPicsModel {
|
||||
OpusPicsModel.fromJson(Map<String, dynamic> json) {
|
||||
width = json['width'];
|
||||
height = json['height'];
|
||||
size = json['size'].toInt();
|
||||
size = json['size'] != null ? json['size'].toInt() : 0;
|
||||
src = json['src'];
|
||||
url = json['url'];
|
||||
}
|
||||
|
93
lib/models/dynamics/up.dart
Normal file
93
lib/models/dynamics/up.dart
Normal file
@ -0,0 +1,93 @@
|
||||
class FollowUpModel {
|
||||
FollowUpModel({
|
||||
this.liveUsers,
|
||||
this.upList,
|
||||
});
|
||||
|
||||
LiveUsers? liveUsers;
|
||||
List<UpItem>? upList;
|
||||
|
||||
FollowUpModel.fromJson(Map<String, dynamic> json) {
|
||||
liveUsers = LiveUsers.fromJson(json['live_users']);
|
||||
upList = json['up_list'] != null
|
||||
? json['up_list'].map<UpItem>((e) => UpItem.fromJson(e)).toList()
|
||||
: [];
|
||||
}
|
||||
}
|
||||
|
||||
class LiveUsers {
|
||||
LiveUsers({
|
||||
this.count,
|
||||
this.group,
|
||||
this.items,
|
||||
});
|
||||
|
||||
int? count;
|
||||
String? group;
|
||||
List<LiveUserItem>? items;
|
||||
|
||||
LiveUsers.fromJson(Map<String, dynamic> json) {
|
||||
count = json['count'];
|
||||
group = json['group'];
|
||||
items = json['items']
|
||||
.map<LiveUserItem>((e) => LiveUserItem.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
class LiveUserItem {
|
||||
LiveUserItem({
|
||||
this.face,
|
||||
this.isReserveRecall,
|
||||
this.jumpUrl,
|
||||
this.mid,
|
||||
this.roomId,
|
||||
this.title,
|
||||
this.uname,
|
||||
});
|
||||
|
||||
String? face;
|
||||
bool? isReserveRecall;
|
||||
String? jumpUrl;
|
||||
int? mid;
|
||||
int? roomId;
|
||||
String? title;
|
||||
String? uname;
|
||||
bool hasUpdate = false;
|
||||
String type = 'live';
|
||||
|
||||
LiveUserItem.fromJson(Map<String, dynamic> json) {
|
||||
face = json['face'];
|
||||
isReserveRecall = json['is_reserve_recall'];
|
||||
jumpUrl = json['jump_url'];
|
||||
mid = json['mid'];
|
||||
roomId = json['room_id'];
|
||||
title = json['title'];
|
||||
uname = json['uname'];
|
||||
}
|
||||
}
|
||||
|
||||
class UpItem {
|
||||
UpItem({
|
||||
this.face,
|
||||
this.hasUpdate,
|
||||
this.isReserveRecall,
|
||||
this.mid,
|
||||
this.uname,
|
||||
});
|
||||
|
||||
String? face;
|
||||
bool? hasUpdate;
|
||||
bool? isReserveRecall;
|
||||
int? mid;
|
||||
String? uname;
|
||||
String type = 'up';
|
||||
|
||||
UpItem.fromJson(Map<String, dynamic> json) {
|
||||
face = json['face'];
|
||||
hasUpdate = json['has_update'];
|
||||
isReserveRecall = json['is_reserve_recall'];
|
||||
mid = json['mid'];
|
||||
uname = json['uname'];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user