mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 23:26:14 +08:00
handle sub url
Closes #995 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,60 +1,38 @@
|
|||||||
import 'package:PiliPlus/models/model_owner.dart';
|
import 'package:PiliPlus/models/model_owner.dart';
|
||||||
|
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
||||||
|
|
||||||
class SpaceFavItemModel {
|
class SpaceFavItemModel extends SubItemModel {
|
||||||
int? id;
|
|
||||||
int? mediaId;
|
int? mediaId;
|
||||||
int? count;
|
int? count;
|
||||||
int? isPublic;
|
int? isPublic;
|
||||||
int? fid;
|
|
||||||
int? mid;
|
|
||||||
int? attr;
|
|
||||||
String? attrDesc;
|
|
||||||
String? title;
|
|
||||||
String? cover;
|
|
||||||
Owner? upper;
|
|
||||||
int? coverType;
|
|
||||||
String? intro;
|
|
||||||
int? ctime;
|
|
||||||
int? mtime;
|
|
||||||
int? state;
|
|
||||||
int? favState;
|
|
||||||
int? mediaCount;
|
|
||||||
int? viewCount;
|
|
||||||
int? vt;
|
|
||||||
bool? isTop;
|
|
||||||
dynamic recentFav;
|
|
||||||
int? playSwitch;
|
|
||||||
int? type;
|
|
||||||
String? link;
|
|
||||||
String? bvid;
|
|
||||||
|
|
||||||
SpaceFavItemModel({
|
SpaceFavItemModel({
|
||||||
this.id,
|
super.id,
|
||||||
this.mediaId,
|
this.mediaId,
|
||||||
this.count,
|
this.count,
|
||||||
this.isPublic,
|
this.isPublic,
|
||||||
this.fid,
|
super.fid,
|
||||||
this.mid,
|
super.mid,
|
||||||
this.attr,
|
super.attr,
|
||||||
this.attrDesc,
|
super.attrDesc,
|
||||||
this.title,
|
super.title,
|
||||||
this.cover,
|
super.cover,
|
||||||
this.upper,
|
super.upper,
|
||||||
this.coverType,
|
super.coverType,
|
||||||
this.intro,
|
super.intro,
|
||||||
this.ctime,
|
super.ctime,
|
||||||
this.mtime,
|
super.mtime,
|
||||||
this.state,
|
super.state,
|
||||||
this.favState,
|
super.favState,
|
||||||
this.mediaCount,
|
super.mediaCount,
|
||||||
this.viewCount,
|
super.viewCount,
|
||||||
this.vt,
|
super.vt,
|
||||||
this.isTop,
|
super.isTop,
|
||||||
this.recentFav,
|
super.recentFav,
|
||||||
this.playSwitch,
|
super.playSwitch,
|
||||||
this.type,
|
super.type,
|
||||||
this.link,
|
super.link,
|
||||||
this.bvid,
|
super.bvid,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory SpaceFavItemModel.fromJson(Map<String, dynamic> json) =>
|
factory SpaceFavItemModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:PiliPlus/models/model_owner.dart';
|
import 'package:PiliPlus/models/model_owner.dart';
|
||||||
|
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
||||||
|
|
||||||
class SubItemModel {
|
class SubItemModel {
|
||||||
int? id;
|
int? id;
|
||||||
@@ -24,6 +25,7 @@ class SubItemModel {
|
|||||||
int? type;
|
int? type;
|
||||||
String? link;
|
String? link;
|
||||||
String? bvid;
|
String? bvid;
|
||||||
|
CntInfo? cntInfo;
|
||||||
|
|
||||||
SubItemModel({
|
SubItemModel({
|
||||||
this.id,
|
this.id,
|
||||||
@@ -49,6 +51,7 @@ class SubItemModel {
|
|||||||
this.type,
|
this.type,
|
||||||
this.link,
|
this.link,
|
||||||
this.bvid,
|
this.bvid,
|
||||||
|
this.cntInfo,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory SubItemModel.fromJson(Map<String, dynamic> json) => SubItemModel(
|
factory SubItemModel.fromJson(Map<String, dynamic> json) => SubItemModel(
|
||||||
@@ -77,5 +80,8 @@ class SubItemModel {
|
|||||||
type: json['type'] as int?,
|
type: json['type'] as int?,
|
||||||
link: json['link'] as String?,
|
link: json['link'] as String?,
|
||||||
bvid: json['bvid'] as String?,
|
bvid: json['bvid'] as String?,
|
||||||
|
cntInfo: json['cnt_info'] == null
|
||||||
|
? null
|
||||||
|
: CntInfo.fromJson(json['cnt_info']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import "package:PiliPlus/models_new/sub/sub_detail/info.dart";
|
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
||||||
import 'package:PiliPlus/models_new/sub/sub_detail/media.dart';
|
import 'package:PiliPlus/models_new/sub/sub_detail/media.dart';
|
||||||
|
|
||||||
class SubDetailData {
|
class SubDetailData {
|
||||||
Info? info;
|
SubItemModel? info;
|
||||||
List<SubDetailItemModel>? medias;
|
List<SubDetailItemModel>? medias;
|
||||||
|
|
||||||
SubDetailData({this.info, this.medias});
|
SubDetailData({this.info, this.medias});
|
||||||
@@ -10,7 +10,7 @@ class SubDetailData {
|
|||||||
factory SubDetailData.fromJson(Map<String, dynamic> json) => SubDetailData(
|
factory SubDetailData.fromJson(Map<String, dynamic> json) => SubDetailData(
|
||||||
info: json['info'] == null
|
info: json['info'] == null
|
||||||
? null
|
? null
|
||||||
: Info.fromJson(json['info'] as Map<String, dynamic>),
|
: SubItemModel.fromJson(json['info'] as Map<String, dynamic>),
|
||||||
medias: (json['medias'] as List<dynamic>?)
|
medias: (json['medias'] as List<dynamic>?)
|
||||||
?.map((e) => SubDetailItemModel.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SubDetailItemModel.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
import 'package:PiliPlus/models/model_owner.dart';
|
|
||||||
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
|
||||||
|
|
||||||
class Info {
|
|
||||||
int? id;
|
|
||||||
int? seasonType;
|
|
||||||
String? title;
|
|
||||||
String? cover;
|
|
||||||
Owner? upper;
|
|
||||||
CntInfo? cntInfo;
|
|
||||||
int? mediaCount;
|
|
||||||
String? intro;
|
|
||||||
int? enableVt;
|
|
||||||
|
|
||||||
Info({
|
|
||||||
this.id,
|
|
||||||
this.seasonType,
|
|
||||||
this.title,
|
|
||||||
this.cover,
|
|
||||||
this.upper,
|
|
||||||
this.cntInfo,
|
|
||||||
this.mediaCount,
|
|
||||||
this.intro,
|
|
||||||
this.enableVt,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory Info.fromJson(Map<String, dynamic> json) => Info(
|
|
||||||
id: json['id'] as int?,
|
|
||||||
seasonType: json['season_type'] as int?,
|
|
||||||
title: json['title'] as String?,
|
|
||||||
cover: json['cover'] as String?,
|
|
||||||
upper: json['upper'] == null
|
|
||||||
? null
|
|
||||||
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
|
|
||||||
cntInfo: json['cnt_info'] == null
|
|
||||||
? null
|
|
||||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
|
||||||
mediaCount: json['media_count'] as int?,
|
|
||||||
intro: json['intro'] as String?,
|
|
||||||
enableVt: json['enable_vt'] as int?,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ import 'package:PiliPlus/common/widgets/badge.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/models_new/space/space_fav/list.dart';
|
import 'package:PiliPlus/models_new/space/space_fav/list.dart';
|
||||||
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
import 'package:PiliPlus/pages/subscription_detail/view.dart';
|
||||||
import 'package:PiliPlus/utils/fav_util.dart';
|
import 'package:PiliPlus/utils/fav_util.dart';
|
||||||
import 'package:PiliPlus/utils/num_util.dart';
|
import 'package:PiliPlus/utils/num_util.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
@@ -38,20 +38,9 @@ class MemberFavItem extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
callback?.call(res);
|
callback?.call(res);
|
||||||
} else {
|
} else {
|
||||||
Get.toNamed(
|
SubDetailPage.toSubDetailPage(
|
||||||
'/subDetail',
|
item.id!,
|
||||||
arguments: SubItemModel(
|
subInfo: item,
|
||||||
type: item.type,
|
|
||||||
title: item.title,
|
|
||||||
cover: item.cover,
|
|
||||||
upper: item.upper,
|
|
||||||
mediaCount: item.mediaCount,
|
|
||||||
viewCount: item.viewCount,
|
|
||||||
),
|
|
||||||
parameters: {
|
|
||||||
'id': item.id.toString(),
|
|
||||||
'heroTag': Utils.makeHeroTag(item.id),
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:PiliPlus/common/widgets/badge.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
import 'package:PiliPlus/common/widgets/image/image_save.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
||||||
|
import 'package:PiliPlus/pages/subscription_detail/view.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
@@ -42,13 +43,10 @@ class SubItem extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
Get.toNamed(
|
SubDetailPage.toSubDetailPage(
|
||||||
'/subDetail',
|
item.id!,
|
||||||
arguments: item,
|
heroTag: heroTag,
|
||||||
parameters: {
|
subInfo: item,
|
||||||
'heroTag': heroTag,
|
|
||||||
'id': item.id.toString(),
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,55 +8,39 @@ import 'package:get/get.dart';
|
|||||||
|
|
||||||
class SubDetailController
|
class SubDetailController
|
||||||
extends CommonListController<SubDetailData, SubDetailItemModel> {
|
extends CommonListController<SubDetailData, SubDetailItemModel> {
|
||||||
late SubItemModel subInfo;
|
|
||||||
|
|
||||||
late int id;
|
late int id;
|
||||||
late String heroTag;
|
String? heroTag;
|
||||||
|
SubItemModel? subInfo;
|
||||||
late final RxInt mediaCount;
|
|
||||||
late final RxInt playCount;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
subInfo = Get.arguments;
|
final args = Get.arguments;
|
||||||
mediaCount = (subInfo.mediaCount ?? 0).obs;
|
id = args['id'];
|
||||||
playCount = (subInfo.viewCount ?? 0).obs;
|
subInfo = args['subInfo'];
|
||||||
id = int.parse(Get.parameters['id']!);
|
heroTag = args['heroTag'];
|
||||||
heroTag = Get.parameters['heroTag']!;
|
|
||||||
queryData();
|
queryData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<SubDetailItemModel>? getDataList(SubDetailData response) {
|
List<SubDetailItemModel>? getDataList(SubDetailData response) {
|
||||||
mediaCount.value = response.info!.mediaCount!;
|
subInfo = response.info;
|
||||||
if (subInfo.type == 11) {
|
|
||||||
playCount.value = response.info!.cntInfo!.play!;
|
|
||||||
}
|
|
||||||
return response.medias;
|
return response.medias;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void checkIsEnd(int length) {
|
void checkIsEnd(int length) {
|
||||||
if (length >= mediaCount.value) {
|
final count = subInfo?.mediaCount;
|
||||||
|
if (count != null && length >= count) {
|
||||||
isEnd = true;
|
isEnd = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<LoadingState<SubDetailData>> customGetData() {
|
Future<LoadingState<SubDetailData>> customGetData() => FavHttp.favSeasonList(
|
||||||
if (subInfo.type == 11) {
|
|
||||||
return FavHttp.favResourceList(
|
|
||||||
id: id,
|
id: id,
|
||||||
ps: 20,
|
ps: 20,
|
||||||
pn: page,
|
pn: page,
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
return FavHttp.favSeasonList(
|
|
||||||
id: id,
|
|
||||||
ps: 20,
|
|
||||||
pn: page,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
|
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
||||||
import 'package:PiliPlus/models_new/sub/sub_detail/media.dart';
|
import 'package:PiliPlus/models_new/sub/sub_detail/media.dart';
|
||||||
import 'package:PiliPlus/pages/subscription_detail/controller.dart';
|
import 'package:PiliPlus/pages/subscription_detail/controller.dart';
|
||||||
import 'package:PiliPlus/pages/subscription_detail/widget/sub_video_card.dart';
|
import 'package:PiliPlus/pages/subscription_detail/widget/sub_video_card.dart';
|
||||||
@@ -17,6 +18,21 @@ class SubDetailPage extends StatefulWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
State<SubDetailPage> createState() => _SubDetailPageState();
|
State<SubDetailPage> createState() => _SubDetailPageState();
|
||||||
|
|
||||||
|
static void toSubDetailPage(
|
||||||
|
int id, {
|
||||||
|
String? heroTag,
|
||||||
|
SubItemModel? subInfo,
|
||||||
|
}) {
|
||||||
|
Get.toNamed(
|
||||||
|
'/subDetail',
|
||||||
|
arguments: {
|
||||||
|
'id': id,
|
||||||
|
'subInfo': subInfo,
|
||||||
|
'heroTag': heroTag,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SubDetailPageState extends State<SubDetailPage> {
|
class _SubDetailPageState extends State<SubDetailPage> {
|
||||||
@@ -39,7 +55,7 @@ class _SubDetailPageState extends State<SubDetailPage> {
|
|||||||
controller: _subDetailController.scrollController,
|
controller: _subDetailController.scrollController,
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: [
|
slivers: [
|
||||||
_buildAppBar(theme, padding),
|
_appBar(theme, padding),
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 7,
|
top: 7,
|
||||||
@@ -91,11 +107,37 @@ class _SubDetailPageState extends State<SubDetailPage> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildAppBar(ThemeData theme, EdgeInsets padding) {
|
Widget _appBar(ThemeData theme, EdgeInsets padding) {
|
||||||
|
final info = _subDetailController.subInfo;
|
||||||
|
if (info != null) return _buildAppBar(theme, padding, info);
|
||||||
|
return Obx(() {
|
||||||
|
return switch (_subDetailController.loadingState.value) {
|
||||||
|
Loading() || Error() => const SliverAppBar(),
|
||||||
|
Success() => _buildAppBar(
|
||||||
|
theme,
|
||||||
|
padding,
|
||||||
|
_subDetailController.subInfo!,
|
||||||
|
),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildAppBar(ThemeData theme, EdgeInsets padding, SubItemModel info) {
|
||||||
final style = TextStyle(
|
final style = TextStyle(
|
||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
color: theme.colorScheme.outline,
|
color: theme.colorScheme.outline,
|
||||||
);
|
);
|
||||||
|
Widget cover = NetworkImgLayer(
|
||||||
|
width: 176,
|
||||||
|
height: 110,
|
||||||
|
src: info.cover,
|
||||||
|
);
|
||||||
|
if (_subDetailController.heroTag != null) {
|
||||||
|
cover = Hero(
|
||||||
|
tag: _subDetailController.heroTag!,
|
||||||
|
child: cover,
|
||||||
|
);
|
||||||
|
}
|
||||||
return SliverAppBar.medium(
|
return SliverAppBar.medium(
|
||||||
expandedHeight: kToolbarHeight + 132,
|
expandedHeight: kToolbarHeight + 132,
|
||||||
pinned: true,
|
pinned: true,
|
||||||
@@ -103,17 +145,15 @@ class _SubDetailPageState extends State<SubDetailPage> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
_subDetailController.subInfo.title!,
|
info.title!,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: theme.textTheme.titleMedium,
|
style: theme.textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
Obx(
|
Text(
|
||||||
() => Text(
|
'共${info.mediaCount}条视频',
|
||||||
'共${_subDetailController.mediaCount.value}条视频',
|
|
||||||
style: theme.textTheme.labelMedium,
|
style: theme.textTheme.labelMedium,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
@@ -135,21 +175,14 @@ class _SubDetailPageState extends State<SubDetailPage> {
|
|||||||
spacing: 12,
|
spacing: 12,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Hero(
|
cover,
|
||||||
tag: _subDetailController.heroTag,
|
|
||||||
child: NetworkImgLayer(
|
|
||||||
width: 176,
|
|
||||||
height: 110,
|
|
||||||
src: _subDetailController.subInfo.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 4,
|
spacing: 4,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
_subDetailController.subInfo.title!,
|
info.title!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: theme.textTheme.titleMedium!.fontSize,
|
fontSize: theme.textTheme.titleMedium!.fontSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@@ -158,32 +191,19 @@ class _SubDetailPageState extends State<SubDetailPage> {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/member?mid=${_subDetailController.subInfo.upper!.mid}',
|
'/member?mid=${info.upper!.mid}',
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
_subDetailController.subInfo.upper!.name!,
|
info.upper!.name!,
|
||||||
style: TextStyle(color: theme.colorScheme.primary),
|
style: TextStyle(color: theme.colorScheme.primary),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Obx(
|
Text('共${info.mediaCount}条视频', style: style),
|
||||||
() {
|
Text(
|
||||||
final mediaCount =
|
'${NumUtil.numFormat(info.viewCount ?? info.cntInfo?.play)}次播放',
|
||||||
_subDetailController.mediaCount.value;
|
|
||||||
return mediaCount == 0
|
|
||||||
? const SizedBox.shrink()
|
|
||||||
: Text(
|
|
||||||
'共$mediaCount条视频',
|
|
||||||
style: style,
|
style: style,
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Obx(
|
|
||||||
() => Text(
|
|
||||||
'${NumUtil.numFormat(_subDetailController.playCount.value)}次播放',
|
|
||||||
style: style,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:PiliPlus/http/search.dart';
|
import 'package:PiliPlus/http/search.dart';
|
||||||
import 'package:PiliPlus/models/common/video/source_type.dart';
|
import 'package:PiliPlus/models/common/video/source_type.dart';
|
||||||
|
import 'package:PiliPlus/pages/subscription_detail/view.dart';
|
||||||
import 'package:PiliPlus/pages/video/reply_reply/view.dart';
|
import 'package:PiliPlus/pages/video/reply_reply/view.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:PiliPlus/utils/id_utils.dart';
|
import 'package:PiliPlus/utils/id_utils.dart';
|
||||||
@@ -568,6 +569,13 @@ class PiliScheme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (host.contains('space.bilibili.com')) {
|
if (host.contains('space.bilibili.com')) {
|
||||||
|
String? sid =
|
||||||
|
uri.queryParameters['sid'] ??
|
||||||
|
RegExp(r'lists/(\d+)').firstMatch(path)?.group(1);
|
||||||
|
if (sid != null) {
|
||||||
|
SubDetailPage.toSubDetailPage(int.parse(sid));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
String? mid = uriDigitRegExp.firstMatch(path)?.group(1);
|
String? mid = uriDigitRegExp.firstMatch(path)?.group(1);
|
||||||
if (mid != null) {
|
if (mid != null) {
|
||||||
PageUtils.toDupNamed('/member?mid=$mid', off: off);
|
PageUtils.toDupNamed('/member?mid=$mid', off: off);
|
||||||
|
|||||||
Reference in New Issue
Block a user