GoodsReviewsListTableV.m 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // GoodsReviewsListTableV.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2024/1/5.
  6. //
  7. #import "GoodsReviewsListTableV.h"
  8. #import <GKPhotoBrowser/GKPhotoBrowser.h>
  9. @implementation GoodsReviewsListTableV
  10. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  11. GoodsReviewsListM *objectM = self.infodata[indexPath.row];
  12. GoodsReviewsCell *cell = [GoodsReviewsCell cellWithTableView:tableView CellClass:[GoodsReviewsCell class]];
  13. [cell configData:objectM];
  14. // @weakify(cell)
  15. cell.currencyparameterClose = ^(NSInteger type, id Data) {
  16. // @strongify(cell) //图片选择器展示
  17. NSArray *imageArr = (NSArray *)Data;
  18. NSMutableArray *photos = [[NSMutableArray alloc]init];
  19. for (NSString *imgUrl in imageArr) {
  20. GKPhoto *photo = [GKPhoto new];
  21. photo.placeholderImage = UIImageDefaultImg_SD;
  22. photo.url = [NSURL URLWithString:imgUrl];
  23. [photos addObject:photo];
  24. }
  25. GKPhotoBrowser *photoBrowser = [GKPhotoBrowser photoBrowserWithPhotos:photos currentIndex:type];
  26. photoBrowser.showStyle = GKPhotoBrowserShowStyleNone;
  27. photoBrowser.failureText = @"Net Error";
  28. [photoBrowser showFromVC:[Current_normalTool topViewController]];
  29. };
  30. return cell;
  31. }
  32. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  33. return UITableViewAutomaticDimension;
  34. }
  35. - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
  36. return 100;
  37. }
  38. - (void)configData:(id)Data{
  39. NSMutableArray <GoodsReviewsListM *>*tmpAry = Data;
  40. self.infodata = tmpAry;
  41. [self reloadData];
  42. }
  43. @end