Merge branch 'fix-replyReqError'
This commit is contained in:
@ -478,7 +478,7 @@ class VideoIntroController extends GetxController {
|
||||
/// 未渲染回复组件时可能异常
|
||||
final VideoReplyController videoReplyCtr =
|
||||
Get.find<VideoReplyController>(tag: heroTag);
|
||||
videoReplyCtr.aid = aid;
|
||||
videoReplyCtr.oid = bvid;
|
||||
videoReplyCtr.queryReplyList(type: 'init');
|
||||
} catch (_) {}
|
||||
this.bvid = bvid;
|
||||
|
@ -11,13 +11,13 @@ import 'package:pilipala/utils/storage.dart';
|
||||
|
||||
class VideoReplyController extends GetxController {
|
||||
VideoReplyController(
|
||||
this.aid,
|
||||
this.oid,
|
||||
this.rpid,
|
||||
this.replyLevel,
|
||||
);
|
||||
final ScrollController scrollController = ScrollController();
|
||||
// 视频aid 请求时使用的oid
|
||||
int? aid;
|
||||
String? oid;
|
||||
// 层级 2为楼中楼
|
||||
String? replyLevel;
|
||||
// rpid 请求楼中楼回复
|
||||
@ -57,7 +57,7 @@ class VideoReplyController extends GetxController {
|
||||
return;
|
||||
}
|
||||
final res = await ReplyHttp.replyList(
|
||||
oid: aid!,
|
||||
oid: oid!,
|
||||
pageNum: currentPage + 1,
|
||||
ps: ps,
|
||||
type: ReplyType.video.index,
|
||||
|
@ -40,6 +40,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
bool _isFabVisible = true;
|
||||
String replyLevel = '1';
|
||||
late String heroTag;
|
||||
late String oid;
|
||||
|
||||
// 添加页面缓存
|
||||
@override
|
||||
@ -48,7 +49,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
int oid = widget.bvid != null ? IdUtils.bv2av(widget.bvid!) : 0;
|
||||
oid = widget.bvid != null ? widget.bvid! : '0';
|
||||
heroTag = Get.arguments['heroTag'];
|
||||
replyLevel = widget.replyLevel ?? '1';
|
||||
if (replyLevel == '2') {
|
||||
@ -297,8 +298,8 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
isScrollControlled: true,
|
||||
builder: (BuildContext context) {
|
||||
return VideoReplyNewDialog(
|
||||
oid: _videoReplyController.aid ??
|
||||
IdUtils.bv2av(Get.parameters['bvid']!),
|
||||
oid:
|
||||
_videoReplyController.oid ?? Get.parameters['bvid'],
|
||||
root: 0,
|
||||
parent: 0,
|
||||
replyType: ReplyType.video,
|
||||
|
@ -353,7 +353,7 @@ class ReplyItem extends StatelessWidget {
|
||||
isScrollControlled: true,
|
||||
builder: (builder) {
|
||||
return VideoReplyNewDialog(
|
||||
oid: replyItem!.oid,
|
||||
oid: IdUtils.av2bv(replyItem!.oid!),
|
||||
root: replyItem!.rpid,
|
||||
parent: replyItem!.rpid,
|
||||
replyType: replyType,
|
||||
|
@ -8,7 +8,7 @@ import 'package:pilipala/models/video/reply/item.dart';
|
||||
import 'package:pilipala/utils/feed_back.dart';
|
||||
|
||||
class VideoReplyNewDialog extends StatefulWidget {
|
||||
final int? oid;
|
||||
final String? oid;
|
||||
final int? root;
|
||||
final int? parent;
|
||||
final ReplyType? replyType;
|
||||
|
Reference in New Issue
Block a user