mod: opus: show itemnull, moduleblocked

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-29 10:23:16 +08:00
parent 30bad3a066
commit b876840d08
6 changed files with 341 additions and 153 deletions

View File

@@ -173,11 +173,28 @@ class Card {
String? oid;
String? type;
Ugc? ugc;
ItemNull? itemNull;
Card.fromJson(Map<String, dynamic> json) {
oid = json['oid'];
type = json['type'];
ugc = json['ugc'] == null ? null : Ugc.fromJson(json['ugc']);
itemNull =
json['item_null'] == null ? null : ItemNull.fromJson(json['item_null']);
}
}
class ItemNull {
ItemNull({
this.icon,
this.text,
});
String? icon;
String? text;
ItemNull.fromJson(Map<String, dynamic> json) {
icon = json['icon'];
text = json['text'];
}
}

View File

@@ -100,6 +100,7 @@ class ItemModulesModel {
// 专栏
List<ModuleTag>? moduleExtend; // opus的tag
List<ArticleContentModel>? moduleContent;
ModuleBlocked? moduleBlocked;
// moduleBottom
@@ -137,6 +138,11 @@ class ItemModulesModel {
?.map((i) => ArticleContentModel.fromJson(i))
.toList();
break;
case 'MODULE_TYPE_BLOCKED':
moduleBlocked = i['module_blocked'] == null
? null
: ModuleBlocked.fromJson(i['module_blocked']);
break;
case 'MODULE_TYPE_EXTEND':
moduleExtend = (i['module_extend']['items'] as List?)
?.map((i) => ModuleTag.fromJson(i))
@@ -156,6 +162,46 @@ class ItemModulesModel {
}
}
class ModuleBlocked {
BgImg? bgImg;
int? blockedType;
Button? button;
String? hintMessage;
BgImg? icon;
ModuleBlocked.fromJson(Map<String, dynamic> json) {
bgImg = json['bg_img'] == null ? null : BgImg.fromJson(json['bg_img']);
blockedType = json['blocked_type'];
button = json['button'] == null ? null : Button.fromJson(json['button']);
hintMessage = json['hint_message'];
icon = json['icon'] == null ? null : BgImg.fromJson(json['icon']);
}
}
class Button {
int? handleType;
String? icon;
String? jumpUrl;
String? text;
Button.fromJson(Map<String, dynamic> json) {
handleType = json['handle_type'];
icon = json['icon'];
jumpUrl = json['jump_url'];
text = json['text'];
}
}
class BgImg {
String? imgDark;
String? imgDay;
BgImg.fromJson(Map<String, dynamic> json) {
imgDark = json['img_dark'];
imgDay = json['img_day'];
}
}
class Basic {
String? commentIdStr;
int? commentType;