Merge branch 'fix'
This commit is contained in:
@ -163,4 +163,20 @@ class SearchHttp {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future<Map<String, dynamic>> ab2cWithPic(
|
||||||
|
{int? aid, String? bvid}) async {
|
||||||
|
Map<String, dynamic> data = {};
|
||||||
|
if (aid != null) {
|
||||||
|
data['aid'] = aid;
|
||||||
|
} else if (bvid != null) {
|
||||||
|
data['bvid'] = bvid;
|
||||||
|
}
|
||||||
|
final dynamic res =
|
||||||
|
await Request().get(Api.ab2c, data: <String, dynamic>{...data});
|
||||||
|
return {
|
||||||
|
'cid': res.data['data'].first['cid'],
|
||||||
|
'pic': res.data['data'].first['first_frame'],
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -547,7 +547,7 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateCover(String? pic) {
|
void updateCover(String? pic) {
|
||||||
if (pic != null && pic != '') {
|
if (pic != null) {
|
||||||
cover.value = videoItem['pic'] = pic;
|
cover.value = videoItem['pic'] = pic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
feedBack();
|
feedBack();
|
||||||
if (replyReply != null) {
|
if (replyReply != null) {
|
||||||
replyReply!(replyItem, null);
|
replyReply!(replyItem);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
@ -358,7 +358,7 @@ class ReplyItemRow extends StatelessWidget {
|
|||||||
InkWell(
|
InkWell(
|
||||||
// 一楼点击评论展开评论详情
|
// 一楼点击评论展开评论详情
|
||||||
// onTap: () {
|
// onTap: () {
|
||||||
// replyReply?.call(replyItem, replies![i]);
|
// replyReply?.call(replyItem);
|
||||||
// },
|
// },
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
feedBack();
|
feedBack();
|
||||||
|
|||||||
@ -42,12 +42,14 @@ class UrlUtils {
|
|||||||
final Map matchRes = IdUtils.matchAvorBv(input: pathSegment);
|
final Map matchRes = IdUtils.matchAvorBv(input: pathSegment);
|
||||||
if (matchRes.containsKey('BV')) {
|
if (matchRes.containsKey('BV')) {
|
||||||
final String bv = matchRes['BV'];
|
final String bv = matchRes['BV'];
|
||||||
final int cid = await SearchHttp.ab2c(bvid: bv);
|
final Map res = await SearchHttp.ab2cWithPic(bvid: bv);
|
||||||
|
final int cid = res['cid'];
|
||||||
|
final String pic = res['pic'];
|
||||||
final String heroTag = Utils.makeHeroTag(bv);
|
final String heroTag = Utils.makeHeroTag(bv);
|
||||||
await Get.toNamed(
|
await Get.toNamed(
|
||||||
'/video?bvid=$bv&cid=$cid',
|
'/video?bvid=$bv&cid=$cid',
|
||||||
arguments: <String, String?>{
|
arguments: <String, String?>{
|
||||||
'pic': '',
|
'pic': pic,
|
||||||
'heroTag': heroTag,
|
'heroTag': heroTag,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user