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