GoodsSizePayMentCell.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // GoodsSizePayMentCell.m
  3. // Asteria
  4. //
  5. // Created by 王猛 on 2024/1/24.
  6. //
  7. #import "GoodsSizePayMentCell.h"
  8. #import "GoodsDetailsPayV.h"
  9. @implementation GoodsSizePayMentCellData
  10. @end
  11. @interface GoodsSizePayMentCell ()
  12. @property(nonatomic, strong) GoodsDetailsPayV *payV;
  13. @end
  14. @implementation GoodsSizePayMentCell
  15. - (void)awakeFromNib {
  16. [super awakeFromNib];
  17. // Initialization code
  18. }
  19. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  20. [super setSelected:selected animated:animated];
  21. // Configure the view for the selected state
  22. }
  23. - (void)setupSubviewS{
  24. [self.contentView addSubview:self.payV];
  25. [self.payV mas_makeConstraints:^(MASConstraintMaker *make) {
  26. make.left.top.mas_equalTo(10);
  27. make.width.mas_equalTo(KScreenWidth-20);
  28. make.height.mas_equalTo(78);
  29. make.bottom.mas_equalTo(-10);
  30. }];
  31. }
  32. - (void)configData:(id)Data{
  33. GoodsSizePayMentCellData *model = (GoodsSizePayMentCellData *)Data;
  34. self.payV.titleLab.text = [NSString stringWithFormat:@"Pay in 4 interest-free payments of %@%.2f with",model.currency_symbol,model.final_prices_f/4];
  35. }
  36. -(GoodsDetailsPayV *)payV{
  37. if(!_payV){
  38. _payV = [[GoodsDetailsPayV alloc]initWithFrame:CGRectMake(10, 0, KScreenWidth-20, 78)];
  39. _payV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
  40. _payV.layer.cornerRadius = 4;
  41. _payV.clipsToBounds = YES;
  42. }
  43. return _payV;
  44. }
  45. @end