7 changed files with 193 additions and 7 deletions
Split View
Diff Options
-
25lib/controller/home/home_controller.dart
-
87lib/model/home/banner_data.dart
-
3lib/network/api_urls.dart
-
5lib/network/home_api.dart
-
32lib/network/home_api.g.dart
-
3lib/pages/home/event_list.dart
-
45lib/pages/home/recommend_tab.dart
@ -0,0 +1,87 @@ |
|||
class BannerData { |
|||
List<Records>? records; |
|||
int? total; |
|||
int? size; |
|||
int? current; |
|||
int? pages; |
|||
|
|||
BannerData({this.records, this.total, this.size, this.current, this.pages}); |
|||
|
|||
BannerData.fromJson(Map<String, dynamic> json) { |
|||
if (json['records'] != null) { |
|||
records = <Records>[]; |
|||
json['records'].forEach((v) { |
|||
records!.add(new Records.fromJson(v)); |
|||
}); |
|||
} |
|||
total = json['total']; |
|||
size = json['size']; |
|||
current = json['current']; |
|||
pages = json['pages']; |
|||
} |
|||
|
|||
Map<String, dynamic> toJson() { |
|||
final Map<String, dynamic> data = new Map<String, dynamic>(); |
|||
if (this.records != null) { |
|||
data['records'] = this.records!.map((v) => v.toJson()).toList(); |
|||
} |
|||
data['total'] = this.total; |
|||
data['size'] = this.size; |
|||
data['current'] = this.current; |
|||
data['pages'] = this.pages; |
|||
return data; |
|||
} |
|||
} |
|||
|
|||
class Records { |
|||
String? id; |
|||
String? appId; |
|||
int? noticeType; |
|||
String? image; |
|||
int? jumpType; |
|||
String? jumpValue; |
|||
String? startTime; |
|||
String? endTime; |
|||
bool? enable; |
|||
Null? remark; |
|||
|
|||
Records( |
|||
{this.id, |
|||
this.appId, |
|||
this.noticeType, |
|||
this.image, |
|||
this.jumpType, |
|||
this.jumpValue, |
|||
this.startTime, |
|||
this.endTime, |
|||
this.enable, |
|||
this.remark}); |
|||
|
|||
Records.fromJson(Map<String, dynamic> json) { |
|||
id = json['id']; |
|||
appId = json['appId']; |
|||
noticeType = json['noticeType']; |
|||
image = json['image']; |
|||
jumpType = json['jumpType']; |
|||
jumpValue = json['jumpValue']; |
|||
startTime = json['startTime']; |
|||
endTime = json['endTime']; |
|||
enable = json['enable']; |
|||
remark = json['remark']; |
|||
} |
|||
|
|||
Map<String, dynamic> toJson() { |
|||
final Map<String, dynamic> data = new Map<String, dynamic>(); |
|||
data['id'] = this.id; |
|||
data['appId'] = this.appId; |
|||
data['noticeType'] = this.noticeType; |
|||
data['image'] = this.image; |
|||
data['jumpType'] = this.jumpType; |
|||
data['jumpValue'] = this.jumpValue; |
|||
data['startTime'] = this.startTime; |
|||
data['endTime'] = this.endTime; |
|||
data['enable'] = this.enable; |
|||
data['remark'] = this.remark; |
|||
return data; |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save