mod: 搜索页面完善

This commit is contained in:
guozhigq
2023-06-22 12:12:59 +08:00
parent 6c531ce5d3
commit bd6ff61c5f
6 changed files with 82 additions and 29 deletions

View File

@ -60,7 +60,8 @@ class SearchVideoItemModel {
// String? review;
int? pubdate;
int? senddate;
String? duration;
int? duration;
// String? duration;
// String? viewType;
// String? like;
// String? upic;
@ -81,12 +82,26 @@ class SearchVideoItemModel {
videoReview = json['video_review'];
pubdate = json['pubdate'];
senddate = json['senddate'];
duration = json['duration'];
duration = test(json['duration']);
// duration = json['duration'];
owner = Owner.fromJson(json);
stat = Stat.fromJson(json);
}
}
test(String duration) {
List timeList = duration.split(':');
int len = timeList.length;
if (len == 2) {
return int.parse(timeList[0]) * 60 + int.parse(timeList[1]);
}
if (len == 3) {
return int.parse(timeList[0]) * 3600 +
int.parse(timeList[1]) * 60 +
timeList[2];
}
}
class Stat {
Stat({
this.view,