fix: 历史记录专栏跳转失败

This commit is contained in:
orz12
2024-09-09 08:19:03 +08:00
committed by bggRGjQaUbCoE
parent d250258528
commit 2b8372ccc3

View File

@@ -1,3 +1,4 @@
import 'package:PiliPalaX/utils/app_scheme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -42,17 +43,19 @@ class HistoryItem extends StatelessWidget {
return; return;
} }
if (videoItem.history.business.contains('article')) { if (videoItem.history.business.contains('article')) {
int cid = videoItem.history.cid ?? // int cid = videoItem.history.cid ??
// videoItem.history.oid ?? // // videoItem.history.oid ??
await SearchHttp.ab2c(aid: aid, bvid: bvid); // await SearchHttp.ab2c(aid: aid, bvid: bvid);
Get.toNamed( // Get.toNamed(
'/webviewnew', // '/webviewnew',
parameters: { // parameters: {
'url': 'https://www.bilibili.com/read/cv$cid', // 'url': 'https://www.bilibili.com/read/cv$cid',
'type': 'note', // 'type': 'note',
'pageTitle': videoItem.title // 'pageTitle': videoItem.title
}, // },
); // );
PiliScheme.routePush(Uri.parse(
"https://www.bilibili.com/read/cv${videoItem.history.oid}"));
} else if (videoItem.history.business == 'live') { } else if (videoItem.history.business == 'live') {
if (videoItem.liveStatus == 1) { if (videoItem.liveStatus == 1) {
LiveItemModel liveItem = LiveItemModel.fromJson({ LiveItemModel liveItem = LiveItemModel.fromJson({