fix: 首页推荐数据格式异常

This commit is contained in:
guozhigq
2024-07-23 23:25:06 +08:00
parent 5a9118271a
commit 7ae5373831
12 changed files with 45 additions and 459 deletions

View File

@ -1,14 +1,8 @@
import 'package:hive/hive.dart';
part 'hot.g.dart';
@HiveType(typeId: 6)
class HotSearchModel {
HotSearchModel({
this.list,
});
@HiveField(0)
List<HotSearchItem>? list;
HotSearchModel.fromJson(Map<String, dynamic> json) {
@ -18,7 +12,6 @@ class HotSearchModel {
}
}
@HiveType(typeId: 7)
class HotSearchItem {
HotSearchItem({
this.keyword,
@ -27,14 +20,10 @@ class HotSearchItem {
this.icon,
});
@HiveField(0)
String? keyword;
@HiveField(1)
String? showName;
// 4/5热 11话题 8普通 7直播
@HiveField(2)
int? wordType;
@HiveField(3)
String? icon;
HotSearchItem.fromJson(Map<String, dynamic> json) {