home_page_model.dart 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. class HomePageModel {
  2. String code;
  3. String message;
  4. HomeData data;
  5. HomePageModel({this.code, this.message, this.data});
  6. HomePageModel.fromJson(Map<String, dynamic> json) {
  7. code = json['code'];
  8. message = json['message'];
  9. data = json['data'] != null ? HomeData.fromJson(json['data']) : null;
  10. }
  11. Map<String, dynamic> toJson() {
  12. final Map<String, dynamic> data = Map<String, dynamic>();
  13. data['code'] = this.code;
  14. data['message'] = this.message;
  15. if (this.data != null) {
  16. data['data'] = this.data.toJson();
  17. }
  18. return data;
  19. }
  20. }
  21. class HomeData {
  22. List<Slides> slides;
  23. ShopInfo shopInfo;
  24. IntegralMallPic integralMallPic;
  25. ToShareCode toShareCode;
  26. List<Recommend> recommend;
  27. AdvertesPicture advertesPicture;
  28. List<Floor> floor1;
  29. List<Floor> floor2;
  30. List<Floor> floor3;
  31. Saoma saoma;
  32. NewUser newUser;
  33. Floor1Pic floor1Pic;
  34. Floor2Pic floor2Pic;
  35. FloorName floorName;
  36. List<Category> category;
  37. Floor3Pic floor3Pic;
  38. HomeData(
  39. {this.slides,
  40. this.shopInfo,
  41. this.integralMallPic,
  42. this.toShareCode,
  43. this.recommend,
  44. this.advertesPicture,
  45. this.floor1,
  46. this.floor2,
  47. this.floor3,
  48. this.saoma,
  49. this.newUser,
  50. this.floor1Pic,
  51. this.floor2Pic,
  52. this.floorName,
  53. this.category,
  54. this.floor3Pic});
  55. HomeData.fromJson(Map<String, dynamic> json) {
  56. if (json['slides'] != null) {
  57. slides = List<Slides>();
  58. json['slides'].forEach((v) {
  59. slides.add(Slides.fromJson(v));
  60. });
  61. }
  62. shopInfo = json['shopInfo'] != null ? ShopInfo.fromJson(json['shopInfo']) : null;
  63. integralMallPic = json['integralMallPic'] != null ? IntegralMallPic.fromJson(json['integralMallPic']) : null;
  64. toShareCode = json['toShareCode'] != null ? ToShareCode.fromJson(json['toShareCode']) : null;
  65. if (json['recommend'] != null) {
  66. recommend = List<Recommend>();
  67. json['recommend'].forEach((v) {
  68. recommend.add(Recommend.fromJson(v));
  69. });
  70. }
  71. advertesPicture = json['advertesPicture'] != null ? AdvertesPicture.fromJson(json['advertesPicture']) : null;
  72. if (json['floor1'] != null) {
  73. floor1 = List<Floor>();
  74. json['floor1'].forEach((v) {
  75. floor1.add(Floor.fromJson(v));
  76. });
  77. }
  78. if (json['floor2'] != null) {
  79. floor2 = List<Floor>();
  80. json['floor2'].forEach((v) {
  81. floor2.add(Floor.fromJson(v));
  82. });
  83. }
  84. if (json['floor3'] != null) {
  85. floor3 = List<Floor>();
  86. json['floor3'].forEach((v) {
  87. floor3.add(Floor.fromJson(v));
  88. });
  89. }
  90. saoma = json['saoma'] != null ? Saoma.fromJson(json['saoma']) : null;
  91. newUser = json['newUser'] != null ? NewUser.fromJson(json['newUser']) : null;
  92. floor1Pic = json['floor1Pic'] != null ? Floor1Pic.fromJson(json['floor1Pic']) : null;
  93. floor2Pic = json['floor2Pic'] != null ? Floor2Pic.fromJson(json['floor2Pic']) : null;
  94. floorName = json['floorName'] != null ? FloorName.fromJson(json['floorName']) : null;
  95. if (json['category'] != null) {
  96. category = List<Category>();
  97. json['category'].forEach((v) {
  98. category.add(Category.fromJson(v));
  99. });
  100. }
  101. floor3Pic = json['floor3Pic'] != null ? Floor3Pic.fromJson(json['floor3Pic']) : null;
  102. }
  103. Map<String, dynamic> toJson() {
  104. final Map<String, dynamic> data = Map<String, dynamic>();
  105. if (this.slides != null) {
  106. data['slides'] = this.slides.map((v) => v.toJson()).toList();
  107. }
  108. if (this.shopInfo != null) {
  109. data['shopInfo'] = this.shopInfo.toJson();
  110. }
  111. if (this.integralMallPic != null) {
  112. data['integralMallPic'] = this.integralMallPic.toJson();
  113. }
  114. if (this.toShareCode != null) {
  115. data['toShareCode'] = this.toShareCode.toJson();
  116. }
  117. if (this.recommend != null) {
  118. data['recommend'] = this.recommend.map((v) => v.toJson()).toList();
  119. }
  120. if (this.advertesPicture != null) {
  121. data['advertesPicture'] = this.advertesPicture.toJson();
  122. }
  123. if (this.floor1 != null) {
  124. data['floor1'] = this.floor1.map((v) => v.toJson()).toList();
  125. }
  126. if (this.floor2 != null) {
  127. data['floor2'] = this.floor2.map((v) => v.toJson()).toList();
  128. }
  129. if (this.floor3 != null) {
  130. data['floor3'] = this.floor3.map((v) => v.toJson()).toList();
  131. }
  132. if (this.saoma != null) {
  133. data['saoma'] = this.saoma.toJson();
  134. }
  135. if (this.newUser != null) {
  136. data['newUser'] = this.newUser.toJson();
  137. }
  138. if (this.floor1Pic != null) {
  139. data['floor1Pic'] = this.floor1Pic.toJson();
  140. }
  141. if (this.floor2Pic != null) {
  142. data['floor2Pic'] = this.floor2Pic.toJson();
  143. }
  144. if (this.floorName != null) {
  145. data['floorName'] = this.floorName.toJson();
  146. }
  147. if (this.category != null) {
  148. data['category'] = this.category.map((v) => v.toJson()).toList();
  149. }
  150. if (this.floor3Pic != null) {
  151. data['floor3Pic'] = this.floor3Pic.toJson();
  152. }
  153. return data;
  154. }
  155. }
  156. class Slides {
  157. String image;
  158. String goodsId;
  159. Slides({this.image, this.goodsId});
  160. Slides.fromJson(Map<String, dynamic> json) {
  161. image = json['image'];
  162. goodsId = json['goodsId'];
  163. }
  164. Map<String, dynamic> toJson() {
  165. final Map<String, dynamic> data = Map<String, dynamic>();
  166. data['image'] = this.image;
  167. data['goodsId'] = this.goodsId;
  168. return data;
  169. }
  170. }
  171. class ShopInfo {
  172. String leaderImage;
  173. String leaderPhone;
  174. ShopInfo({this.leaderImage, this.leaderPhone});
  175. ShopInfo.fromJson(Map<String, dynamic> json) {
  176. leaderImage = json['leaderImage'];
  177. leaderPhone = json['leaderPhone'];
  178. }
  179. Map<String, dynamic> toJson() {
  180. final Map<String, dynamic> data = Map<String, dynamic>();
  181. data['leaderImage'] = this.leaderImage;
  182. data['leaderPhone'] = this.leaderPhone;
  183. return data;
  184. }
  185. }
  186. class IntegralMallPic {
  187. String pICTUREADDRESS;
  188. String tOPLACE;
  189. IntegralMallPic({this.pICTUREADDRESS, this.tOPLACE});
  190. IntegralMallPic.fromJson(Map<String, dynamic> json) {
  191. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  192. tOPLACE = json['TO_PLACE'];
  193. }
  194. Map<String, dynamic> toJson() {
  195. final Map<String, dynamic> data = Map<String, dynamic>();
  196. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  197. data['TO_PLACE'] = this.tOPLACE;
  198. return data;
  199. }
  200. }
  201. class ToShareCode {
  202. String pICTUREADDRESS;
  203. String tOPLACE;
  204. ToShareCode({this.pICTUREADDRESS, this.tOPLACE});
  205. ToShareCode.fromJson(Map<String, dynamic> json) {
  206. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  207. tOPLACE = json['TO_PLACE'];
  208. }
  209. Map<String, dynamic> toJson() {
  210. final Map<String, dynamic> data = Map<String, dynamic>();
  211. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  212. data['TO_PLACE'] = this.tOPLACE;
  213. return data;
  214. }
  215. }
  216. class Recommend {
  217. String image;
  218. double mallPrice;
  219. String goodsName;
  220. String goodsId;
  221. double price;
  222. Recommend({this.image, this.mallPrice, this.goodsName, this.goodsId, this.price});
  223. Recommend.fromJson(Map<String, dynamic> json) {
  224. image = json['image'];
  225. mallPrice = json['mallPrice'] + 0.0;
  226. goodsName = json['goodsName'];
  227. goodsId = json['goodsId'];
  228. price = json['price'] + 0.0;
  229. }
  230. Map<String, dynamic> toJson() {
  231. final Map<String, dynamic> data = Map<String, dynamic>();
  232. data['image'] = this.image;
  233. data['mallPrice'] = this.mallPrice;
  234. data['goodsName'] = this.goodsName;
  235. data['goodsId'] = this.goodsId;
  236. data['price'] = this.price;
  237. return data;
  238. }
  239. }
  240. class AdvertesPicture {
  241. String pICTUREADDRESS;
  242. String tOPLACE;
  243. AdvertesPicture({this.pICTUREADDRESS, this.tOPLACE});
  244. AdvertesPicture.fromJson(Map<String, dynamic> json) {
  245. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  246. tOPLACE = json['TO_PLACE'];
  247. }
  248. Map<String, dynamic> toJson() {
  249. final Map<String, dynamic> data = Map<String, dynamic>();
  250. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  251. data['TO_PLACE'] = this.tOPLACE;
  252. return data;
  253. }
  254. }
  255. class Floor {
  256. String image;
  257. String goodsId;
  258. Floor({this.image, this.goodsId});
  259. Floor.fromJson(Map<String, dynamic> json) {
  260. image = json['image'];
  261. goodsId = json['goodsId'];
  262. }
  263. Map<String, dynamic> toJson() {
  264. final Map<String, dynamic> data = Map<String, dynamic>();
  265. data['image'] = this.image;
  266. data['goodsId'] = this.goodsId;
  267. return data;
  268. }
  269. }
  270. class Saoma {
  271. String pICTUREADDRESS;
  272. String tOPLACE;
  273. Saoma({this.pICTUREADDRESS, this.tOPLACE});
  274. Saoma.fromJson(Map<String, dynamic> json) {
  275. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  276. tOPLACE = json['TO_PLACE'];
  277. }
  278. Map<String, dynamic> toJson() {
  279. final Map<String, dynamic> data = Map<String, dynamic>();
  280. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  281. data['TO_PLACE'] = this.tOPLACE;
  282. return data;
  283. }
  284. }
  285. class NewUser {
  286. String pICTUREADDRESS;
  287. String tOPLACE;
  288. NewUser({this.pICTUREADDRESS, this.tOPLACE});
  289. NewUser.fromJson(Map<String, dynamic> json) {
  290. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  291. tOPLACE = json['TO_PLACE'];
  292. }
  293. Map<String, dynamic> toJson() {
  294. final Map<String, dynamic> data = Map<String, dynamic>();
  295. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  296. data['TO_PLACE'] = this.tOPLACE;
  297. return data;
  298. }
  299. }
  300. class Floor1Pic {
  301. String pICTUREADDRESS;
  302. String tOPLACE;
  303. Floor1Pic({this.pICTUREADDRESS, this.tOPLACE});
  304. Floor1Pic.fromJson(Map<String, dynamic> json) {
  305. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  306. tOPLACE = json['TO_PLACE'];
  307. }
  308. Map<String, dynamic> toJson() {
  309. final Map<String, dynamic> data = Map<String, dynamic>();
  310. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  311. data['TO_PLACE'] = this.tOPLACE;
  312. return data;
  313. }
  314. }
  315. class Floor2Pic {
  316. String pICTUREADDRESS;
  317. String tOPLACE;
  318. Floor2Pic({this.pICTUREADDRESS, this.tOPLACE});
  319. Floor2Pic.fromJson(Map<String, dynamic> json) {
  320. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  321. tOPLACE = json['TO_PLACE'];
  322. }
  323. Map<String, dynamic> toJson() {
  324. final Map<String, dynamic> data = Map<String, dynamic>();
  325. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  326. data['TO_PLACE'] = this.tOPLACE;
  327. return data;
  328. }
  329. }
  330. class FloorName {
  331. String floor1;
  332. String floor2;
  333. String floor3;
  334. FloorName({this.floor1, this.floor2, this.floor3});
  335. FloorName.fromJson(Map<String, dynamic> json) {
  336. floor1 = json['floor1'];
  337. floor2 = json['floor2'];
  338. floor3 = json['floor3'];
  339. }
  340. Map<String, dynamic> toJson() {
  341. final Map<String, dynamic> data = Map<String, dynamic>();
  342. data['floor1'] = this.floor1;
  343. data['floor2'] = this.floor2;
  344. data['floor3'] = this.floor3;
  345. return data;
  346. }
  347. }
  348. class Category {
  349. String mallCategoryId;
  350. String mallCategoryName;
  351. List<BxMallSubDto> bxMallSubDto;
  352. Null comments;
  353. String image;
  354. Category({this.mallCategoryId, this.mallCategoryName, this.bxMallSubDto, this.comments, this.image});
  355. Category.fromJson(Map<String, dynamic> json) {
  356. mallCategoryId = json['mallCategoryId'];
  357. mallCategoryName = json['mallCategoryName'];
  358. if (json['bxMallSubDto'] != null) {
  359. bxMallSubDto = List<BxMallSubDto>();
  360. json['bxMallSubDto'].forEach((v) {
  361. bxMallSubDto.add(BxMallSubDto.fromJson(v));
  362. });
  363. }
  364. comments = json['comments'];
  365. image = json['image'];
  366. }
  367. Map<String, dynamic> toJson() {
  368. final Map<String, dynamic> data = Map<String, dynamic>();
  369. data['mallCategoryId'] = this.mallCategoryId;
  370. data['mallCategoryName'] = this.mallCategoryName;
  371. if (this.bxMallSubDto != null) {
  372. data['bxMallSubDto'] = this.bxMallSubDto.map((v) => v.toJson()).toList();
  373. }
  374. data['comments'] = this.comments;
  375. data['image'] = this.image;
  376. return data;
  377. }
  378. }
  379. class BxMallSubDto {
  380. String mallSubId;
  381. String mallCategoryId;
  382. String mallSubName;
  383. String comments;
  384. BxMallSubDto({this.mallSubId, this.mallCategoryId, this.mallSubName, this.comments});
  385. BxMallSubDto.fromJson(Map<String, dynamic> json) {
  386. mallSubId = json['mallSubId'];
  387. mallCategoryId = json['mallCategoryId'];
  388. mallSubName = json['mallSubName'];
  389. comments = json['comments'];
  390. }
  391. Map<String, dynamic> toJson() {
  392. final Map<String, dynamic> data = Map<String, dynamic>();
  393. data['mallSubId'] = this.mallSubId;
  394. data['mallCategoryId'] = this.mallCategoryId;
  395. data['mallSubName'] = this.mallSubName;
  396. data['comments'] = this.comments;
  397. return data;
  398. }
  399. }
  400. class Floor3Pic {
  401. String pICTUREADDRESS;
  402. String tOPLACE;
  403. Floor3Pic({this.pICTUREADDRESS, this.tOPLACE});
  404. Floor3Pic.fromJson(Map<String, dynamic> json) {
  405. pICTUREADDRESS = json['PICTURE_ADDRESS'];
  406. tOPLACE = json['TO_PLACE'];
  407. }
  408. Map<String, dynamic> toJson() {
  409. final Map<String, dynamic> data = Map<String, dynamic>();
  410. data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
  411. data['TO_PLACE'] = this.tOPLACE;
  412. return data;
  413. }
  414. }