mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -88,15 +88,11 @@ class MemberHttp {
|
||||
Constants.appSec,
|
||||
);
|
||||
data['sign'] = sign;
|
||||
int? _mid = GStorage.userInfo.get('userInfoCache')?.mid;
|
||||
dynamic res = await Request().get(
|
||||
Api.spaceArticle,
|
||||
queryParameters: data,
|
||||
options: Options(
|
||||
headers: {
|
||||
'env': 'prod',
|
||||
'app-key': 'android_hd',
|
||||
'x-bili-mid': _mid,
|
||||
'bili-http-engine': 'cronet',
|
||||
'user-agent': Constants.userAgent,
|
||||
},
|
||||
@@ -133,15 +129,11 @@ class MemberHttp {
|
||||
Constants.appSec,
|
||||
);
|
||||
data['sign'] = sign;
|
||||
int? _mid = GStorage.userInfo.get('userInfoCache')?.mid;
|
||||
dynamic res = await Request().get(
|
||||
Api.spaceFav,
|
||||
queryParameters: data,
|
||||
options: Options(
|
||||
headers: {
|
||||
'env': 'prod',
|
||||
'app-key': 'android_hd',
|
||||
'x-bili-mid': _mid,
|
||||
'bili-http-engine': 'cronet',
|
||||
'user-agent': Constants.userAgent,
|
||||
},
|
||||
@@ -214,7 +206,6 @@ class MemberHttp {
|
||||
Constants.appSec,
|
||||
);
|
||||
data['sign'] = sign;
|
||||
int? _mid = GStorage.userInfo.get('userInfoCache')?.mid;
|
||||
dynamic res = await Request().get(
|
||||
type == ContributeType.video
|
||||
? Api.spaceArchive
|
||||
@@ -228,9 +219,6 @@ class MemberHttp {
|
||||
queryParameters: data,
|
||||
options: Options(
|
||||
headers: {
|
||||
'env': 'prod',
|
||||
'app-key': 'android_hd',
|
||||
'x-bili-mid': _mid,
|
||||
'bili-http-engine': 'cronet',
|
||||
'user-agent': Constants.userAgent,
|
||||
},
|
||||
@@ -267,15 +255,11 @@ class MemberHttp {
|
||||
Constants.appSec,
|
||||
);
|
||||
data['sign'] = sign;
|
||||
int? _mid = GStorage.userInfo.get('userInfoCache')?.mid;
|
||||
dynamic res = await Request().get(
|
||||
Api.space,
|
||||
queryParameters: data,
|
||||
options: Options(
|
||||
headers: {
|
||||
'env': 'prod',
|
||||
'app-key': 'android_hd',
|
||||
'x-bili-mid': _mid,
|
||||
'bili-http-engine': 'cronet',
|
||||
'user-agent': Constants.userAgent,
|
||||
},
|
||||
|
||||
@@ -26,10 +26,13 @@ class IntroDetail extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 14, right: 14),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 35,
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: Center(
|
||||
GestureDetector(
|
||||
onTap: Get.back,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
height: 35,
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 3,
|
||||
|
||||
@@ -183,7 +183,6 @@ class _PgcIndexPageState extends State<PgcIndexPage>
|
||||
_ctr.isExpand.value = _ctr.isExpand.value.not;
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
alignment: Alignment.center,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -204,8 +204,18 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
|
||||
// 转发
|
||||
case 'DYNAMIC_TYPE_FORWARD':
|
||||
return InkWell(
|
||||
onTap: () => Utils.pushDynDetail(item.orig, floor + 1),
|
||||
onTap: () {
|
||||
if (item.orig.modules.moduleDynamic.major?.type ==
|
||||
'MAJOR_TYPE_NONE') {
|
||||
return;
|
||||
}
|
||||
Utils.pushDynDetail(item.orig, floor + 1);
|
||||
},
|
||||
onLongPress: () {
|
||||
if (item.orig.modules.moduleDynamic.major?.type ==
|
||||
'MAJOR_TYPE_NONE') {
|
||||
return;
|
||||
}
|
||||
if (item.orig.type == 'DYNAMIC_TYPE_AV') {
|
||||
imageSaveDialog(
|
||||
context: context,
|
||||
|
||||
@@ -9,6 +9,27 @@ import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'rich_node_panel.dart';
|
||||
|
||||
Widget videoSeasonWidget(item, context, type, {floor = 1}) {
|
||||
if (item.modules.moduleDynamic.major?.type == 'MAJOR_TYPE_NONE') {
|
||||
return item.modules.moduleDynamic.major?.none?.tips != null
|
||||
? Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.error,
|
||||
size: 18,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
'${item.modules.moduleDynamic.major.none.tips}',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
}
|
||||
|
||||
TextStyle authorStyle =
|
||||
TextStyle(color: Theme.of(context).colorScheme.primary);
|
||||
// type archive ugcSeason
|
||||
@@ -27,6 +48,9 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
|
||||
InlineSpan? richNodes = richNode(item, context);
|
||||
|
||||
Widget buildCover() {
|
||||
if (content?.cover == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return LayoutBuilder(builder: (context, box) {
|
||||
double width = box.maxWidth;
|
||||
return Stack(
|
||||
@@ -166,17 +190,18 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
|
||||
child: buildCover(),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Padding(
|
||||
padding: floor == 1
|
||||
? const EdgeInsets.only(left: 12, right: 12)
|
||||
: EdgeInsets.zero,
|
||||
child: Text(
|
||||
content.title,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
if (content?.title != null)
|
||||
Padding(
|
||||
padding: floor == 1
|
||||
? const EdgeInsets.only(left: 12, right: 12)
|
||||
: EdgeInsets.zero,
|
||||
child: Text(
|
||||
content.title,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
controller: videoIntroController.expandableCtr,
|
||||
collapsed: GestureDetector(
|
||||
onLongPress: () {
|
||||
feedBack();
|
||||
Feedback.forLongPress(context);
|
||||
Utils.copyText(
|
||||
'${videoDetail.title ?? videoItem['title'] ?? ''}');
|
||||
},
|
||||
@@ -567,7 +567,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
),
|
||||
expanded: GestureDetector(
|
||||
onLongPress: () {
|
||||
feedBack();
|
||||
Feedback.forLongPress(context);
|
||||
Utils.copyText(
|
||||
'${videoDetail.title ?? videoItem['title'] ?? ''}');
|
||||
},
|
||||
|
||||
@@ -777,7 +777,6 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
Future<bool> refreshPlayer() async {
|
||||
Duration currentPos = _position.value;
|
||||
if (_videoPlayerController == null) {
|
||||
SmartDialog.showToast('视频播放器为空,请重新进入本页面');
|
||||
return false;
|
||||
@@ -800,7 +799,7 @@ class PlPlayerController {
|
||||
Media(
|
||||
dataSource.videoSource!,
|
||||
httpHeaders: dataSource.httpHeaders,
|
||||
start: currentPos,
|
||||
start: _position.value,
|
||||
),
|
||||
play: true,
|
||||
);
|
||||
|
||||
@@ -366,7 +366,7 @@ class Utils {
|
||||
|
||||
switch (item.type) {
|
||||
case 'DYNAMIC_TYPE_AV':
|
||||
if (item.modules.moduleDynamic.major.archive.type == 2) {
|
||||
if (item.modules.moduleDynamic.major.archive?.type == 2) {
|
||||
if (item.modules.moduleDynamic.major.archive.jumpUrl
|
||||
.startsWith('//')) {
|
||||
item.modules.moduleDynamic.major.archive.jumpUrl =
|
||||
@@ -380,9 +380,9 @@ class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
String bvid = item.modules.moduleDynamic.major.archive.bvid;
|
||||
String cover = item.modules.moduleDynamic.major.archive.cover;
|
||||
try {
|
||||
String bvid = item.modules.moduleDynamic.major.archive.bvid;
|
||||
String cover = item.modules.moduleDynamic.major.archive.cover;
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
Utils.toDupNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
|
||||
Reference in New Issue
Block a user