mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 10:06:23 +08:00
opt introctr
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -42,9 +42,6 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class VideoIntroController extends CommonIntroController {
|
||||
// 视频bvid
|
||||
late String bvid;
|
||||
|
||||
// 视频详情 上个页面传入
|
||||
Map videoItem = {};
|
||||
late final RxMap staffRelations = {}.obs;
|
||||
@@ -68,7 +65,7 @@ class VideoIntroController extends CommonIntroController {
|
||||
|
||||
// 同时观看
|
||||
bool isShowOnlineTotal = false;
|
||||
RxString total = '1'.obs;
|
||||
late final RxString total = '1'.obs;
|
||||
Timer? timer;
|
||||
String heroTag = '';
|
||||
AiConclusionResult? aiConclusionResult;
|
||||
@@ -80,8 +77,6 @@ class VideoIntroController extends CommonIntroController {
|
||||
late final showArgueMsg = GStorage.showArgueMsg;
|
||||
late final enableAi =
|
||||
GStorage.setting.get(SettingBoxKey.enableAi, defaultValue: false);
|
||||
late final enableQuickFav =
|
||||
GStorage.setting.get(SettingBoxKey.enableQuickFav, defaultValue: false);
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -90,7 +85,6 @@ class VideoIntroController extends CommonIntroController {
|
||||
if (heroTag.isEmpty) {
|
||||
heroTag = Get.arguments['heroTag'];
|
||||
}
|
||||
bvid = Get.parameters['bvid']!;
|
||||
} catch (_) {}
|
||||
if (Get.arguments.isNotEmpty) {
|
||||
if (Get.arguments.containsKey('videoItem')) {
|
||||
@@ -112,9 +106,10 @@ class VideoIntroController extends CommonIntroController {
|
||||
}
|
||||
videoItem['title'] = str;
|
||||
}
|
||||
videoItem['stat'] = keys.contains('stat') ? args.stat : null;
|
||||
videoItem['pubdate'] = keys.contains('pubdate') ? args.pubdate : null;
|
||||
videoItem['owner'] = keys.contains('owner') ? args.owner : null;
|
||||
videoItem
|
||||
..['stat'] = keys.contains('stat') ? args.stat : null
|
||||
..['pubdate'] = keys.contains('pubdate') ? args.pubdate : null
|
||||
..['owner'] = keys.contains('owner') ? args.owner : null;
|
||||
}
|
||||
}
|
||||
lastPlayCid.value = int.parse(Get.parameters['cid']!);
|
||||
@@ -177,14 +172,6 @@ class VideoIntroController extends CommonIntroController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> queryVideoTags() async {
|
||||
videoTags = null;
|
||||
var result = await UserHttp.videoTags(bvid: bvid);
|
||||
if (result['status']) {
|
||||
videoTags = result['data'];
|
||||
}
|
||||
}
|
||||
|
||||
// 获取up主粉丝数
|
||||
Future<void> queryUserStat() async {
|
||||
if (videoItem['staff']?.isNotEmpty == true) {
|
||||
@@ -895,24 +882,4 @@ class VideoIntroController extends CommonIntroController {
|
||||
SmartDialog.showToast("当前视频可能暂不支持AI视频总结");
|
||||
}
|
||||
}
|
||||
|
||||
// 收藏
|
||||
void showFavBottomSheet(BuildContext context, {type = 'tap'}) {
|
||||
if (!accountService.isLogin.value) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
return;
|
||||
}
|
||||
// 快速收藏 &
|
||||
// 点按 收藏至默认文件夹
|
||||
// 长按选择文件夹
|
||||
if (enableQuickFav) {
|
||||
if (type == 'tap') {
|
||||
actionFavVideo(type: 'default');
|
||||
} else {
|
||||
PageUtils.showFavBottomSheet(context: context, ctr: this);
|
||||
}
|
||||
} else if (type != 'longPress') {
|
||||
PageUtils.showFavBottomSheet(context: context, ctr: this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user