mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/user/fav_folder.dart';
|
||||
import 'package:PiliPlus/models/video/ai.dart';
|
||||
import 'package:PiliPlus/models/video_detail_res.dart';
|
||||
import 'package:PiliPlus/models/video_tag/data.dart';
|
||||
import 'package:PiliPlus/pages/dynamics_repost/view.dart';
|
||||
import 'package:PiliPlus/pages/video/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/pay_coins/view.dart';
|
||||
@@ -50,7 +51,7 @@ class VideoIntroController extends GetxController {
|
||||
// up主粉丝数
|
||||
RxMap<String, dynamic> userStat = RxMap<String, dynamic>({'follower': '-'});
|
||||
|
||||
dynamic videoTags;
|
||||
List<VideoTagItem>? videoTags;
|
||||
|
||||
// 是否点赞
|
||||
RxBool hasLike = false.obs;
|
||||
@@ -187,6 +188,7 @@ class VideoIntroController extends GetxController {
|
||||
}
|
||||
|
||||
Future<void> queryVideoTags() async {
|
||||
videoTags = null;
|
||||
var result = await UserHttp.videoTags(bvid: bvid);
|
||||
if (result['status']) {
|
||||
videoTags = result['data'];
|
||||
|
||||
@@ -697,8 +697,8 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
),
|
||||
),
|
||||
],
|
||||
if (videoIntroController.videoTags is List &&
|
||||
videoIntroController.videoTags.isNotEmpty) ...[
|
||||
if (videoIntroController.videoTags?.isNotEmpty ==
|
||||
true) ...[
|
||||
GestureDetector(
|
||||
onTap: () {},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@@ -708,20 +708,17 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: (videoIntroController.videoTags
|
||||
as List)
|
||||
children: videoIntroController.videoTags!
|
||||
.map(
|
||||
(item) => SearchText(
|
||||
fontSize: 13,
|
||||
text: item['tag_name'],
|
||||
onTap: (_) => Get.toNamed(
|
||||
text: item.tagName!,
|
||||
onTap: (tagName) => Get.toNamed(
|
||||
'/searchResult',
|
||||
parameters: {
|
||||
'keyword': item['tag_name']
|
||||
},
|
||||
parameters: {'keyword': tagName},
|
||||
),
|
||||
onLongPress: (_) =>
|
||||
Utils.copyText(item['tag_name']),
|
||||
onLongPress: (tagName) =>
|
||||
Utils.copyText(tagName),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
|
||||
Reference in New Issue
Block a user