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