ASProductListViewModel.m 475 B

1234567891011121314151617181920212223
  1. //
  2. // ASProductListViewModel.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/6/12.
  6. //
  7. #import "ASProductListViewModel.h"
  8. @implementation ASProductListViewModel
  9. - (NSArray<ASProductBaseModel *> *)productList {
  10. if (!_productList) {
  11. NSMutableArray *arr = [NSMutableArray array];
  12. for (int i=0; i<arc4random()%20*2; i++) {
  13. [arr addObject:[ASProductBaseModel demoModel]];
  14. }
  15. _productList = arr;
  16. }
  17. return _productList;
  18. }
  19. @end