mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
show dyn pugv
Closes #1064 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -953,7 +953,7 @@ class DynamicMajorModel {
|
|||||||
// MAJOR_TYPE_ARCHIVE 视频
|
// MAJOR_TYPE_ARCHIVE 视频
|
||||||
// MAJOR_TYPE_OPUS 图文/文章
|
// MAJOR_TYPE_OPUS 图文/文章
|
||||||
String? type;
|
String? type;
|
||||||
Map? courses;
|
DynamicArchiveModel? courses;
|
||||||
Common? common;
|
Common? common;
|
||||||
Map? music;
|
Map? music;
|
||||||
ModuleBlocked? blocked;
|
ModuleBlocked? blocked;
|
||||||
@@ -987,7 +987,9 @@ class DynamicMajorModel {
|
|||||||
? DynamicNoneModel.fromJson(json['none'])
|
? DynamicNoneModel.fromJson(json['none'])
|
||||||
: null;
|
: null;
|
||||||
type = json['type'];
|
type = json['type'];
|
||||||
courses = json['courses'];
|
courses = json['courses'] == null
|
||||||
|
? null
|
||||||
|
: DynamicArchiveModel.fromJson(json['courses']);
|
||||||
common = json['common'] == null ? null : Common.fromJson(json['common']);
|
common = json['common'] == null ? null : Common.fromJson(json['common']);
|
||||||
music = json['music'];
|
music = json['music'];
|
||||||
blocked = json['blocked'] == null
|
blocked = json['blocked'] == null
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ class DynamicPanel extends StatelessWidget {
|
|||||||
'DYNAMIC_TYPE_LIVE',
|
'DYNAMIC_TYPE_LIVE',
|
||||||
'DYNAMIC_TYPE_LIVE_RCMD',
|
'DYNAMIC_TYPE_LIVE_RCMD',
|
||||||
'DYNAMIC_TYPE_MEDIALIST',
|
'DYNAMIC_TYPE_MEDIALIST',
|
||||||
|
'DYNAMIC_TYPE_COURSES_SEASON',
|
||||||
}.contains(item.type)
|
}.contains(item.type)
|
||||||
? null
|
? null
|
||||||
: () => PageUtils.pushDynDetail(item, 1),
|
: () => PageUtils.pushDynDetail(item, 1),
|
||||||
@@ -152,6 +153,10 @@ class DynamicPanel extends StatelessWidget {
|
|||||||
title = major?.live?.title;
|
title = major?.live?.title;
|
||||||
cover = major?.live?.cover;
|
cover = major?.live?.cover;
|
||||||
break;
|
break;
|
||||||
|
case 'DYNAMIC_TYPE_COURSES_SEASON':
|
||||||
|
title = major?.courses?.title;
|
||||||
|
cover = major?.courses?.cover;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
morePanel(context);
|
morePanel(context);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -38,13 +38,16 @@ Widget module(
|
|||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
// 视频
|
// 视频
|
||||||
case 'DYNAMIC_TYPE_AV':
|
case 'DYNAMIC_TYPE_AV':
|
||||||
|
case 'DYNAMIC_TYPE_UGC_SEASON':
|
||||||
|
case 'DYNAMIC_TYPE_PGC':
|
||||||
|
case 'DYNAMIC_TYPE_PGC_UNION':
|
||||||
|
case 'DYNAMIC_TYPE_COURSES_SEASON':
|
||||||
return videoSeasonWidget(
|
return videoSeasonWidget(
|
||||||
theme,
|
theme,
|
||||||
isSave,
|
isSave,
|
||||||
isDetail,
|
isDetail,
|
||||||
item,
|
item,
|
||||||
context,
|
context,
|
||||||
'archive',
|
|
||||||
callback,
|
callback,
|
||||||
floor: floor,
|
floor: floor,
|
||||||
maxWidth: maxWidth,
|
maxWidth: maxWidth,
|
||||||
@@ -200,42 +203,6 @@ Widget module(
|
|||||||
// 直播
|
// 直播
|
||||||
case 'DYNAMIC_TYPE_LIVE':
|
case 'DYNAMIC_TYPE_LIVE':
|
||||||
return livePanel(theme, isDetail, item, context, floor: floor);
|
return livePanel(theme, isDetail, item, context, floor: floor);
|
||||||
// 合集
|
|
||||||
case 'DYNAMIC_TYPE_UGC_SEASON':
|
|
||||||
return videoSeasonWidget(
|
|
||||||
theme,
|
|
||||||
isSave,
|
|
||||||
isDetail,
|
|
||||||
item,
|
|
||||||
context,
|
|
||||||
'ugcSeason',
|
|
||||||
callback,
|
|
||||||
maxWidth: maxWidth,
|
|
||||||
);
|
|
||||||
case 'DYNAMIC_TYPE_PGC':
|
|
||||||
return videoSeasonWidget(
|
|
||||||
theme,
|
|
||||||
isSave,
|
|
||||||
isDetail,
|
|
||||||
item,
|
|
||||||
context,
|
|
||||||
'pgc',
|
|
||||||
callback,
|
|
||||||
floor: floor,
|
|
||||||
maxWidth: maxWidth,
|
|
||||||
);
|
|
||||||
case 'DYNAMIC_TYPE_PGC_UNION':
|
|
||||||
return videoSeasonWidget(
|
|
||||||
theme,
|
|
||||||
isSave,
|
|
||||||
isDetail,
|
|
||||||
item,
|
|
||||||
context,
|
|
||||||
'pgc',
|
|
||||||
callback,
|
|
||||||
floor: floor,
|
|
||||||
maxWidth: maxWidth,
|
|
||||||
);
|
|
||||||
case 'DYNAMIC_TYPE_NONE':
|
case 'DYNAMIC_TYPE_NONE':
|
||||||
return Row(
|
return Row(
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
@@ -244,19 +211,6 @@ Widget module(
|
|||||||
Text(item.modules.moduleDynamic!.major!.none!.tips!),
|
Text(item.modules.moduleDynamic!.major!.none!.tips!),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
// 课堂
|
|
||||||
case 'DYNAMIC_TYPE_COURSES_SEASON':
|
|
||||||
return SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
child: Padding(
|
|
||||||
padding: floor == 1
|
|
||||||
? const EdgeInsets.symmetric(horizontal: 12)
|
|
||||||
: EdgeInsets.zero,
|
|
||||||
child: Text(
|
|
||||||
"课堂:${item.modules.moduleDynamic!.major!.courses!['title']}",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
// 活动
|
// 活动
|
||||||
case 'DYNAMIC_TYPE_COMMON_SQUARE':
|
case 'DYNAMIC_TYPE_COMMON_SQUARE':
|
||||||
return Material(
|
return Material(
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ Widget videoSeasonWidget(
|
|||||||
bool isDetail,
|
bool isDetail,
|
||||||
DynamicItemModel item,
|
DynamicItemModel item,
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
String type,
|
|
||||||
Function(List<String>, int)? callback, {
|
Function(List<String>, int)? callback, {
|
||||||
floor = 1,
|
floor = 1,
|
||||||
required double maxWidth,
|
required double maxWidth,
|
||||||
@@ -45,10 +44,12 @@ Widget videoSeasonWidget(
|
|||||||
// 1 投稿视频 铺满 borderRadius 0
|
// 1 投稿视频 铺满 borderRadius 0
|
||||||
// 2 转发视频 铺满 borderRadius 6
|
// 2 转发视频 铺满 borderRadius 6
|
||||||
|
|
||||||
DynamicArchiveModel? itemContent = switch (type) {
|
DynamicArchiveModel? itemContent = switch (item.type) {
|
||||||
'ugcSeason' => item.modules.moduleDynamic?.major?.ugcSeason,
|
'DYNAMIC_TYPE_AV' => item.modules.moduleDynamic?.major?.archive,
|
||||||
'archive' => item.modules.moduleDynamic?.major?.archive,
|
'DYNAMIC_TYPE_UGC_SEASON' => item.modules.moduleDynamic?.major?.ugcSeason,
|
||||||
'pgc' => item.modules.moduleDynamic?.major?.pgc,
|
'DYNAMIC_TYPE_PGC' ||
|
||||||
|
'DYNAMIC_TYPE_PGC_UNION' => item.modules.moduleDynamic?.major?.pgc,
|
||||||
|
'DYNAMIC_TYPE_COURSES_SEASON' => item.modules.moduleDynamic?.major?.courses,
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -121,9 +122,11 @@ Widget videoSeasonWidget(
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
],
|
],
|
||||||
Text('${NumUtil.numFormat(itemContent.stat?.play)}次围观'),
|
if (itemContent.stat != null) ...[
|
||||||
const SizedBox(width: 6),
|
Text('${NumUtil.numFormat(itemContent.stat!.play)}次围观'),
|
||||||
Text('${NumUtil.numFormat(itemContent.stat?.danmu)}条弹幕'),
|
const SizedBox(width: 6),
|
||||||
|
Text('${NumUtil.numFormat(itemContent.stat!.danmu)}条弹幕'),
|
||||||
|
],
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/play.png',
|
'assets/images/play.png',
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ class MemberAudioItem extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
StatWidget(
|
StatWidget(
|
||||||
type: StatType.listen,
|
type: StatType.listen,
|
||||||
value: item.statistic?.play,
|
value: item.statistic!.play,
|
||||||
),
|
),
|
||||||
StatWidget(
|
StatWidget(
|
||||||
type: StatType.reply,
|
type: StatType.reply,
|
||||||
value: item.statistic?.comment,
|
value: item.statistic!.comment,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -518,7 +518,10 @@ class PageUtils {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// case 'DYNAMIC_TYPE_COURSES_SEASON':
|
case 'DYNAMIC_TYPE_COURSES_SEASON':
|
||||||
|
PageUtils.viewPugv(seasonId: item.basic?.ridStr);
|
||||||
|
break;
|
||||||
|
|
||||||
// 纯文字动态查看
|
// 纯文字动态查看
|
||||||
// case 'DYNAMIC_TYPE_WORD':
|
// case 'DYNAMIC_TYPE_WORD':
|
||||||
// # 装扮/剧集点评/普通分享
|
// # 装扮/剧集点评/普通分享
|
||||||
|
|||||||
Reference in New Issue
Block a user