mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: report video
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -876,12 +876,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
SmartDialog.showToast(
|
||||
'账号未登录');
|
||||
} else {
|
||||
Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(videoDetailController.bvid)}&bvid=${videoDetailController.bvid}'
|
||||
});
|
||||
Utils.reportVideo(
|
||||
videoDetailController
|
||||
.oid.value);
|
||||
}
|
||||
break;
|
||||
case 'note':
|
||||
@@ -1466,10 +1463,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
if (!Accounts.main.isLogin) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
} else {
|
||||
Get.toNamed('/webview', parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(videoDetailController.bvid)}&bvid=${videoDetailController.bvid}'
|
||||
});
|
||||
Utils.reportVideo(
|
||||
videoDetailController.oid.value);
|
||||
}
|
||||
break;
|
||||
case 'note':
|
||||
|
||||
@@ -11,7 +11,6 @@ import 'package:PiliPlus/pages/setting/widgets/switch_item.dart';
|
||||
import 'package:PiliPlus/pages/video/detail/introduction/widgets/action_item.dart';
|
||||
import 'package:PiliPlus/utils/download.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/id_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:canvas_danmaku/canvas_danmaku.dart';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
@@ -575,10 +574,7 @@ class HeaderControlState extends State<HeaderControl> {
|
||||
return;
|
||||
}
|
||||
Get.back();
|
||||
Get.toNamed('/webview', parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(videoDetailCtr.bvid)}&bvid=${videoDetailCtr.bvid}'
|
||||
});
|
||||
Utils.reportVideo(videoDetailCtr.oid.value);
|
||||
},
|
||||
leading: const Icon(Icons.error_outline, size: 20),
|
||||
title: const Text('举报', style: titleStyle),
|
||||
|
||||
@@ -62,6 +62,16 @@ class Utils {
|
||||
|
||||
static final _numRegExp = RegExp(r'([\d\.]+)([千万亿])?');
|
||||
|
||||
static void reportVideo(int aid) {
|
||||
Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'uaType': 'android',
|
||||
'url': 'https://www.bilibili.com/appeal/?avid=$aid'
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// 定时关闭
|
||||
static void scheduleExit(context, isFullScreen, [bool isLive = false]) {
|
||||
const List<int> scheduleTimeChoices = [0, 15, 30, 45, 60];
|
||||
|
||||
Reference in New Issue
Block a user