mod: 还原aid
This commit is contained in:
@ -4,7 +4,7 @@ import 'init.dart';
|
||||
|
||||
class ReplyHttp {
|
||||
static Future replyList({
|
||||
required dynamic oid,
|
||||
required int oid,
|
||||
required int pageNum,
|
||||
required int type,
|
||||
int? ps,
|
||||
@ -76,7 +76,7 @@ class ReplyHttp {
|
||||
// 评论点赞
|
||||
static Future likeReply({
|
||||
required int type,
|
||||
required dynamic oid,
|
||||
required int oid,
|
||||
required int rpid,
|
||||
required int action,
|
||||
}) async {
|
||||
|
@ -331,7 +331,7 @@ class VideoHttp {
|
||||
// plat num 发送平台标识 非必要 1:web端 2:安卓客户端 3:ios客户端 4:wp客户端
|
||||
static Future replyAdd({
|
||||
required ReplyType type,
|
||||
required dynamic oid,
|
||||
required int oid,
|
||||
required String message,
|
||||
int? root,
|
||||
int? parent,
|
||||
|
@ -266,7 +266,7 @@ class BangumiIntroController extends GetxController {
|
||||
/// 未渲染回复组件时可能异常
|
||||
VideoReplyController videoReplyCtr =
|
||||
Get.find<VideoReplyController>(tag: Get.arguments['heroTag']);
|
||||
videoReplyCtr.oid = bvid;
|
||||
videoReplyCtr.aid = aid;
|
||||
videoReplyCtr.queryReplyList(type: 'init');
|
||||
} catch (_) {}
|
||||
}
|
||||
|
@ -385,8 +385,8 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
isScrollControlled: true,
|
||||
builder: (BuildContext context) {
|
||||
return VideoReplyNewDialog(
|
||||
oid: _dynamicDetailController.oid?.toString() ??
|
||||
Get.parameters['bvid'],
|
||||
oid: _dynamicDetailController.oid ??
|
||||
IdUtils.bv2av(Get.parameters['bvid']!),
|
||||
root: 0,
|
||||
parent: 0,
|
||||
replyType: ReplyType.values[replyType],
|
||||
|
@ -13,7 +13,6 @@ import 'package:pilipala/pages/video/detail/reply/widgets/reply_item.dart';
|
||||
import 'package:pilipala/pages/video/detail/reply_new/index.dart';
|
||||
import 'package:pilipala/pages/video/detail/reply_reply/index.dart';
|
||||
import 'package:pilipala/utils/feed_back.dart';
|
||||
import 'package:pilipala/utils/id_utils.dart';
|
||||
|
||||
import 'controller.dart';
|
||||
|
||||
@ -428,7 +427,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
|
||||
isScrollControlled: true,
|
||||
builder: (BuildContext context) {
|
||||
return VideoReplyNewDialog(
|
||||
oid: IdUtils.av2bv(_htmlRenderCtr.oid.value),
|
||||
oid: _htmlRenderCtr.oid.value,
|
||||
root: 0,
|
||||
parent: 0,
|
||||
replyType: ReplyType.values[type],
|
||||
|
@ -478,7 +478,7 @@ class VideoIntroController extends GetxController {
|
||||
/// 未渲染回复组件时可能异常
|
||||
final VideoReplyController videoReplyCtr =
|
||||
Get.find<VideoReplyController>(tag: heroTag);
|
||||
videoReplyCtr.oid = bvid;
|
||||
videoReplyCtr.aid = aid;
|
||||
videoReplyCtr.queryReplyList(type: 'init');
|
||||
} catch (_) {}
|
||||
this.bvid = bvid;
|
||||
|
@ -11,13 +11,13 @@ import 'package:pilipala/utils/storage.dart';
|
||||
|
||||
class VideoReplyController extends GetxController {
|
||||
VideoReplyController(
|
||||
this.oid,
|
||||
this.aid,
|
||||
this.rpid,
|
||||
this.replyLevel,
|
||||
);
|
||||
final ScrollController scrollController = ScrollController();
|
||||
// 视频aid 请求时使用的oid
|
||||
String? oid;
|
||||
int? aid;
|
||||
// 层级 2为楼中楼
|
||||
String? replyLevel;
|
||||
// rpid 请求楼中楼回复
|
||||
@ -57,7 +57,7 @@ class VideoReplyController extends GetxController {
|
||||
return;
|
||||
}
|
||||
final res = await ReplyHttp.replyList(
|
||||
oid: oid!,
|
||||
oid: aid!,
|
||||
pageNum: currentPage + 1,
|
||||
ps: ps,
|
||||
type: ReplyType.video.index,
|
||||
|
@ -40,7 +40,6 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
bool _isFabVisible = true;
|
||||
String replyLevel = '1';
|
||||
late String heroTag;
|
||||
late String oid;
|
||||
|
||||
// 添加页面缓存
|
||||
@override
|
||||
@ -49,7 +48,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
oid = widget.bvid != null ? widget.bvid! : '0';
|
||||
int oid = widget.bvid != null ? IdUtils.bv2av(widget.bvid!) : 0;
|
||||
heroTag = Get.arguments['heroTag'];
|
||||
replyLevel = widget.replyLevel ?? '1';
|
||||
if (replyLevel == '2') {
|
||||
@ -298,8 +297,8 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
isScrollControlled: true,
|
||||
builder: (BuildContext context) {
|
||||
return VideoReplyNewDialog(
|
||||
oid:
|
||||
_videoReplyController.oid ?? Get.parameters['bvid'],
|
||||
oid: _videoReplyController.aid ??
|
||||
IdUtils.bv2av(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: IdUtils.av2bv(replyItem!.oid!),
|
||||
oid: 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 String? oid;
|
||||
final int? oid;
|
||||
final int? root;
|
||||
final int? parent;
|
||||
final ReplyType? replyType;
|
||||
|
Reference in New Issue
Block a user