mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 02:26:52 +08:00
opt pgc/pugv intro panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
26
lib/models_new/pgc/pgc_info_model/brief.dart
Normal file
26
lib/models_new/pgc/pgc_info_model/brief.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class Brief {
|
||||
List<Img>? img;
|
||||
|
||||
Brief({
|
||||
this.img,
|
||||
});
|
||||
|
||||
factory Brief.fromJson(Map<String, dynamic> json) => Brief(
|
||||
img: (json['img'] as List?)?.map((e) => Img.fromJson(e)).toList(),
|
||||
);
|
||||
}
|
||||
|
||||
class Img {
|
||||
num? aspectRatio;
|
||||
String? url;
|
||||
|
||||
Img({
|
||||
this.aspectRatio,
|
||||
this.url,
|
||||
});
|
||||
|
||||
factory Img.fromJson(Map<String, dynamic> json) => Img(
|
||||
aspectRatio: json['aspect_ratio'],
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
}
|
||||
20
lib/models_new/pgc/pgc_info_model/cooperator.dart
Normal file
20
lib/models_new/pgc/pgc_info_model/cooperator.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
class Cooperator {
|
||||
int? mid;
|
||||
String? avatar;
|
||||
String? nickName;
|
||||
String? role;
|
||||
|
||||
Cooperator({
|
||||
this.mid,
|
||||
this.avatar,
|
||||
this.nickName,
|
||||
this.role,
|
||||
});
|
||||
|
||||
factory Cooperator.fromJson(Map<String, dynamic> json) => Cooperator(
|
||||
mid: json['mid'] as int?,
|
||||
avatar: json['avatar'] as String?,
|
||||
nickName: json['nick_name'] as String?,
|
||||
role: json['role'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/activity.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/area.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/brief.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/cooperator.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/episode.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/icon_font.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/new_ep.dart';
|
||||
@@ -53,6 +55,8 @@ class PgcInfoModel {
|
||||
int? type;
|
||||
UpInfo? upInfo;
|
||||
UserStatus? userStatus;
|
||||
List<Cooperator>? cooperators;
|
||||
Brief? brief;
|
||||
|
||||
PgcInfoModel({
|
||||
this.activity,
|
||||
@@ -94,6 +98,8 @@ class PgcInfoModel {
|
||||
this.type,
|
||||
this.upInfo,
|
||||
this.userStatus,
|
||||
this.cooperators,
|
||||
this.brief,
|
||||
});
|
||||
|
||||
factory PgcInfoModel.fromJson(Map<String, dynamic> json) => PgcInfoModel(
|
||||
@@ -164,5 +170,11 @@ class PgcInfoModel {
|
||||
userStatus: json['user_status'] == null
|
||||
? null
|
||||
: UserStatus.fromJson(json['user_status'] as Map<String, dynamic>),
|
||||
cooperators: (json['cooperators'] as List?)
|
||||
?.map((e) => Cooperator.fromJson(e))
|
||||
.toList(),
|
||||
brief: json['brief'] == null
|
||||
? null
|
||||
: Brief.fromJson(json['brief'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user