mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-20 00:56:31 +08:00
@@ -41,17 +41,17 @@ class VideoCardV extends StatelessWidget {
|
|||||||
break;
|
break;
|
||||||
case 'av':
|
case 'av':
|
||||||
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid!);
|
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid!);
|
||||||
int? cid = videoItem.cid;
|
int? cid = videoItem.cid ??
|
||||||
if (cid == null || cid == 0 || cid == -1) {
|
await SearchHttp.ab2c(aid: videoItem.aid, bvid: bvid);
|
||||||
cid = await SearchHttp.ab2c(aid: videoItem.aid, bvid: bvid);
|
if (cid != null) {
|
||||||
|
PageUtils.toVideoPage(
|
||||||
|
'bvid=$bvid&cid=$cid',
|
||||||
|
arguments: {
|
||||||
|
'pic': videoItem.cover,
|
||||||
|
'heroTag': heroTag,
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
PageUtils.toVideoPage(
|
|
||||||
'bvid=$bvid&cid=$cid',
|
|
||||||
arguments: {
|
|
||||||
'pic': videoItem.cover,
|
|
||||||
'heroTag': heroTag,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
// 动态
|
// 动态
|
||||||
case 'picture':
|
case 'picture':
|
||||||
|
|||||||
@@ -4,17 +4,16 @@ import 'package:PiliPlus/utils/id_utils.dart';
|
|||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
|
|
||||||
class RecVideoItemAppModel extends BaseRecVideoItemModel {
|
class RecVideoItemAppModel extends BaseRecVideoItemModel {
|
||||||
int? id;
|
int? get id => aid;
|
||||||
String? talkBack;
|
String? talkBack;
|
||||||
|
|
||||||
String? cardType;
|
String? cardType;
|
||||||
ThreePoint? threePoint;
|
ThreePoint? threePoint;
|
||||||
|
|
||||||
RecVideoItemAppModel.fromJson(Map<String, dynamic> json) {
|
RecVideoItemAppModel.fromJson(Map<String, dynamic> json) {
|
||||||
id = json['player_args']?['aid'] ?? int.tryParse(json['param'] ?? '0');
|
aid = json['player_args']?['aid'] ?? int.tryParse(json['param'] ?? '0');
|
||||||
aid = id;
|
|
||||||
bvid = json['bvid'] ?? IdUtils.av2bv(id!);
|
bvid = json['bvid'] ?? IdUtils.av2bv(id!);
|
||||||
cid = json['player_args']?['cid'] ?? 0;
|
cid = json['player_args']?['cid'];
|
||||||
cover = json['cover'];
|
cover = json['cover'];
|
||||||
stat = RcmdStat.fromJson(json);
|
stat = RcmdStat.fromJson(json);
|
||||||
// 改用player_args中的duration作为原始数据(秒数)
|
// 改用player_args中的duration作为原始数据(秒数)
|
||||||
|
|||||||
@@ -43,13 +43,15 @@ class VideoCardVMemberHome extends StatelessWidget {
|
|||||||
|
|
||||||
bvid ??= IdUtils.av2bv(int.parse(aid!));
|
bvid ??= IdUtils.av2bv(int.parse(aid!));
|
||||||
int? cid = videoItem.cid ?? await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
int? cid = videoItem.cid ?? await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||||
PageUtils.toVideoPage(
|
if (cid != null) {
|
||||||
'bvid=$bvid&cid=$cid',
|
PageUtils.toVideoPage(
|
||||||
arguments: {
|
'bvid=$bvid&cid=$cid',
|
||||||
'pic': videoItem.cover,
|
arguments: {
|
||||||
'heroTag': heroTag,
|
'pic': videoItem.cover,
|
||||||
},
|
'heroTag': heroTag,
|
||||||
);
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user