mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
fetch dyn type onlyfansQaCard
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -66,6 +66,9 @@ abstract final class Constants {
|
||||
|
||||
static const goodsUrlPrefix = "https://gaoneng.bilibili.com/tetris";
|
||||
|
||||
// 'itemOpusStyle,opusBigCover,onlyfansVote,endFooterHidden,decorationCard,onlyfansAssetsV2,ugcDelete,onlyfansQaCard,editable,opusPrivateVisible,avatarAutoTheme,sunflowerStyle,cardsEnhance,eva3CardOpus,eva3CardVideo,eva3CardComment,eva3CardVote,eva3CardUser'
|
||||
static const dynFeatures = 'itemOpusStyle,listOnlyfans,onlyfansQaCard';
|
||||
|
||||
// 超分辨率滤镜
|
||||
static const List<String> mpvAnime4KShaders = [
|
||||
'Anime4K_Clamp_Highlights.glsl',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/pair.dart';
|
||||
import 'package:PiliPlus/http/api.dart';
|
||||
import 'package:PiliPlus/http/constants.dart';
|
||||
@@ -43,7 +44,7 @@ abstract final class DynamicsHttp {
|
||||
'timezone_offset': '-480',
|
||||
},
|
||||
'offset': offset,
|
||||
'features': 'itemOpusStyle,listOnlyfans',
|
||||
'features': Constants.dynFeatures,
|
||||
};
|
||||
final res = await Request().get(Api.followDynamic, queryParameters: data);
|
||||
final code = res.data['code'];
|
||||
@@ -254,7 +255,7 @@ abstract final class DynamicsHttp {
|
||||
'id': ?id,
|
||||
'rid': ?rid,
|
||||
'type': ?type,
|
||||
'features': 'itemOpusStyle',
|
||||
'features': Constants.dynFeatures,
|
||||
'gaia_source': 'Athena',
|
||||
'web_location': '333.1330',
|
||||
'x-bili-device-req-json':
|
||||
@@ -442,8 +443,7 @@ abstract final class DynamicsHttp {
|
||||
'offset': offset,
|
||||
'page_size': 20,
|
||||
'source': 'Web',
|
||||
// itemOpusStyle,listOnlyfans,opusBigCover,onlyfansVote,decorationCard
|
||||
'features': 'itemOpusStyle,listOnlyfans',
|
||||
'features': Constants.dynFeatures,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
|
||||
@@ -405,7 +405,7 @@ abstract final class MemberHttp {
|
||||
'offset': offset ?? '',
|
||||
'host_mid': mid,
|
||||
'timezone_offset': '-480',
|
||||
'features': 'itemOpusStyle,listOnlyfans',
|
||||
'features': Constants.dynFeatures,
|
||||
'platform': 'web',
|
||||
'web_location': '333.1387',
|
||||
'dm_img_list': '[]',
|
||||
@@ -457,7 +457,7 @@ abstract final class MemberHttp {
|
||||
'page': pn,
|
||||
'offset': offset,
|
||||
'keyword': keyword,
|
||||
'features': 'itemOpusStyle,listOnlyfans',
|
||||
'features': Constants.dynFeatures,
|
||||
'web_location': 333.1387,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -867,6 +867,7 @@ class DynamicMajorModel {
|
||||
String? type;
|
||||
DynamicArchiveModel? courses;
|
||||
Common? common;
|
||||
Common? upowerCommon;
|
||||
Music? music;
|
||||
ModuleBlocked? blocked;
|
||||
Medialist? medialist;
|
||||
@@ -900,6 +901,9 @@ class DynamicMajorModel {
|
||||
? null
|
||||
: DynamicArchiveModel.fromJson(json['courses']);
|
||||
common = json['common'] == null ? null : Common.fromJson(json['common']);
|
||||
upowerCommon = json['upower_common'] == null
|
||||
? null
|
||||
: Common.fromJson(json['upower_common']);
|
||||
music = json['music'] == null ? null : Music.fromJson(json['music']);
|
||||
blocked = json['blocked'] == null
|
||||
? null
|
||||
|
||||
@@ -112,6 +112,8 @@ Widget module(
|
||||
);
|
||||
// 活动
|
||||
case 'DYNAMIC_TYPE_COMMON_SQUARE':
|
||||
final common = major?.common ?? major?.upowerCommon;
|
||||
if (common == null) return const SizedBox.shrink();
|
||||
return Material(
|
||||
color: floor == 1
|
||||
? theme.dividerColor.withValues(alpha: 0.08)
|
||||
@@ -123,7 +125,7 @@ Widget module(
|
||||
borderRadius: floor == 1 ? null : StyleString.mdRadius,
|
||||
onTap: () {
|
||||
try {
|
||||
String url = major.common!.jumpUrl!;
|
||||
String url = common.jumpUrl!;
|
||||
if (url.contains('bangumi/play') &&
|
||||
PageUtils.viewPgcFromUri(url)) {
|
||||
return;
|
||||
@@ -141,14 +143,7 @@ Widget module(
|
||||
child: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
if (item
|
||||
.modules
|
||||
.moduleDynamic!
|
||||
.major!
|
||||
.common!
|
||||
.cover
|
||||
?.isNotEmpty ==
|
||||
true)
|
||||
if (common.cover?.isNotEmpty ?? false)
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
child: CachedNetworkImage(
|
||||
@@ -156,9 +151,7 @@ Widget module(
|
||||
height: 45,
|
||||
fit: BoxFit.cover,
|
||||
memCacheWidth: 45.cacheSize(context),
|
||||
imageUrl: ImageUtils.safeThumbnailUrl(
|
||||
item.modules.moduleDynamic!.major!.common!.cover,
|
||||
),
|
||||
imageUrl: ImageUtils.safeThumbnailUrl(common.cover),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@@ -166,22 +159,16 @@ Widget module(
|
||||
spacing: 2,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
major!.common!.title!,
|
||||
style: TextStyle(color: theme.colorScheme.primary),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
if (item
|
||||
.modules
|
||||
.moduleDynamic!
|
||||
.major!
|
||||
.common!
|
||||
.desc
|
||||
?.isNotEmpty ==
|
||||
true)
|
||||
if (common.title?.isNotEmpty ?? false)
|
||||
Text(
|
||||
major.common!.desc!,
|
||||
common.title!,
|
||||
style: TextStyle(color: theme.colorScheme.primary),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
if (common.desc?.isNotEmpty ?? false)
|
||||
Text(
|
||||
common.desc!,
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.outline,
|
||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
||||
|
||||
Reference in New Issue
Block a user