mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 合集切换推荐视频未刷新
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pilipala/http/video.dart';
|
||||
import '../../../../models/model_hot_video_item.dart';
|
||||
|
||||
class ReleatedController extends GetxController {
|
||||
// 视频aid
|
||||
String bvid = Get.parameters['bvid'] ?? "";
|
||||
// 推荐视频列表
|
||||
List relatedVideoList = [];
|
||||
RxList relatedVideoList = <HotVideoItemModel>[].obs;
|
||||
|
||||
OverlayEntry? popupDialog;
|
||||
|
||||
Future<dynamic> queryRelatedVideo() => VideoHttp.relatedVideoList(bvid: bvid);
|
||||
Future<dynamic> queryRelatedVideo() async {
|
||||
return VideoHttp.relatedVideoList(bvid: bvid).then((value) {
|
||||
if (value['status']) {
|
||||
relatedVideoList.value = value['data'];
|
||||
}
|
||||
return value;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user