opt: pm share

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-26 10:26:16 +08:00
parent b8d2ff7e9b
commit 0bdf620c2f
9 changed files with 210 additions and 134 deletions

View File

@@ -349,12 +349,27 @@ class BangumiIntroController
try {
EpisodeItem item = bangumiItem!.episodes!
.firstWhere((item) => item.epId == epId);
PageUtils.pmShareVideo(
id: epId!,
source: 16,
cover: item.cover!,
title: '${bangumiItem!.title!} ${item.showTitle}',
url: item.shareUrl,
final title = '${bangumiItem!.title!} ${item.showTitle}';
PageUtils.pmShare(
content: {
"id": epId!.toString(),
"title": title,
"url": item.shareUrl,
"headline": title,
"source": 16,
"extra": {},
"thumb": item.cover,
"source_desc": switch (bangumiItem!.type) {
1 => '番剧',
2 => '电影',
3 => '纪录片',
4 => '国创',
5 => '电视剧',
6 => '漫画',
7 => '综艺',
_ => null,
}
},
);
} catch (e) {
SmartDialog.showToast(e.toString());