mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: fetch only-fans dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -14,7 +14,7 @@ class DynamicsHttp {
|
|||||||
'type': type ?? 'all',
|
'type': type ?? 'all',
|
||||||
'timezone_offset': '-480',
|
'timezone_offset': '-480',
|
||||||
'offset': offset,
|
'offset': offset,
|
||||||
'features': 'itemOpusStyle'
|
'features': 'itemOpusStyle,listOnlyfans'
|
||||||
};
|
};
|
||||||
if (mid != -1) {
|
if (mid != -1) {
|
||||||
data['host_mid'] = mid;
|
data['host_mid'] = mid;
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ class MemberHttp {
|
|||||||
'offset': offset ?? '',
|
'offset': offset ?? '',
|
||||||
'host_mid': mid,
|
'host_mid': mid,
|
||||||
'timezone_offset': '-480',
|
'timezone_offset': '-480',
|
||||||
'features': 'itemOpusStyle',
|
'features': 'itemOpusStyle,listOnlyfans',
|
||||||
'platform': 'web',
|
'platform': 'web',
|
||||||
'web_location': '333.999',
|
'web_location': '333.999',
|
||||||
'dm_img_list': '[]',
|
'dm_img_list': '[]',
|
||||||
|
|||||||
@@ -421,6 +421,7 @@ class DynamicMajorModel {
|
|||||||
this.courses,
|
this.courses,
|
||||||
this.common,
|
this.common,
|
||||||
this.music,
|
this.music,
|
||||||
|
this.blocked,
|
||||||
});
|
});
|
||||||
|
|
||||||
DynamicArchiveModel? archive;
|
DynamicArchiveModel? archive;
|
||||||
@@ -438,6 +439,7 @@ class DynamicMajorModel {
|
|||||||
Map? courses;
|
Map? courses;
|
||||||
Map? common;
|
Map? common;
|
||||||
Map? music;
|
Map? music;
|
||||||
|
Map? blocked;
|
||||||
|
|
||||||
DynamicMajorModel.fromJson(Map<String, dynamic> json) {
|
DynamicMajorModel.fromJson(Map<String, dynamic> json) {
|
||||||
archive = json['archive'] != null
|
archive = json['archive'] != null
|
||||||
@@ -463,6 +465,7 @@ class DynamicMajorModel {
|
|||||||
courses = json['courses'] ?? {};
|
courses = json['courses'] ?? {};
|
||||||
common = json['common'] ?? {};
|
common = json['common'] ?? {};
|
||||||
music = json['music'] ?? {};
|
music = json['music'] ?? {};
|
||||||
|
blocked = json['blocked'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,21 +37,14 @@ InlineSpan picsNodes(List<OpusPicsModel> pics, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget forWard(item, context, source, callback, {floor = 1}) {
|
Widget forWard(item, context, source, callback, {floor = 1}) {
|
||||||
TextStyle authorStyle =
|
|
||||||
TextStyle(color: Theme.of(context).colorScheme.primary);
|
|
||||||
|
|
||||||
List<OpusPicsModel> pics = [];
|
|
||||||
|
|
||||||
bool hasPics = item.modules.moduleDynamic.major != null &&
|
|
||||||
item.modules.moduleDynamic.major.opus != null &&
|
|
||||||
item.modules.moduleDynamic.major.opus.pics.isNotEmpty;
|
|
||||||
if (hasPics) {
|
|
||||||
pics = item.modules.moduleDynamic.major.opus.pics;
|
|
||||||
}
|
|
||||||
InlineSpan? richNodes = richNode(item, context);
|
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
// 图文
|
// 图文
|
||||||
case 'DYNAMIC_TYPE_DRAW':
|
case 'DYNAMIC_TYPE_DRAW':
|
||||||
|
bool hasPics = item.modules.moduleDynamic.major != null &&
|
||||||
|
item.modules.moduleDynamic.major.opus != null &&
|
||||||
|
item.modules.moduleDynamic.major.opus.pics.isNotEmpty;
|
||||||
|
|
||||||
|
InlineSpan? richNodes = richNode(item, context);
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -64,7 +57,8 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
|||||||
arguments: {'face': item.modules.moduleAuthor.face}),
|
arguments: {'face': item.modules.moduleAuthor.face}),
|
||||||
child: Text(
|
child: Text(
|
||||||
'@${item.modules.moduleAuthor.name}',
|
'@${item.modules.moduleAuthor.name}',
|
||||||
style: authorStyle,
|
style:
|
||||||
|
TextStyle(color: Theme.of(context).colorScheme.primary),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
@@ -93,6 +87,7 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
if (richNodes != null)
|
if (richNodes != null)
|
||||||
Text.rich(
|
Text.rich(
|
||||||
richNodes,
|
richNodes,
|
||||||
@@ -104,7 +99,7 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
|||||||
),
|
),
|
||||||
if (hasPics) ...[
|
if (hasPics) ...[
|
||||||
Text.rich(
|
Text.rich(
|
||||||
picsNodes(pics, callback),
|
picsNodes(item.modules.moduleDynamic.major.opus.pics, callback),
|
||||||
// semanticsLabel: '动态图片',
|
// semanticsLabel: '动态图片',
|
||||||
),
|
),
|
||||||
if (item.modules.moduleDynamic.additional != null)
|
if (item.modules.moduleDynamic.additional != null)
|
||||||
@@ -126,7 +121,38 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
|||||||
context,
|
context,
|
||||||
item.modules.moduleDynamic.additional.type,
|
item.modules.moduleDynamic.additional.type,
|
||||||
floor: floor,
|
floor: floor,
|
||||||
)
|
),
|
||||||
|
|
||||||
|
if (item.modules.moduleDynamic.major.blocked != null) ...[
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 12, right: 12, bottom: source == 'detail' ? 8 : 0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (item.modules.moduleDynamic.major.blocked['title'] != null)
|
||||||
|
Text(
|
||||||
|
item.modules.moduleDynamic.major.blocked['title'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (item.modules.moduleDynamic.major
|
||||||
|
.blocked['hint_message'] !=
|
||||||
|
null)
|
||||||
|
Text(
|
||||||
|
item.modules.moduleDynamic.major.blocked['hint_message'],
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
// 视频
|
// 视频
|
||||||
@@ -198,6 +224,7 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
|||||||
case 'DYNAMIC_TYPE_UGC_SEASON':
|
case 'DYNAMIC_TYPE_UGC_SEASON':
|
||||||
return videoSeasonWidget(item, context, 'ugcSeason');
|
return videoSeasonWidget(item, context, 'ugcSeason');
|
||||||
case 'DYNAMIC_TYPE_WORD':
|
case 'DYNAMIC_TYPE_WORD':
|
||||||
|
InlineSpan? richNodes = richNode(item, context);
|
||||||
return floor == 2
|
return floor == 2
|
||||||
? Column(
|
? Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -210,7 +237,8 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
|||||||
arguments: {'face': item.modules.moduleAuthor.face}),
|
arguments: {'face': item.modules.moduleAuthor.face}),
|
||||||
child: Text(
|
child: Text(
|
||||||
'@${item.modules.moduleAuthor.name}',
|
'@${item.modules.moduleAuthor.name}',
|
||||||
style: authorStyle,
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import 'package:PiliPlus/common/widgets/imageview.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
Widget picWidget(item, context, callback) {
|
Widget picWidget(item, context, callback) {
|
||||||
String type = item.modules.moduleDynamic.major.type;
|
if (item.modules.moduleDynamic.major?.draw?.items == null ||
|
||||||
if (type == 'MAJOR_TYPE_OPUS') {
|
item.modules.moduleDynamic.major.type == 'MAJOR_TYPE_OPUS') {
|
||||||
/// fix 图片跟rich_node_panel重复
|
/// fix 图片跟rich_node_panel重复
|
||||||
// pictures = item.modules.moduleDynamic.major.opus.pics;
|
// pictures = item.modules.moduleDynamic.major.opus.pics;
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
|
|||||||
Reference in New Issue
Block a user