Target_Home.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // Target_Home.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/6/5.
  6. //
  7. #import "Target_Home.h"
  8. #import "ASHomeViewController.h"
  9. #import "ASProductListViewController.h"
  10. @implementation Target_Home
  11. - (UIViewController *)Action_getHomeVc:(NSDictionary *)params {
  12. ASHomeViewController *vc = [[ASHomeViewController alloc] init];
  13. return vc;
  14. }
  15. /**
  16. - params: {
  17. "type":typeId, //String
  18. "title":titleStr,//String
  19. "searchKey":keyword,//String
  20. "secondTime": secondTime,// NSNumber,
  21. "pointGetType":pointGetType,//NSNumber
  22. }
  23. */
  24. - (UIViewController *)Action_getProductListVc:(NSDictionary *)params {
  25. ASProductListViewController *vc = [[ASProductListViewController alloc] init];
  26. vc.titleStr = params[@"title"];
  27. NSString *keyStr = [params valueForKey:@"searchKey"];
  28. if (keyStr != nil && keyStr.length > 0) {
  29. vc.keyWord = params[@"searchKey"];
  30. }
  31. if ([params valueForKey:@"type"] != nil) {
  32. vc.type = params[@"type"];
  33. }
  34. if ([params valueForKey:@"secondTime"] != nil) {
  35. vc.secondTime = ((NSNumber *)params[@"secondTime"]).integerValue;
  36. }
  37. if ([params valueForKey:@"pointGetType"] != nil) {
  38. vc.pointGetType = ((NSNumber *)params[@"pointGetType"]).integerValue;
  39. }
  40. return vc;
  41. }
  42. @end