mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 10:06:23 +08:00
dyn addcard
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -77,11 +77,6 @@ class Fallback {
|
||||
id: json['id'],
|
||||
type: json['type'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'type': type,
|
||||
};
|
||||
}
|
||||
|
||||
// 单个动态详情
|
||||
@@ -241,12 +236,32 @@ class Button {
|
||||
String? icon;
|
||||
String? jumpUrl;
|
||||
String? text;
|
||||
JumpStyle? jumpStyle;
|
||||
int? status;
|
||||
int? type;
|
||||
Check? check;
|
||||
|
||||
Button.fromJson(Map<String, dynamic> json) {
|
||||
handleType = json['handle_type'];
|
||||
icon = json['icon'];
|
||||
jumpUrl = json['jump_url'];
|
||||
text = json['text'];
|
||||
jumpStyle = json['jump_style'] == null
|
||||
? null
|
||||
: JumpStyle.fromJson(json['jump_style']);
|
||||
status = json['status'];
|
||||
type = json['type'];
|
||||
check = json['check'] == null ? null : Check.fromJson(json['check']);
|
||||
}
|
||||
}
|
||||
|
||||
class Check {
|
||||
int? disable;
|
||||
String? text;
|
||||
|
||||
Check.fromJson(Map<String, dynamic> json) {
|
||||
disable = json['disable'];
|
||||
text = json['text'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,12 +372,9 @@ class DynamicAddModel {
|
||||
Ugc? ugc;
|
||||
Reserve? reserve;
|
||||
Good? goods;
|
||||
|
||||
/// TODO 比赛vs
|
||||
String? match;
|
||||
|
||||
/// TODO 游戏信息
|
||||
String? common;
|
||||
UpowerLottery? upowerLottery;
|
||||
AddCommon? common;
|
||||
AddMatch? match;
|
||||
|
||||
DynamicAddModel.fromJson(Map<String, dynamic> json) {
|
||||
type = json['type'];
|
||||
@@ -371,9 +383,200 @@ class DynamicAddModel {
|
||||
reserve =
|
||||
json['reserve'] != null ? Reserve.fromJson(json['reserve']) : null;
|
||||
goods = json['goods'] != null ? Good.fromJson(json['goods']) : null;
|
||||
upowerLottery = json['upower_lottery'] != null
|
||||
? UpowerLottery.fromJson(json['upower_lottery'])
|
||||
: null;
|
||||
common = json['common'] != null ? AddCommon.fromJson(json['common']) : null;
|
||||
match = json['match'] != null ? AddMatch.fromJson(json['match']) : null;
|
||||
}
|
||||
}
|
||||
|
||||
class AddMatch {
|
||||
Button? button;
|
||||
String? headText;
|
||||
String? idStr;
|
||||
String? jumpUrl;
|
||||
MatchInfo? matchInfo;
|
||||
|
||||
AddMatch({
|
||||
this.button,
|
||||
this.headText,
|
||||
this.idStr,
|
||||
this.jumpUrl,
|
||||
this.matchInfo,
|
||||
});
|
||||
|
||||
factory AddMatch.fromJson(Map<String, dynamic> json) => AddMatch(
|
||||
button: json["button"] == null ? null : Button.fromJson(json["button"]),
|
||||
headText: json["head_text"],
|
||||
idStr: json["id_str"],
|
||||
jumpUrl: json["jump_url"],
|
||||
matchInfo: json["match_info"] == null
|
||||
? null
|
||||
: MatchInfo.fromJson(json["match_info"]),
|
||||
);
|
||||
}
|
||||
|
||||
class MatchInfo {
|
||||
String? centerBottom;
|
||||
List? centerTop;
|
||||
TTeam? leftTeam;
|
||||
TTeam? rightTeam;
|
||||
int? status;
|
||||
dynamic subTitle;
|
||||
String? title;
|
||||
|
||||
MatchInfo({
|
||||
this.centerBottom,
|
||||
this.centerTop,
|
||||
this.leftTeam,
|
||||
this.rightTeam,
|
||||
this.status,
|
||||
this.subTitle,
|
||||
this.title,
|
||||
});
|
||||
|
||||
factory MatchInfo.fromJson(Map<String, dynamic> json) => MatchInfo(
|
||||
centerBottom: json["center_bottom"],
|
||||
centerTop: json["center_top"],
|
||||
leftTeam: json["left_team"] == null
|
||||
? null
|
||||
: TTeam.fromJson(json["left_team"]),
|
||||
rightTeam: json["right_team"] == null
|
||||
? null
|
||||
: TTeam.fromJson(json["right_team"]),
|
||||
status: json["status"],
|
||||
subTitle: json["sub_title"],
|
||||
title: json["title"],
|
||||
);
|
||||
}
|
||||
|
||||
class TTeam {
|
||||
int? id;
|
||||
String? name;
|
||||
String? pic;
|
||||
|
||||
TTeam({
|
||||
this.id,
|
||||
this.name,
|
||||
this.pic,
|
||||
});
|
||||
|
||||
factory TTeam.fromJson(Map<String, dynamic> json) => TTeam(
|
||||
id: json["id"],
|
||||
name: json["name"],
|
||||
pic: json["pic"],
|
||||
);
|
||||
}
|
||||
|
||||
class AddCommon {
|
||||
Button? button;
|
||||
String? cover;
|
||||
String? desc1;
|
||||
String? desc2;
|
||||
String? headText;
|
||||
String? idStr;
|
||||
String? jumpUrl;
|
||||
int? style;
|
||||
String? subType;
|
||||
String? title;
|
||||
|
||||
AddCommon({
|
||||
this.button,
|
||||
this.cover,
|
||||
this.desc1,
|
||||
this.desc2,
|
||||
this.headText,
|
||||
this.idStr,
|
||||
this.jumpUrl,
|
||||
this.style,
|
||||
this.subType,
|
||||
this.title,
|
||||
});
|
||||
|
||||
factory AddCommon.fromJson(Map<String, dynamic> json) => AddCommon(
|
||||
button: json["button"] == null ? null : Button.fromJson(json["button"]),
|
||||
cover: json["cover"],
|
||||
desc1: json["desc1"],
|
||||
desc2: json["desc2"],
|
||||
headText: json["head_text"],
|
||||
idStr: json["id_str"],
|
||||
jumpUrl: json["jump_url"],
|
||||
style: json["style"],
|
||||
subType: json["sub_type"],
|
||||
title: json["title"],
|
||||
);
|
||||
}
|
||||
|
||||
class UpowerLottery {
|
||||
Button? button;
|
||||
Desc? desc;
|
||||
Hint? hint;
|
||||
String? jumpUrl;
|
||||
int? rid;
|
||||
int? state;
|
||||
String? title;
|
||||
int? upMid;
|
||||
int? upowerActionState;
|
||||
int? upowerLevel;
|
||||
|
||||
UpowerLottery({
|
||||
this.button,
|
||||
this.desc,
|
||||
this.hint,
|
||||
this.jumpUrl,
|
||||
this.rid,
|
||||
this.state,
|
||||
this.title,
|
||||
this.upMid,
|
||||
this.upowerActionState,
|
||||
this.upowerLevel,
|
||||
});
|
||||
|
||||
factory UpowerLottery.fromJson(Map<String, dynamic> json) => UpowerLottery(
|
||||
button: json["button"] == null ? null : Button.fromJson(json["button"]),
|
||||
desc: json["desc"] == null ? null : Desc.fromJson(json["desc"]),
|
||||
hint: json["hint"] == null ? null : Hint.fromJson(json["hint"]),
|
||||
jumpUrl: json["jump_url"],
|
||||
rid: json["rid"],
|
||||
state: json["state"],
|
||||
title: json["title"],
|
||||
upMid: json["up_mid"],
|
||||
upowerActionState: json["upower_action_state"],
|
||||
upowerLevel: json["upower_level"],
|
||||
);
|
||||
}
|
||||
|
||||
class Hint {
|
||||
int? style;
|
||||
String? text;
|
||||
|
||||
Hint({
|
||||
this.style,
|
||||
this.text,
|
||||
});
|
||||
|
||||
factory Hint.fromJson(Map<String, dynamic> json) => Hint(
|
||||
style: json["style"],
|
||||
text: json["text"],
|
||||
);
|
||||
}
|
||||
|
||||
class JumpStyle {
|
||||
String? iconUrl;
|
||||
String? text;
|
||||
|
||||
JumpStyle({
|
||||
this.iconUrl,
|
||||
this.text,
|
||||
});
|
||||
|
||||
factory JumpStyle.fromJson(Map<String, dynamic> json) => JumpStyle(
|
||||
iconUrl: json["icon_url"],
|
||||
text: json["text"],
|
||||
);
|
||||
}
|
||||
|
||||
class Vote {
|
||||
Vote({
|
||||
this.choiceCnt,
|
||||
@@ -452,6 +655,7 @@ class Reserve {
|
||||
this.button,
|
||||
this.desc1,
|
||||
this.desc2,
|
||||
this.desc3,
|
||||
this.jumpUrl,
|
||||
this.reserveTotal,
|
||||
this.rid,
|
||||
@@ -464,6 +668,7 @@ class Reserve {
|
||||
ReserveBtn? button;
|
||||
Desc? desc1;
|
||||
Desc? desc2;
|
||||
Desc? desc3;
|
||||
String? jumpUrl;
|
||||
int? reserveTotal;
|
||||
int? rid;
|
||||
@@ -477,6 +682,7 @@ class Reserve {
|
||||
json['button'] == null ? null : ReserveBtn.fromJson(json['button']);
|
||||
desc1 = json['desc1'] == null ? null : Desc.fromJson(json['desc1']);
|
||||
desc2 = json['desc2'] == null ? null : Desc.fromJson(json['desc2']);
|
||||
desc3 = json['desc3'] == null ? null : Desc.fromJson(json['desc3']);
|
||||
jumpUrl = json['jump_url'];
|
||||
reserveTotal = json['reserve_total'];
|
||||
rid = json['rid'];
|
||||
@@ -520,16 +726,19 @@ class Desc {
|
||||
this.style,
|
||||
this.text,
|
||||
this.visible,
|
||||
this.jumpUrl,
|
||||
});
|
||||
|
||||
int? style;
|
||||
String? text;
|
||||
bool? visible;
|
||||
String? jumpUrl;
|
||||
|
||||
Desc.fromJson(Map<String, dynamic> json) {
|
||||
style = json['style'];
|
||||
text = json['text'];
|
||||
visible = json['visible'];
|
||||
jumpUrl = json["jump_url"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user