home_banner_model.dart 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /// code : "OK"
  2. /// data : {"list":[{"bannerId":"394037932589056","bannerPic":"http://media.qn.soybean.net/banner/98ca1b502bb74c468d9fff49a6f759f8.png","bannerPosition":301,"bannerAction":101,"bannerUrl":"https://www.wenjuan.com/s/UZBZJvkJSrs/","bannerExtId":""},{"bannerId":"374330408042496","bannerPic":"http://media.qn.soybean.net/banner/c62acfbe26c44be6bac303dad6059d7c.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://srank.activity.soybean.net/collectgifts?activityId=373033537634304","bannerExtId":""},{"bannerId":"130917322457088","bannerPic":"http://media.sbqn.laylib.com/banner/856ff20b30b84291933eacc86967e506.png","bannerPosition":201,"bannerAction":0,"bannerUrl":null,"bannerExtId":""},{"bannerId":"116440514428928","bannerPic":"http://media.sbqn.laylib.com/banner/3a869ef2e3ba4cd5a23f5f948a01ce3f.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://charmrank.h5.starbuds.laylib.com/rankspk?a=115666187190272","bannerExtId":""},{"bannerId":"407764597735424","bannerPic":"http://media.qn.soybean.net/banner/4533492316cb47048cc6a2eca2711cff.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://inapp.soybean.net/realLoveRank","bannerExtId":"1"},{"bannerId":"394038125527040","bannerPic":"http://media.qn.soybean.net/banner/2894f7fb0ed84f35842290d466d9034d.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://inapp.soybean.net/gasranks","bannerExtId":"哈哈"},{"bannerId":"309083068432384","bannerPic":"http://media.qn.soybean.net/banner/4aee31e9a3ab402ca321a9fc14fd00de.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://inapp.soybean.net/gRanks/home?room=1","bannerExtId":""},{"bannerId":"218486001369088","bannerPic":"http://media.sbqn.laylib.com/banner/e3d07d93d6104689bb96ac463b944934.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://travelgame.h5.starbuds.laylib.com/travel/home?lotteryId=4947d282e625121ed591bf72833c53ea","bannerExtId":""},{"bannerId":"115072097583104","bannerPic":"http://media.sbqn.laylib.com/banner/ac6720984ead4455bd01ec4b0512cbf8.png","bannerPosition":201,"bannerAction":101,"bannerUrl":"http://pig.h5.starbuds.laylib.com/full?g=80eaa12d08502e085106c906108fa185&s=9efc222cd1f2c7209f82909ad837c6a1&c=298b61525ebc121dda0ea125965bf551","bannerExtId":""},{"bannerId":"70146295070720","bannerPic":"http://media.sbqn.laylib.com/banner/a404cdfa1c874b8faf760dd45a206e8c.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://appbase.h5.starbuds.laylib.com/nobility/home","bannerExtId":""},{"bannerId":"88048398237696","bannerPic":"http://media.sbqn.laylib.com/banner/3cc4b003241041b8950e50a55436bc2c.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://appbase.h5.starbuds.laylib.com/wshop/home","bannerExtId":""},{"bannerId":"109142870065152","bannerPic":"http://media.sbqn.laylib.com/banner/435bb348a23548f48cf13ddff261f8ce.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://sp.qn.paqukeji.com/images/20200429_banner.png","bannerExtId":""},{"bannerId":"68564060995584","bannerPic":"http://media.sbqn.laylib.com/banner/b1f5d974549049b2b5c710f443e8b198.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"www.baidu.com","bannerExtId":""}]}
  3. /// msg : ""
  4. /// success : true
  5. class HomeBannerModel {
  6. String? _code;
  7. HomeBannerModelData? _data;
  8. String? _msg;
  9. bool? _success;
  10. String? get code => _code;
  11. HomeBannerModelData? get data => _data;
  12. String? get msg => _msg;
  13. bool? get success => _success;
  14. HomeBannerModel({
  15. String? code,
  16. HomeBannerModelData? data,
  17. String? msg,
  18. bool? success}){
  19. _code = code;
  20. _data = data;
  21. _msg = msg;
  22. _success = success;
  23. }
  24. HomeBannerModel.fromJson(dynamic json) {
  25. _code = json['code'];
  26. _data = json['data'] != null ? HomeBannerModelData.fromJson(json['data']) : null;
  27. _msg = json['msg'];
  28. _success = json['success'];
  29. }
  30. Map<String, dynamic> toJson() {
  31. var map = <String, dynamic>{};
  32. map['code'] = _code;
  33. if (_data != null) {
  34. map['data'] = _data?.toJson();
  35. }
  36. map['msg'] = _msg;
  37. map['success'] = _success;
  38. return map;
  39. }
  40. }
  41. /// list : [{"bannerId":"394037932589056","bannerPic":"http://media.qn.soybean.net/banner/98ca1b502bb74c468d9fff49a6f759f8.png","bannerPosition":301,"bannerAction":101,"bannerUrl":"https://www.wenjuan.com/s/UZBZJvkJSrs/","bannerExtId":""},{"bannerId":"374330408042496","bannerPic":"http://media.qn.soybean.net/banner/c62acfbe26c44be6bac303dad6059d7c.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://srank.activity.soybean.net/collectgifts?activityId=373033537634304","bannerExtId":""},{"bannerId":"130917322457088","bannerPic":"http://media.sbqn.laylib.com/banner/856ff20b30b84291933eacc86967e506.png","bannerPosition":201,"bannerAction":0,"bannerUrl":null,"bannerExtId":""},{"bannerId":"116440514428928","bannerPic":"http://media.sbqn.laylib.com/banner/3a869ef2e3ba4cd5a23f5f948a01ce3f.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://charmrank.h5.starbuds.laylib.com/rankspk?a=115666187190272","bannerExtId":""},{"bannerId":"407764597735424","bannerPic":"http://media.qn.soybean.net/banner/4533492316cb47048cc6a2eca2711cff.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://inapp.soybean.net/realLoveRank","bannerExtId":"1"},{"bannerId":"394038125527040","bannerPic":"http://media.qn.soybean.net/banner/2894f7fb0ed84f35842290d466d9034d.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://inapp.soybean.net/gasranks","bannerExtId":"哈哈"},{"bannerId":"309083068432384","bannerPic":"http://media.qn.soybean.net/banner/4aee31e9a3ab402ca321a9fc14fd00de.png","bannerPosition":102,"bannerAction":101,"bannerUrl":"http://inapp.soybean.net/gRanks/home?room=1","bannerExtId":""},{"bannerId":"218486001369088","bannerPic":"http://media.sbqn.laylib.com/banner/e3d07d93d6104689bb96ac463b944934.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://travelgame.h5.starbuds.laylib.com/travel/home?lotteryId=4947d282e625121ed591bf72833c53ea","bannerExtId":""},{"bannerId":"115072097583104","bannerPic":"http://media.sbqn.laylib.com/banner/ac6720984ead4455bd01ec4b0512cbf8.png","bannerPosition":201,"bannerAction":101,"bannerUrl":"http://pig.h5.starbuds.laylib.com/full?g=80eaa12d08502e085106c906108fa185&s=9efc222cd1f2c7209f82909ad837c6a1&c=298b61525ebc121dda0ea125965bf551","bannerExtId":""},{"bannerId":"70146295070720","bannerPic":"http://media.sbqn.laylib.com/banner/a404cdfa1c874b8faf760dd45a206e8c.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://appbase.h5.starbuds.laylib.com/nobility/home","bannerExtId":""},{"bannerId":"88048398237696","bannerPic":"http://media.sbqn.laylib.com/banner/3cc4b003241041b8950e50a55436bc2c.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://appbase.h5.starbuds.laylib.com/wshop/home","bannerExtId":""},{"bannerId":"109142870065152","bannerPic":"http://media.sbqn.laylib.com/banner/435bb348a23548f48cf13ddff261f8ce.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"http://sp.qn.paqukeji.com/images/20200429_banner.png","bannerExtId":""},{"bannerId":"68564060995584","bannerPic":"http://media.sbqn.laylib.com/banner/b1f5d974549049b2b5c710f443e8b198.png","bannerPosition":101,"bannerAction":101,"bannerUrl":"www.baidu.com","bannerExtId":""}]
  42. class HomeBannerModelData {
  43. List<BannerList>? _list;
  44. List<BannerList>? get list => _list;
  45. HomeBannerModelData({
  46. List<BannerList>? list}){
  47. _list = list;
  48. }
  49. HomeBannerModelData.fromJson(dynamic json) {
  50. if (json['list'] != null) {
  51. _list = [];
  52. json['list'].forEach((v) {
  53. _list?.add(BannerList.fromJson(v));
  54. });
  55. }
  56. }
  57. Map<String, dynamic> toJson() {
  58. var map = <String, dynamic>{};
  59. if (_list != null) {
  60. map['list'] = _list?.map((v) => v.toJson()).toList();
  61. }
  62. return map;
  63. }
  64. }
  65. /// bannerId : "394037932589056"
  66. /// bannerPic : "http://media.qn.soybean.net/banner/98ca1b502bb74c468d9fff49a6f759f8.png"
  67. /// bannerPosition : 301
  68. /// bannerAction : 101
  69. /// bannerUrl : "https://www.wenjuan.com/s/UZBZJvkJSrs/"
  70. /// bannerExtId : ""
  71. class BannerList {
  72. String? _bannerId;
  73. String? _bannerPic;
  74. int? _bannerPosition;
  75. int? _bannerAction;
  76. String? _bannerUrl;
  77. String? _bannerExtId;
  78. String? get bannerId => _bannerId;
  79. String? get bannerPic => _bannerPic;
  80. int? get bannerPosition => _bannerPosition;
  81. int? get bannerAction => _bannerAction;
  82. String? get bannerUrl => _bannerUrl;
  83. String? get bannerExtId => _bannerExtId;
  84. BannerList({
  85. String? bannerId,
  86. String? bannerPic,
  87. int? bannerPosition,
  88. int? bannerAction,
  89. String? bannerUrl,
  90. String? bannerExtId}){
  91. _bannerId = bannerId;
  92. _bannerPic = bannerPic;
  93. _bannerPosition = bannerPosition;
  94. _bannerAction = bannerAction;
  95. _bannerUrl = bannerUrl;
  96. _bannerExtId = bannerExtId;
  97. }
  98. BannerList.fromJson(dynamic json) {
  99. _bannerId = json['bannerId'];
  100. _bannerPic = json['bannerPic'];
  101. _bannerPosition = json['bannerPosition'];
  102. _bannerAction = json['bannerAction'];
  103. _bannerUrl = json['bannerUrl'];
  104. _bannerExtId = json['bannerExtId'];
  105. }
  106. Map<String, dynamic> toJson() {
  107. var map = <String, dynamic>{};
  108. map['bannerId'] = _bannerId;
  109. map['bannerPic'] = _bannerPic;
  110. map['bannerPosition'] = _bannerPosition;
  111. map['bannerAction'] = _bannerAction;
  112. map['bannerUrl'] = _bannerUrl;
  113. map['bannerExtId'] = _bannerExtId;
  114. return map;
  115. }
  116. }