Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-29 13:35:51 +08:00
parent bcbfe5c849
commit 5979ddb60c
46 changed files with 3266 additions and 3293 deletions

View File

@@ -140,69 +140,68 @@ class PgcIntroController extends CommonIntroController {
// 分享视频
@override
void actionShareVideo(BuildContext context) {
String videoUrl =
'${HttpString.baseUrl}/bangumi/play/ep$epId${videoDetailCtr.playedTimePos}';
showDialog(
context: context,
builder: (_) {
String videoUrl =
'${HttpString.baseUrl}/bangumi/play/ep$epId${videoDetailCtr.playedTimePos}';
return AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
builder: (_) => AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
dense: true,
title: const Text(
'复制链接',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
Utils.copyText(videoUrl);
},
),
ListTile(
dense: true,
title: const Text(
'其它app打开',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
PageUtils.launchURL(videoUrl);
},
),
if (PlatformUtils.isMobile)
ListTile(
dense: true,
title: const Text(
'复制链接',
'分享视频',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
Utils.copyText(videoUrl);
Utils.shareText(videoUrl);
},
),
ListTile(
dense: true,
title: const Text(
'其它app打开',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
PageUtils.launchURL(videoUrl);
},
ListTile(
dense: true,
title: const Text(
'分享至动态',
style: TextStyle(fontSize: 14),
),
if (PlatformUtils.isMobile)
ListTile(
dense: true,
title: const Text(
'分享视频',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
Utils.shareText(videoUrl);
},
),
ListTile(
dense: true,
title: const Text(
'分享至动态',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
EpisodeItem? item = pgcItem.episodes?.firstWhereOrNull(
(item) => item.epId == epId,
);
showModalBottomSheet(
context: context,
isScrollControlled: true,
useSafeArea: true,
builder: (context) => RepostPanel(
rid: epId,
/**
onTap: () {
Get.back();
EpisodeItem? item = pgcItem.episodes?.firstWhereOrNull(
(item) => item.epId == epId,
);
showModalBottomSheet(
context: context,
isScrollControlled: true,
useSafeArea: true,
builder: (context) => RepostPanel(
rid: epId,
/**
* 1番剧 // 4097
2电影 // 4098
3纪录片 // 4101
@@ -211,67 +210,66 @@ class PgcIntroController extends CommonIntroController {
6漫画
7综艺 // 4099
*/
dynType: switch (pgcItem.type) {
1 => 4097,
2 => 4098,
3 => 4101,
4 => 4100,
5 || 7 => 4099,
_ => -1,
},
pic: pgcItem.cover,
title:
'${pgcItem.title}${item != null ? '\n${item.showTitle}' : ''}',
uname: '',
),
dynType: switch (pgcItem.type) {
1 => 4097,
2 => 4098,
3 => 4101,
4 => 4100,
5 || 7 => 4099,
_ => -1,
},
pic: pgcItem.cover,
title:
'${pgcItem.title}${item != null ? '\n${item.showTitle}' : ''}',
uname: '',
),
);
},
),
ListTile(
dense: true,
title: const Text(
'分享至消息',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
try {
EpisodeItem item = pgcItem.episodes!.firstWhere(
(item) => item.epId == epId,
);
},
),
ListTile(
dense: true,
title: const Text(
'分享至消息',
style: TextStyle(fontSize: 14),
),
onTap: () {
Get.back();
try {
EpisodeItem item = pgcItem.episodes!.firstWhere(
(item) => item.epId == epId,
);
final title =
item.shareCopy ??
'${pgcItem.title} ${item.showTitle ?? item.longTitle}';
PageUtils.pmShare(
context,
content: {
"id": epId!.toString(),
"title": title,
"url": item.shareUrl,
"headline": title,
"source": 16,
"thumb": item.cover,
"source_desc": switch (pgcItem.type) {
1 => '番剧',
2 => '电影',
3 => '纪录片',
4 => '国创',
5 => '电视剧',
6 => '漫画',
7 => '综艺',
_ => null,
},
final title =
item.shareCopy ??
'${pgcItem.title} ${item.showTitle ?? item.longTitle}';
PageUtils.pmShare(
context,
content: {
"id": epId!.toString(),
"title": title,
"url": item.shareUrl,
"headline": title,
"source": 16,
"thumb": item.cover,
"source_desc": switch (pgcItem.type) {
1 => '番剧',
2 => '电影',
3 => '纪录片',
4 => '国创',
5 => '电视剧',
6 => '漫画',
7 => '综艺',
_ => null,
},
);
} catch (e) {
SmartDialog.showToast(e.toString());
}
},
),
],
),
);
},
},
);
} catch (e) {
SmartDialog.showToast(e.toString());
}
},
),
],
),
),
);
}