mod: 搜索页面完善
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user