handle relation url

Closes #1566

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-15 18:25:15 +08:00
parent 32ce2b87db
commit c9de79532a
31 changed files with 634 additions and 393 deletions

View File

@@ -1,19 +0,0 @@
import 'package:PiliPlus/models_new/fans/list.dart';
class FansData {
List<FansItemModel>? list;
String? offset;
int? reVersion;
int? total;
FansData({this.list, this.offset, this.reVersion, this.total});
factory FansData.fromJson(Map<String, dynamic> json) => FansData(
list: (json['list'] as List<dynamic>?)
?.map((e) => FansItemModel.fromJson(e as Map<String, dynamic>))
.toList(),
offset: json['offset'] as String?,
reVersion: json['re_version'] as int?,
total: json['total'] as int?,
);
}

View File

@@ -1,61 +0,0 @@
import 'package:PiliPlus/models/model_avatar.dart';
class FansItemModel {
int? mid;
int? attribute;
int? mtime;
dynamic tag;
int? special;
String? uname;
String? face;
String? sign;
int? faceNft;
BaseOfficialVerify? officialVerify;
Vip? vip;
String? nftIcon;
String? recReason;
String? trackId;
String? followTime;
FansItemModel({
this.mid,
this.attribute,
this.mtime,
this.tag,
this.special,
this.uname,
this.face,
this.sign,
this.faceNft,
this.officialVerify,
this.vip,
this.nftIcon,
this.recReason,
this.trackId,
this.followTime,
});
factory FansItemModel.fromJson(Map<String, dynamic> json) => FansItemModel(
mid: json['mid'] as int?,
attribute: json['attribute'] as int?,
mtime: json['mtime'] as int?,
tag: json['tag'] as dynamic,
special: json['special'] as int?,
uname: json['uname'] as String?,
face: json['face'] as String?,
sign: json['sign'] as String?,
faceNft: json['face_nft'] as int?,
officialVerify: json['official_verify'] == null
? null
: BaseOfficialVerify.fromJson(
json['official_verify'] as Map<String, dynamic>,
),
vip: json['vip'] == null
? null
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
nftIcon: json['nft_icon'] as String?,
recReason: json['rec_reason'] as String?,
trackId: json['track_id'] as String?,
followTime: json['follow_time'] as String?,
);
}

View File

@@ -2,10 +2,9 @@ import 'package:PiliPlus/models_new/follow/list.dart';
class FollowData {
late List<FollowItemModel> list;
int? reVersion;
int? total;
FollowData({required this.list, this.reVersion, this.total});
FollowData({required this.list, this.total});
factory FollowData.fromJson(Map<String, dynamic> json) => FollowData(
list:
@@ -13,7 +12,6 @@ class FollowData {
?.map((e) => FollowItemModel.fromJson(e as Map<String, dynamic>))
.toList() ??
<FollowItemModel>[],
reVersion: json['re_version'] as int?,
total: json['total'] as int?,
);
}

View File

@@ -7,12 +7,8 @@ class FollowItemModel extends UpItem {
dynamic tag;
int? special;
String? sign;
int? faceNft;
BaseOfficialVerify? officialVerify;
Vip? vip;
String? nftIcon;
String? recReason;
String? trackId;
String? followTime;
FollowItemModel({
@@ -24,12 +20,8 @@ class FollowItemModel extends UpItem {
super.uname,
super.face,
this.sign,
this.faceNft,
this.officialVerify,
this.vip,
this.nftIcon,
this.recReason,
this.trackId,
this.followTime,
});
@@ -43,7 +35,6 @@ class FollowItemModel extends UpItem {
uname: json['uname'] as String?,
face: json['face'] as String?,
sign: json['sign'] as String?,
faceNft: json['face_nft'] as int?,
officialVerify: json['official_verify'] == null
? null
: BaseOfficialVerify.fromJson(
@@ -52,9 +43,6 @@ class FollowItemModel extends UpItem {
vip: json['vip'] == null
? null
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
nftIcon: json['nft_icon'] as String?,
recReason: json['rec_reason'] as String?,
trackId: json['track_id'] as String?,
followTime: json['follow_time'] as String?,
);
}

View File

@@ -1,19 +1,13 @@
class RejectPage {
String? title;
String? text;
String? img;
String? title;
String? text;
String? img;
RejectPage({this.title, this.text, this.img});
RejectPage({this.title, this.text, this.img});
factory RejectPage.fromJson(Map<String, dynamic> json) => RejectPage(
title: json['title'] as String?,
text: json['text'] as String?,
img: json['img'] as String?,
);
Map<String, dynamic> toJson() => {
'title': title,
'text': text,
'img': img,
};
factory RejectPage.fromJson(Map<String, dynamic> json) => RejectPage(
title: json['title'] as String?,
text: json['text'] as String?,
img: json['img'] as String?,
);
}