feat: 评论
This commit is contained in:
46
lib/models/common/reply_type.dart
Normal file
46
lib/models/common/reply_type.dart
Normal file
@ -0,0 +1,46 @@
|
||||
enum ReplyType {
|
||||
unset,
|
||||
// 视频
|
||||
video,
|
||||
// 话题
|
||||
topic,
|
||||
// 活动
|
||||
activity,
|
||||
// 小视频
|
||||
videoS,
|
||||
// 小黑屋封禁信息
|
||||
blockMsg,
|
||||
// 公告信息
|
||||
publicMsg,
|
||||
// 直播活动
|
||||
liveActivity,
|
||||
// 活动稿件
|
||||
activityFile,
|
||||
// 直播公告
|
||||
livePublic,
|
||||
// 相簿
|
||||
album,
|
||||
// 专栏
|
||||
column,
|
||||
// 票务
|
||||
ticket,
|
||||
// 音频
|
||||
audio,
|
||||
|
||||
// 点评
|
||||
comment,
|
||||
// 动态
|
||||
dynamics,
|
||||
// 播单
|
||||
playList,
|
||||
// 音乐播单
|
||||
musicPlayList,
|
||||
// 漫画
|
||||
comics1,
|
||||
// 漫画
|
||||
comics2,
|
||||
// 漫画
|
||||
comics3,
|
||||
// 课程
|
||||
course,
|
||||
}
|
||||
@ -30,6 +30,7 @@ class ReplyItemModel {
|
||||
this.replyControl,
|
||||
this.isUp,
|
||||
this.isTop,
|
||||
this.cardLabel,
|
||||
});
|
||||
|
||||
int? rpid;
|
||||
@ -59,6 +60,7 @@ class ReplyItemModel {
|
||||
ReplyControl? replyControl;
|
||||
bool? isUp;
|
||||
bool? isTop = false;
|
||||
List? cardLabel;
|
||||
|
||||
ReplyItemModel.fromJson(Map<String, dynamic> json, upperMid,
|
||||
{isTopStatus = false}) {
|
||||
@ -95,6 +97,9 @@ class ReplyItemModel {
|
||||
: ReplyControl.fromJson(json['reply_control']);
|
||||
isUp = upperMid.toString() == json['member']['mid'];
|
||||
isTop = isTopStatus;
|
||||
cardLabel = json['card_label'] != null
|
||||
? json['card_label'].map((e) => e['text_content']).toList()
|
||||
: [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user