guardListCell.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // guardListCell.m
  3. // yunbaolive
  4. //
  5. // Created by Boom on 2018/11/12.
  6. // Copyright © 2018年 cat. All rights reserved.
  7. //
  8. #import "guardListCell.h"
  9. @implementation guardListCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  15. [super setSelected:selected animated:animated];
  16. // Configure the view for the selected state
  17. }
  18. - (void)setModel:(guardListModel *)model{
  19. _model = model;
  20. if ([_model.type isEqual:@"1"]) {
  21. _typeImgView.image = [UIImage imageNamed:getImagename(@"chat_shou_month")];
  22. }else{
  23. _typeImgView.image = [UIImage imageNamed:getImagename(@"chat_shou_year")];
  24. }
  25. [_iconImgView sd_setImageWithURL:[NSURL URLWithString:_model.avatar_thumb] placeholderImage:[UIImage imageNamed:@"icon_avatar_placeholder"]];
  26. _nameL.text = _model.user_nickname;
  27. _votesL.text = _model.contribute;
  28. _yingpiaoL.text = [common name_votes];
  29. if ([_model.sex isEqual:@"1"]) {
  30. _sexImgView.image = [UIImage imageNamed:@"bullet-男"];
  31. }else{
  32. _sexImgView.image = [UIImage imageNamed:@"bullet-女"];
  33. }
  34. /*
  35. NSDictionary *levelDic = [common getUserLevelMessage:_model.level];
  36. [_levelImgView sd_setImageWithURL:[NSURL URLWithString:minstr([levelDic valueForKey:@"thumb"])]];
  37. */
  38. }
  39. @end