KWMineMoreProductModel.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // KWMineMoreProductModel.m
  3. // westkissMob
  4. //
  5. // Created by iOS on 2022/9/15.
  6. //
  7. #import "KWMineMoreProductModel.h"
  8. @implementation KWMineMoreProductModel
  9. + (NSDictionary *)mj_replacedKeyFromPropertyName {
  10. return @{
  11. @"Id": @"id",
  12. @"title": @"name"
  13. };
  14. }
  15. + (KWMineMoreProductModel *)demoData {
  16. KWMineMoreProductModel *m = [[KWMineMoreProductModel alloc] init];
  17. m.title = @"CUSTOMERS ALSO VIEWED";
  18. NSMutableArray *tempArr = [NSMutableArray array];
  19. for (NSString *title in @[@"TOP SALE",@"CLEARANCE SALE",@"NEW ARRIVALS",@"RECOMMEND BY BEHAVIOR",@"RECOMMEND BY TEXTURE"]) {
  20. HomeFilterModel *temp = [[HomeFilterModel alloc]init];
  21. temp.title = title;
  22. temp.typeId = @(arc4random()%200).stringValue;
  23. int count = arc4random()%10 + 1;
  24. NSMutableArray<ASProductBaseModel *> *arr = [NSMutableArray array];
  25. for (int i = 0; i<count; i++) {
  26. [arr addObject: [ASProductBaseModel demoModel] ];
  27. }
  28. temp.product = arr;
  29. [tempArr addObject:temp];
  30. }
  31. m.keysArr = tempArr;
  32. return m;
  33. }
  34. @end