Compare commits
1 Commits
feature-ab
...
fix-videoC
| Author | SHA1 | Date | |
|---|---|---|---|
| c1008e0162 |
@ -229,9 +229,7 @@ class VideoContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
if (crossAxisCount > 1) ...[
|
if (crossAxisCount > 1) ...[
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
VideoStat(
|
VideoStat(videoItem: videoItem, crossAxisCount: crossAxisCount),
|
||||||
videoItem: videoItem,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
if (crossAxisCount == 1) const SizedBox(height: 4),
|
if (crossAxisCount == 1) const SizedBox(height: 4),
|
||||||
Row(
|
Row(
|
||||||
@ -292,10 +290,14 @@ class VideoContent extends StatelessWidget {
|
|||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(context).colorScheme.outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
VideoStat(
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: VideoStat(
|
||||||
videoItem: videoItem,
|
videoItem: videoItem,
|
||||||
|
crossAxisCount: crossAxisCount,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
),
|
||||||
|
// const Spacer(),
|
||||||
],
|
],
|
||||||
if (videoItem.goto == 'av' && crossAxisCount != 1) ...[
|
if (videoItem.goto == 'av' && crossAxisCount != 1) ...[
|
||||||
VideoPopupMenu(
|
VideoPopupMenu(
|
||||||
@ -317,10 +319,12 @@ class VideoContent extends StatelessWidget {
|
|||||||
|
|
||||||
class VideoStat extends StatelessWidget {
|
class VideoStat extends StatelessWidget {
|
||||||
final dynamic videoItem;
|
final dynamic videoItem;
|
||||||
|
final int crossAxisCount;
|
||||||
|
|
||||||
const VideoStat({
|
const VideoStat({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.videoItem,
|
required this.videoItem,
|
||||||
|
required this.crossAxisCount,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -337,7 +341,7 @@ class VideoStat extends StatelessWidget {
|
|||||||
danmu: videoItem.stat.danmu,
|
danmu: videoItem.stat.danmu,
|
||||||
),
|
),
|
||||||
if (videoItem is RecVideoItemModel) ...<Widget>[
|
if (videoItem is RecVideoItemModel) ...<Widget>[
|
||||||
const Spacer(),
|
crossAxisCount > 1 ? const Spacer() : const SizedBox(width: 8),
|
||||||
RichText(
|
RichText(
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
|
|||||||
@ -101,13 +101,10 @@ class MemberHttp {
|
|||||||
'data': MemberArchiveDataModel.fromJson(res.data['data'])
|
'data': MemberArchiveDataModel.fromJson(res.data['data'])
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
Map errMap = {
|
|
||||||
-352: '风控校验失败,请检查登录状态',
|
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
'status': false,
|
'status': false,
|
||||||
'data': [],
|
'data': [],
|
||||||
'msg': errMap[res.data['code']] ?? res.data['message'],
|
'msg': res.data['message'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,13 +123,10 @@ class MemberHttp {
|
|||||||
'data': DynamicsDataModel.fromJson(res.data['data']),
|
'data': DynamicsDataModel.fromJson(res.data['data']),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
Map errMap = {
|
|
||||||
-352: '风控校验失败,请检查登录状态',
|
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
'status': false,
|
'status': false,
|
||||||
'data': [],
|
'data': [],
|
||||||
'msg': errMap[res.data['code']] ?? res.data['message'],
|
'msg': res.data['message'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,7 +142,7 @@ class Stat {
|
|||||||
|
|
||||||
Stat.fromJson(Map<String, dynamic> json) {
|
Stat.fromJson(Map<String, dynamic> json) {
|
||||||
view = json["play"];
|
view = json["play"];
|
||||||
danmaku = json['video_review'];
|
danmaku = json['comment'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,6 @@ class PlayUrlModel {
|
|||||||
String? seekParam;
|
String? seekParam;
|
||||||
String? seekType;
|
String? seekType;
|
||||||
Dash? dash;
|
Dash? dash;
|
||||||
List<Durl>? durl;
|
|
||||||
List<FormatItem>? supportFormats;
|
List<FormatItem>? supportFormats;
|
||||||
// String? highFormat;
|
// String? highFormat;
|
||||||
int? lastPlayTime;
|
int? lastPlayTime;
|
||||||
@ -53,8 +52,7 @@ class PlayUrlModel {
|
|||||||
videoCodecid = json['video_codecid'];
|
videoCodecid = json['video_codecid'];
|
||||||
seekParam = json['seek_param'];
|
seekParam = json['seek_param'];
|
||||||
seekType = json['seek_type'];
|
seekType = json['seek_type'];
|
||||||
dash = json['dash'] != null ? Dash.fromJson(json['dash']) : null;
|
dash = Dash.fromJson(json['dash']);
|
||||||
durl = json['durl']?.map<Durl>((e) => Durl.fromJson(e)).toList();
|
|
||||||
supportFormats = json['support_formats'] != null
|
supportFormats = json['support_formats'] != null
|
||||||
? json['support_formats']
|
? json['support_formats']
|
||||||
.map<FormatItem>((e) => FormatItem.fromJson(e))
|
.map<FormatItem>((e) => FormatItem.fromJson(e))
|
||||||
@ -252,30 +250,3 @@ class Flac {
|
|||||||
audio = json['audio'] != null ? AudioItem.fromJson(json['audio']) : null;
|
audio = json['audio'] != null ? AudioItem.fromJson(json['audio']) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Durl {
|
|
||||||
Durl({
|
|
||||||
this.order,
|
|
||||||
this.length,
|
|
||||||
this.size,
|
|
||||||
this.ahead,
|
|
||||||
this.vhead,
|
|
||||||
this.url,
|
|
||||||
});
|
|
||||||
|
|
||||||
int? order;
|
|
||||||
int? length;
|
|
||||||
int? size;
|
|
||||||
String? ahead;
|
|
||||||
String? vhead;
|
|
||||||
String? url;
|
|
||||||
|
|
||||||
Durl.fromJson(Map<String, dynamic> json) {
|
|
||||||
order = json['order'];
|
|
||||||
length = json['length'];
|
|
||||||
size = json['size'];
|
|
||||||
ahead = json['ahead'];
|
|
||||||
vhead = json['vhead'];
|
|
||||||
url = json['url'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -53,54 +53,29 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
|
Text(
|
||||||
|
'使用Flutter开发的哔哩哔哩第三方客户端',
|
||||||
|
style: TextStyle(color: Theme.of(context).colorScheme.outline),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
Obx(
|
Obx(
|
||||||
() => Badge(
|
() => ListTile(
|
||||||
isLabelVisible: _aboutController.isLoading.value
|
title: const Text('当前版本'),
|
||||||
? false
|
trailing: Text(_aboutController.currentVersion.value,
|
||||||
: _aboutController.isUpdate.value,
|
style: subTitleStyle),
|
||||||
label: const Text('New'),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 30),
|
|
||||||
child: FilledButton.tonal(
|
|
||||||
onPressed: () {
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
ListTile(
|
|
||||||
onTap: () => _aboutController.githubRelease(),
|
|
||||||
title: const Text('Github下载'),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
onTap: () => _aboutController.panDownload(),
|
|
||||||
title: const Text('网盘下载'),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
onTap: () => _aboutController.webSiteUrl(),
|
|
||||||
title: const Text('官网下载'),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
onTap: () => _aboutController.qimiao(),
|
|
||||||
title: const Text('奇妙应用'),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height:
|
|
||||||
MediaQuery.of(context).padding.bottom +
|
|
||||||
20)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
'V${_aboutController.currentVersion.value}',
|
|
||||||
style: subTitleStyle.copyWith(
|
|
||||||
color: Theme.of(context).primaryColor,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Obx(
|
||||||
|
() => ListTile(
|
||||||
|
onTap: () => _aboutController.onUpdate(),
|
||||||
|
title: const Text('最新版本'),
|
||||||
|
trailing: Text(
|
||||||
|
_aboutController.isLoading.value
|
||||||
|
? '正在获取'
|
||||||
|
: _aboutController.isUpdate.value
|
||||||
|
? '有新版本 ❤️${_aboutController.remoteVersion.value}'
|
||||||
|
: '当前已是最新版',
|
||||||
|
style: subTitleStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -112,9 +87,14 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
// size: 16,
|
// size: 16,
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
|
Divider(
|
||||||
|
thickness: 1,
|
||||||
|
height: 30,
|
||||||
|
color: Theme.of(context).colorScheme.outlineVariant,
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () => _aboutController.githubUrl(),
|
onTap: () => _aboutController.githubUrl(),
|
||||||
title: const Text('开源地址'),
|
title: const Text('Github'),
|
||||||
trailing: Text(
|
trailing: Text(
|
||||||
'github.com/guozhigq/pilipala',
|
'github.com/guozhigq/pilipala',
|
||||||
style: subTitleStyle,
|
style: subTitleStyle,
|
||||||
@ -148,44 +128,20 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
color: outline,
|
color: outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListTile(
|
|
||||||
onTap: () {
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () => _aboutController.qqChanel(),
|
onTap: () => _aboutController.qqChanel(),
|
||||||
title: const Text('QQ群'),
|
title: const Text('QQ群'),
|
||||||
trailing: Text(
|
|
||||||
'616150809',
|
|
||||||
style: subTitleStyle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
onTap: () => _aboutController.tgChanel(),
|
|
||||||
title: const Text('TG频道'),
|
|
||||||
trailing: Text(
|
|
||||||
'https://t.me/+lm_oOVmF0RJiODk1',
|
|
||||||
style: subTitleStyle,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: MediaQuery.of(context).padding.bottom + 20)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
title: const Text('交流社区'),
|
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: outline,
|
color: outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
ListTile(
|
||||||
|
onTap: () => _aboutController.tgChanel(),
|
||||||
|
title: const Text('TG频道'),
|
||||||
|
trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline),
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () => _aboutController.aPay(),
|
onTap: () => _aboutController.aPay(),
|
||||||
title: const Text('赞助'),
|
title: const Text('赞助'),
|
||||||
@ -207,7 +163,6 @@ class _AboutPageState extends State<AboutPage> {
|
|||||||
subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle),
|
subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle),
|
||||||
trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline),
|
trailing: Icon(Icons.arrow_forward_ios, size: 16, color: outline),
|
||||||
),
|
),
|
||||||
SizedBox(height: MediaQuery.of(context).padding.bottom + 20)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -275,26 +230,11 @@ class AboutController extends GetxController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
githubRelease() {
|
|
||||||
launchUrl(
|
|
||||||
Uri.parse('https://github.com/guozhigq/pilipala/release'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 从网盘下载
|
// 从网盘下载
|
||||||
panDownload() {
|
panDownload() {
|
||||||
Clipboard.setData(
|
launchUrl(
|
||||||
const ClipboardData(text: 'pili'),
|
|
||||||
);
|
|
||||||
SmartDialog.showToast(
|
|
||||||
'已复制提取码:pili',
|
|
||||||
displayTime: const Duration(milliseconds: 500),
|
|
||||||
).then(
|
|
||||||
(value) => launchUrl(
|
|
||||||
Uri.parse('https://www.123pan.com/s/9sVqVv-flu0A.html'),
|
Uri.parse('https://www.123pan.com/s/9sVqVv-flu0A.html'),
|
||||||
mode: LaunchMode.externalApplication,
|
mode: LaunchMode.externalApplication,
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,7 +250,7 @@ class AboutController extends GetxController {
|
|||||||
// qq频道
|
// qq频道
|
||||||
qqChanel() {
|
qqChanel() {
|
||||||
Clipboard.setData(
|
Clipboard.setData(
|
||||||
const ClipboardData(text: '616150809'),
|
const ClipboardData(text: '489981949'),
|
||||||
);
|
);
|
||||||
SmartDialog.showToast('已复制QQ群号');
|
SmartDialog.showToast('已复制QQ群号');
|
||||||
}
|
}
|
||||||
@ -351,13 +291,6 @@ class AboutController extends GetxController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
qimiao() {
|
|
||||||
launchUrl(
|
|
||||||
Uri.parse('https://www.magicalapk.com/home'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 日志
|
// 日志
|
||||||
logs() {
|
logs() {
|
||||||
Get.toNamed('/logs');
|
Get.toNamed('/logs');
|
||||||
|
|||||||
@ -218,12 +218,14 @@ class BangumiIntroController extends GetxController {
|
|||||||
addIds: addMediaIdsNew.join(','),
|
addIds: addMediaIdsNew.join(','),
|
||||||
delIds: delMediaIdsNew.join(','));
|
delIds: delMediaIdsNew.join(','));
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
|
if (result['data']['prompt']) {
|
||||||
addMediaIdsNew = [];
|
addMediaIdsNew = [];
|
||||||
delMediaIdsNew = [];
|
delMediaIdsNew = [];
|
||||||
|
Get.back();
|
||||||
// 重新获取收藏状态
|
// 重新获取收藏状态
|
||||||
queryHasFavVideo();
|
queryHasFavVideo();
|
||||||
SmartDialog.showToast('✅ 操作成功');
|
SmartDialog.showToast('✅ 操作成功');
|
||||||
Get.back();
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,6 +60,7 @@ class FavDetailController extends GetxController {
|
|||||||
var result = await VideoHttp.favVideo(
|
var result = await VideoHttp.favVideo(
|
||||||
aid: id, addIds: '', delIds: mediaId.toString());
|
aid: id, addIds: '', delIds: mediaId.toString());
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
|
if (result['data']['prompt']) {
|
||||||
List dataList = favList;
|
List dataList = favList;
|
||||||
for (var i in dataList) {
|
for (var i in dataList) {
|
||||||
if (i.id == id) {
|
if (i.id == id) {
|
||||||
@ -70,6 +71,7 @@ class FavDetailController extends GetxController {
|
|||||||
SmartDialog.showToast('取消收藏');
|
SmartDialog.showToast('取消收藏');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
queryUserFavFolderDetail(type: 'onLoad');
|
queryUserFavFolderDetail(type: 'onLoad');
|
||||||
|
|||||||
@ -29,7 +29,6 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
mediaId = Get.parameters['mediaId']!;
|
|
||||||
_futureBuilderFuture = _favDetailController.queryUserFavFolderDetail();
|
_futureBuilderFuture = _favDetailController.queryUserFavFolderDetail();
|
||||||
mediaId = Get.parameters['mediaId']!;
|
mediaId = Get.parameters['mediaId']!;
|
||||||
titleStreamC = StreamController<bool>();
|
titleStreamC = StreamController<bool>();
|
||||||
|
|||||||
@ -80,6 +80,7 @@ class FavSearchController extends GetxController {
|
|||||||
var result = await VideoHttp.favVideo(
|
var result = await VideoHttp.favVideo(
|
||||||
aid: id, addIds: '', delIds: mediaId.toString());
|
aid: id, addIds: '', delIds: mediaId.toString());
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
|
if (result['data']['prompt']) {
|
||||||
List dataList = favList;
|
List dataList = favList;
|
||||||
for (var i in dataList) {
|
for (var i in dataList) {
|
||||||
if (i.id == id) {
|
if (i.id == id) {
|
||||||
@ -90,4 +91,5 @@ class FavSearchController extends GetxController {
|
|||||||
SmartDialog.showToast('取消收藏');
|
SmartDialog.showToast('取消收藏');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,6 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
|
|||||||
late List defaultTabs;
|
late List defaultTabs;
|
||||||
late List<String> tabbarSort;
|
late List<String> tabbarSort;
|
||||||
RxString defaultSearch = ''.obs;
|
RxString defaultSearch = ''.obs;
|
||||||
late bool enableGradientBg;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
@ -41,8 +40,6 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
|
|||||||
if (setting.get(SettingBoxKey.enableSearchWord, defaultValue: true)) {
|
if (setting.get(SettingBoxKey.enableSearchWord, defaultValue: true)) {
|
||||||
searchDefault();
|
searchDefault();
|
||||||
}
|
}
|
||||||
enableGradientBg =
|
|
||||||
setting.get(SettingBoxKey.enableGradientBg, defaultValue: true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onRefresh() {
|
void onRefresh() {
|
||||||
|
|||||||
@ -48,20 +48,17 @@ class _HomePageState extends State<HomePage>
|
|||||||
super.build(context);
|
super.build(context);
|
||||||
Brightness currentBrightness = MediaQuery.of(context).platformBrightness;
|
Brightness currentBrightness = MediaQuery.of(context).platformBrightness;
|
||||||
// 设置状态栏图标的亮度
|
// 设置状态栏图标的亮度
|
||||||
if (_homeController.enableGradientBg) {
|
|
||||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||||
statusBarIconBrightness: currentBrightness == Brightness.light
|
statusBarIconBrightness: currentBrightness == Brightness.light
|
||||||
? Brightness.dark
|
? Brightness.dark
|
||||||
: Brightness.light,
|
: Brightness.light,
|
||||||
));
|
));
|
||||||
}
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
extendBody: true,
|
extendBody: true,
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
// gradient background
|
// gradient background
|
||||||
if (_homeController.enableGradientBg) ...[
|
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
@ -72,14 +69,8 @@ class _HomePageState extends State<HomePage>
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
Theme.of(context)
|
Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.primary.withOpacity(0.5),
|
||||||
.primary
|
|
||||||
.withOpacity(0.9),
|
|
||||||
Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.primary
|
|
||||||
.withOpacity(0.5),
|
|
||||||
Theme.of(context).colorScheme.surface
|
Theme.of(context).colorScheme.surface
|
||||||
],
|
],
|
||||||
begin: Alignment.topLeft,
|
begin: Alignment.topLeft,
|
||||||
@ -89,7 +80,6 @@ class _HomePageState extends State<HomePage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
CustomAppBar(
|
CustomAppBar(
|
||||||
@ -100,37 +90,7 @@ class _HomePageState extends State<HomePage>
|
|||||||
callback: showUserBottomSheet,
|
callback: showUserBottomSheet,
|
||||||
),
|
),
|
||||||
if (_homeController.tabs.length > 1) ...[
|
if (_homeController.tabs.length > 1) ...[
|
||||||
if (_homeController.enableGradientBg) ...[
|
|
||||||
const CustomTabs(),
|
const CustomTabs(),
|
||||||
] else ...[
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 42,
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: TabBar(
|
|
||||||
controller: _homeController.tabController,
|
|
||||||
tabs: [
|
|
||||||
for (var i in _homeController.tabs)
|
|
||||||
Tab(text: i['label'])
|
|
||||||
],
|
|
||||||
isScrollable: true,
|
|
||||||
dividerColor: Colors.transparent,
|
|
||||||
enableFeedback: true,
|
|
||||||
splashBorderRadius: BorderRadius.circular(10),
|
|
||||||
tabAlignment: TabAlignment.center,
|
|
||||||
onTap: (value) {
|
|
||||||
feedBack();
|
|
||||||
if (_homeController.initialIndex.value == value) {
|
|
||||||
_homeController.tabsCtrList[value]().animateToTop();
|
|
||||||
}
|
|
||||||
_homeController.initialIndex.value = value;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
] else ...[
|
] else ...[
|
||||||
const SizedBox(height: 6),
|
const SizedBox(height: 6),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:pilipala/common/widgets/video_card_h.dart';
|
import 'package:pilipala/common/widgets/video_card_h.dart';
|
||||||
import 'package:pilipala/utils/utils.dart';
|
import 'package:pilipala/utils/utils.dart';
|
||||||
import '../../common/widgets/http_error.dart';
|
|
||||||
import 'controller.dart';
|
import 'controller.dart';
|
||||||
|
|
||||||
class MemberArchivePage extends StatefulWidget {
|
class MemberArchivePage extends StatefulWidget {
|
||||||
@ -87,16 +86,10 @@ class _MemberArchivePageState extends State<MemberArchivePage> {
|
|||||||
: const SliverToBoxAdapter(),
|
: const SliverToBoxAdapter(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return HttpError(
|
return const SliverToBoxAdapter();
|
||||||
errMsg: snapshot.data['msg'],
|
|
||||||
fn: () {},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return HttpError(
|
return const SliverToBoxAdapter();
|
||||||
errMsg: snapshot.data['msg'],
|
|
||||||
fn: () {},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return const SliverToBoxAdapter();
|
return const SliverToBoxAdapter();
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
|||||||
import 'package:pilipala/pages/member_dynamics/index.dart';
|
import 'package:pilipala/pages/member_dynamics/index.dart';
|
||||||
import 'package:pilipala/utils/utils.dart';
|
import 'package:pilipala/utils/utils.dart';
|
||||||
|
|
||||||
import '../../common/widgets/http_error.dart';
|
|
||||||
import '../dynamics/widgets/dynamic_panel.dart';
|
import '../dynamics/widgets/dynamic_panel.dart';
|
||||||
|
|
||||||
class MemberDynamicsPage extends StatefulWidget {
|
class MemberDynamicsPage extends StatefulWidget {
|
||||||
@ -81,16 +80,10 @@ class _MemberDynamicsPageState extends State<MemberDynamicsPage> {
|
|||||||
: const SliverToBoxAdapter(),
|
: const SliverToBoxAdapter(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return HttpError(
|
return const SliverToBoxAdapter();
|
||||||
errMsg: snapshot.data['msg'],
|
|
||||||
fn: () {},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return HttpError(
|
return const SliverToBoxAdapter();
|
||||||
errMsg: snapshot.data['msg'],
|
|
||||||
fn: () {},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return const SliverToBoxAdapter();
|
return const SliverToBoxAdapter();
|
||||||
|
|||||||
@ -102,12 +102,6 @@ class _StyleSettingState extends State<StyleSetting> {
|
|||||||
defaultVal: true,
|
defaultVal: true,
|
||||||
needReboot: true,
|
needReboot: true,
|
||||||
),
|
),
|
||||||
const SetSwitchItem(
|
|
||||||
title: '首页底栏背景渐变',
|
|
||||||
setKey: SettingBoxKey.enableGradientBg,
|
|
||||||
defaultVal: true,
|
|
||||||
needReboot: true,
|
|
||||||
),
|
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
int? result = await showDialog(
|
int? result = await showDialog(
|
||||||
|
|||||||
@ -90,8 +90,6 @@ class VideoDetailController extends GetxController
|
|||||||
late String cacheDecode;
|
late String cacheDecode;
|
||||||
late int cacheAudioQa;
|
late int cacheAudioQa;
|
||||||
|
|
||||||
PersistentBottomSheetController? replyReplyBottomSheetCtr;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@ -142,7 +140,7 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
showReplyReplyPanel() {
|
showReplyReplyPanel() {
|
||||||
replyReplyBottomSheetCtr =
|
PersistentBottomSheetController? ctr =
|
||||||
scaffoldKey.currentState?.showBottomSheet((BuildContext context) {
|
scaffoldKey.currentState?.showBottomSheet((BuildContext context) {
|
||||||
return VideoReplyReplyPanel(
|
return VideoReplyReplyPanel(
|
||||||
oid: oid.value,
|
oid: oid.value,
|
||||||
@ -155,7 +153,7 @@ class VideoDetailController extends GetxController
|
|||||||
source: 'videoDetail',
|
source: 'videoDetail',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
replyReplyBottomSheetCtr?.closed.then((value) {
|
ctr?.closed.then((value) {
|
||||||
fRpid = 0;
|
fRpid = 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -231,11 +229,9 @@ class VideoDetailController extends GetxController
|
|||||||
seekTo: seekToTime ?? defaultST,
|
seekTo: seekToTime ?? defaultST,
|
||||||
duration: duration ?? Duration(milliseconds: data.timeLength ?? 0),
|
duration: duration ?? Duration(milliseconds: data.timeLength ?? 0),
|
||||||
// 宽>高 水平 否则 垂直
|
// 宽>高 水平 否则 垂直
|
||||||
direction: firstVideo.width != null && firstVideo.height != null
|
direction: (firstVideo.width! - firstVideo.height!) > 0
|
||||||
? ((firstVideo.width! - firstVideo.height!) > 0
|
|
||||||
? 'horizontal'
|
? 'horizontal'
|
||||||
: 'vertical')
|
: 'vertical',
|
||||||
: null,
|
|
||||||
bvid: bvid,
|
bvid: bvid,
|
||||||
cid: cid.value,
|
cid: cid.value,
|
||||||
enableHeart: enableHeart,
|
enableHeart: enableHeart,
|
||||||
@ -252,21 +248,6 @@ class VideoDetailController extends GetxController
|
|||||||
var result = await VideoHttp.videoUrl(cid: cid.value, bvid: bvid);
|
var result = await VideoHttp.videoUrl(cid: cid.value, bvid: bvid);
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
data = result['data'];
|
data = result['data'];
|
||||||
if (data.acceptDesc!.isNotEmpty && data.acceptDesc!.contains('试看')) {
|
|
||||||
SmartDialog.showToast(
|
|
||||||
'该视频为专属视频,仅提供试看',
|
|
||||||
displayTime: const Duration(seconds: 3),
|
|
||||||
);
|
|
||||||
videoUrl = data.durl!.first.url!;
|
|
||||||
audioUrl = '';
|
|
||||||
defaultST = Duration.zero;
|
|
||||||
firstVideo = VideoItem();
|
|
||||||
if (autoPlay.value) {
|
|
||||||
await playerInit();
|
|
||||||
isShowCover.value = false;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
final List<VideoItem> allVideosList = data.dash!.video!;
|
final List<VideoItem> allVideosList = data.dash!.video!;
|
||||||
try {
|
try {
|
||||||
// 当前可播放的最高质量视频
|
// 当前可播放的最高质量视频
|
||||||
@ -374,11 +355,4 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mob端全屏状态关闭二级回复
|
|
||||||
hiddenReplyReplyPanel() {
|
|
||||||
replyReplyBottomSheetCtr != null
|
|
||||||
? replyReplyBottomSheetCtr!.close()
|
|
||||||
: print('replyReplyBottomSheetCtr is null');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -305,9 +305,11 @@ class VideoIntroController extends GetxController {
|
|||||||
delIds: favStatus == 1 ? '$defaultFolderId' : '',
|
delIds: favStatus == 1 ? '$defaultFolderId' : '',
|
||||||
);
|
);
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
|
if (result['data']['prompt']) {
|
||||||
// 重新获取收藏状态
|
// 重新获取收藏状态
|
||||||
await queryHasFavVideo();
|
await queryHasFavVideo();
|
||||||
SmartDialog.showToast('✅ 操作成功');
|
SmartDialog.showToast('✅ 操作成功');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SmartDialog.showToast(result['msg']);
|
SmartDialog.showToast(result['msg']);
|
||||||
}
|
}
|
||||||
@ -332,12 +334,14 @@ class VideoIntroController extends GetxController {
|
|||||||
delIds: delMediaIdsNew.join(','));
|
delIds: delMediaIdsNew.join(','));
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
if (result['status']) {
|
if (result['status']) {
|
||||||
|
if (result['data']['prompt']) {
|
||||||
addMediaIdsNew = [];
|
addMediaIdsNew = [];
|
||||||
delMediaIdsNew = [];
|
delMediaIdsNew = [];
|
||||||
Get.back();
|
Get.back();
|
||||||
// 重新获取收藏状态
|
// 重新获取收藏状态
|
||||||
await queryHasFavVideo();
|
await queryHasFavVideo();
|
||||||
SmartDialog.showToast('✅ 操作成功');
|
SmartDialog.showToast('✅ 操作成功');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
SmartDialog.showToast(result['msg']);
|
SmartDialog.showToast(result['msg']);
|
||||||
}
|
}
|
||||||
@ -478,7 +482,7 @@ class VideoIntroController extends GetxController {
|
|||||||
final ReleatedController releatedCtr =
|
final ReleatedController releatedCtr =
|
||||||
Get.find<ReleatedController>(tag: heroTag);
|
Get.find<ReleatedController>(tag: heroTag);
|
||||||
videoDetailCtr.bvid = bvid;
|
videoDetailCtr.bvid = bvid;
|
||||||
videoDetailCtr.oid.value = aid ?? IdUtils.bv2av(bvid);
|
videoDetailCtr.oid.value = aid;
|
||||||
videoDetailCtr.cid.value = cid;
|
videoDetailCtr.cid.value = cid;
|
||||||
videoDetailCtr.danmakuCid.value = cid;
|
videoDetailCtr.danmakuCid.value = cid;
|
||||||
videoDetailCtr.queryVideoUrl();
|
videoDetailCtr.queryVideoUrl();
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import 'package:pilipala/pages/preview/index.dart';
|
|||||||
import 'package:pilipala/pages/video/detail/index.dart';
|
import 'package:pilipala/pages/video/detail/index.dart';
|
||||||
import 'package:pilipala/pages/video/detail/reply_new/index.dart';
|
import 'package:pilipala/pages/video/detail/reply_new/index.dart';
|
||||||
import 'package:pilipala/utils/feed_back.dart';
|
import 'package:pilipala/utils/feed_back.dart';
|
||||||
import 'package:pilipala/utils/id_utils.dart';
|
|
||||||
import 'package:pilipala/utils/storage.dart';
|
import 'package:pilipala/utils/storage.dart';
|
||||||
import 'package:pilipala/utils/url_utils.dart';
|
import 'package:pilipala/utils/url_utils.dart';
|
||||||
import 'package:pilipala/utils/utils.dart';
|
import 'package:pilipala/utils/utils.dart';
|
||||||
@ -621,13 +620,6 @@ InlineSpan buildContent(
|
|||||||
..onTap = () async {
|
..onTap = () async {
|
||||||
final String title = content.jumpUrl[matchStr]['title'];
|
final String title = content.jumpUrl[matchStr]['title'];
|
||||||
if (appUrlSchema == '') {
|
if (appUrlSchema == '') {
|
||||||
if (matchStr.startsWith('BV')) {
|
|
||||||
UrlUtils.matchUrlPush(
|
|
||||||
matchStr,
|
|
||||||
title,
|
|
||||||
'',
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
final String redirectUrl =
|
final String redirectUrl =
|
||||||
await UrlUtils.parseRedirectUrl(matchStr);
|
await UrlUtils.parseRedirectUrl(matchStr);
|
||||||
final String pathSegment = Uri.parse(redirectUrl).path;
|
final String pathSegment = Uri.parse(redirectUrl).path;
|
||||||
@ -649,7 +641,6 @@ InlineSpan buildContent(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (appUrlSchema.startsWith('bilibili://search')) {
|
if (appUrlSchema.startsWith('bilibili://search')) {
|
||||||
Get.toNamed('/searchResult',
|
Get.toNamed('/searchResult',
|
||||||
|
|||||||
@ -92,7 +92,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
videoSourceInit();
|
videoSourceInit();
|
||||||
appbarStreamListen();
|
appbarStreamListen();
|
||||||
lifecycleListener();
|
lifecycleListener();
|
||||||
fullScreenStatusListener();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取视频资源,初始化播放器
|
// 获取视频资源,初始化播放器
|
||||||
@ -189,14 +188,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fullScreenStatusListener() {
|
|
||||||
plPlayerController?.isFullScreen.listen((bool isFullScreen) {
|
|
||||||
if (isFullScreen) {
|
|
||||||
videoDetailController.hiddenReplyReplyPanel();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
shutdownTimerService.handleWaitingFinished();
|
shutdownTimerService.handleWaitingFinished();
|
||||||
@ -234,10 +225,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
@override
|
@override
|
||||||
// 返回当前页面时
|
// 返回当前页面时
|
||||||
void didPopNext() async {
|
void didPopNext() async {
|
||||||
if (plPlayerController != null &&
|
|
||||||
plPlayerController!.videoPlayerController != null) {
|
|
||||||
setState(() => isShowing = true);
|
setState(() => isShowing = true);
|
||||||
}
|
|
||||||
videoDetailController.isFirstTime = false;
|
videoDetailController.isFirstTime = false;
|
||||||
final bool autoplay = autoPlayEnable;
|
final bool autoplay = autoPlayEnable;
|
||||||
videoDetailController.playerInit(autoplay: autoplay);
|
videoDetailController.playerInit(autoplay: autoplay);
|
||||||
|
|||||||
@ -135,8 +135,7 @@ class SettingBoxKey {
|
|||||||
hideSearchBar = 'hideSearchBar', // 收起顶栏
|
hideSearchBar = 'hideSearchBar', // 收起顶栏
|
||||||
hideTabBar = 'hideTabBar', // 收起底栏
|
hideTabBar = 'hideTabBar', // 收起底栏
|
||||||
tabbarSort = 'tabbarSort', // 首页tabbar
|
tabbarSort = 'tabbarSort', // 首页tabbar
|
||||||
dynamicBadgeMode = 'dynamicBadgeMode',
|
dynamicBadgeMode = 'dynamicBadgeMode';
|
||||||
enableGradientBg = 'enableGradientBg';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class LocalCacheKey {
|
class LocalCacheKey {
|
||||||
|
|||||||
Reference in New Issue
Block a user