KWMineMoreProductModel.m 1003 B

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