@ -51,7 +51,7 @@ class VideoHttp {
|
|||||||
(i['owner'] != null &&
|
(i['owner'] != null &&
|
||||||
!blackMidsList.contains(i['owner']['mid']))) {
|
!blackMidsList.contains(i['owner']['mid']))) {
|
||||||
RecVideoItemModel videoItem = RecVideoItemModel.fromJson(i);
|
RecVideoItemModel videoItem = RecVideoItemModel.fromJson(i);
|
||||||
if (!RecommendFilter.filter(videoItem)){
|
if (!RecommendFilter.filter(videoItem)) {
|
||||||
list.add(videoItem);
|
list.add(videoItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ class VideoHttp {
|
|||||||
(i['args'] != null &&
|
(i['args'] != null &&
|
||||||
!blackMidsList.contains(i['args']['up_mid']))) {
|
!blackMidsList.contains(i['args']['up_mid']))) {
|
||||||
RecVideoItemAppModel videoItem = RecVideoItemAppModel.fromJson(i);
|
RecVideoItemAppModel videoItem = RecVideoItemAppModel.fromJson(i);
|
||||||
if (!RecommendFilter.filter(videoItem)){
|
if (!RecommendFilter.filter(videoItem)) {
|
||||||
list.add(videoItem);
|
list.add(videoItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ class VideoHttp {
|
|||||||
List<HotVideoItemModel> list = [];
|
List<HotVideoItemModel> list = [];
|
||||||
for (var i in res.data['data']) {
|
for (var i in res.data['data']) {
|
||||||
HotVideoItemModel videoItem = HotVideoItemModel.fromJson(i);
|
HotVideoItemModel videoItem = HotVideoItemModel.fromJson(i);
|
||||||
if (!RecommendFilter.filter(videoItem, relatedVideos: true)){
|
if (!RecommendFilter.filter(videoItem, relatedVideos: true)) {
|
||||||
list.add(videoItem);
|
list.add(videoItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ class VideoHttp {
|
|||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
return {'status': true, 'data': res.data['data']};
|
return {'status': true, 'data': res.data['data']};
|
||||||
} else {
|
} else {
|
||||||
return {'status': false, 'data': []};
|
return {'status': false, 'data': [], 'msg': res.data['message']};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -130,7 +130,9 @@ class VideoContent extends StatelessWidget {
|
|||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(10, 2, 6, 0),
|
padding: const EdgeInsets.fromLTRB(10, 2, 6, 0),
|
||||||
child: Column(
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -147,7 +149,8 @@ class VideoContent extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
videoItem.intro,
|
videoItem.intro,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
|
fontSize:
|
||||||
|
Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(context).colorScheme.outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -156,29 +159,39 @@ class VideoContent extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
Utils.dateFormat(videoItem.favTime),
|
Utils.dateFormat(videoItem.favTime),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 11, color: Theme.of(context).colorScheme.outline),
|
fontSize: 11,
|
||||||
|
color: Theme.of(context).colorScheme.outline),
|
||||||
),
|
),
|
||||||
if (videoItem.owner.name != '') ...[
|
if (videoItem.owner.name != '') ...[
|
||||||
Text(
|
Text(
|
||||||
videoItem.owner.name,
|
videoItem.owner.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
|
fontSize:
|
||||||
|
Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||||
color: Theme.of(context).colorScheme.outline,
|
color: Theme.of(context).colorScheme.outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
Row(
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 2),
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
StatView(
|
StatView(
|
||||||
theme: 'gray',
|
theme: 'gray',
|
||||||
view: videoItem.cntInfo['play'],
|
view: videoItem.cntInfo['play'],
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
StatDanMu(theme: 'gray', danmu: videoItem.cntInfo['danmaku']),
|
StatDanMu(
|
||||||
|
theme: 'gray', danmu: videoItem.cntInfo['danmaku']),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
SizedBox(
|
],
|
||||||
width: 26,
|
),
|
||||||
height: 26,
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 0,
|
||||||
|
bottom: -4,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
padding: MaterialStateProperty.all(EdgeInsets.zero),
|
padding: MaterialStateProperty.all(EdgeInsets.zero),
|
||||||
@ -196,9 +209,8 @@ class VideoContent extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
'取消',
|
'取消',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.outline),
|
||||||
.outline),
|
|
||||||
)),
|
)),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
@ -221,8 +233,6 @@ class VideoContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -298,7 +298,6 @@ class VideoIntroController extends GetxController {
|
|||||||
await queryVideoInFolder();
|
await queryVideoInFolder();
|
||||||
int defaultFolderId = favFolderData.value.list!.first.id!;
|
int defaultFolderId = favFolderData.value.list!.first.id!;
|
||||||
int favStatus = favFolderData.value.list!.first.favState!;
|
int favStatus = favFolderData.value.list!.first.favState!;
|
||||||
print('favStatus: $favStatus');
|
|
||||||
var result = await VideoHttp.favVideo(
|
var result = await VideoHttp.favVideo(
|
||||||
aid: IdUtils.bv2av(bvid),
|
aid: IdUtils.bv2av(bvid),
|
||||||
addIds: favStatus == 0 ? '$defaultFolderId' : '',
|
addIds: favStatus == 0 ? '$defaultFolderId' : '',
|
||||||
@ -310,6 +309,8 @@ class VideoIntroController extends GetxController {
|
|||||||
await queryHasFavVideo();
|
await queryHasFavVideo();
|
||||||
SmartDialog.showToast('✅ 操作成功');
|
SmartDialog.showToast('✅ 操作成功');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SmartDialog.showToast(result['msg']);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -340,6 +341,8 @@ class VideoIntroController extends GetxController {
|
|||||||
await queryHasFavVideo();
|
await queryHasFavVideo();
|
||||||
SmartDialog.showToast('✅ 操作成功');
|
SmartDialog.showToast('✅ 操作成功');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SmartDialog.showToast(result['msg']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user