// // LZMChildFansCell.m // YouHuiProject // // Created by 小花 on 2018/5/19. // Copyright © 2018年 kuxuan. All rights reserved. // #import "LZMChildFansCell.h" @interface LZMChildFansCell() @property (nonatomic, strong) UIImageView *iconView; @property (nonatomic, strong) UIImageView *tagImage; @property (nonatomic, strong) UILabel *name; @property (nonatomic, strong) UILabel *phoneNum; @property (nonatomic, strong) UILabel *date; @end @implementation LZMChildFansCell + (instancetype)cellWithTableView:(UITableView *)tableView { static NSString *cellID = nil; cellID = NSStringFromClass([self class]); LZMChildFansCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; if (!cell) { cell = [[LZMChildFansCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID]; } return cell; } - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [self initSubViews]; } return self; } - (void)initSubViews { [self.contentView addSubview:self.iconView]; [self.contentView addSubview:self.tagImage]; [self.contentView addSubview:self.name]; [self.contentView addSubview:self.phoneNum]; [self.contentView addSubview:self.date]; [self.contentView addSubview:self.sencondFansSumBtn]; [self.contentView addSubview:self.updateBtn]; [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(15); make.width.height.mas_equalTo(50); make.centerY.mas_equalTo(self.mas_centerY); }]; [self.name mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.iconView.mas_right).mas_offset(15); make.top.mas_equalTo(15); make.width.mas_lessThanOrEqualTo(150); }]; [self.tagImage mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.name.mas_right).mas_offset(10); make.centerY.mas_equalTo(self.name.mas_centerY); make.width.mas_equalTo(55); make.height.mas_equalTo(15); }]; [self.phoneNum mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.mas_equalTo(-15); make.left.mas_equalTo(self.name); }]; [self.date mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.phoneNum.mas_right).mas_offset(10); make.centerY.mas_equalTo(self.phoneNum.mas_centerY); }]; [self.sencondFansSumBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(FITSIZE(-17)); make.height.equalTo(self.mas_height); make.centerY.equalTo(self.mas_centerY); make.width.mas_equalTo(100); }]; [self.updateBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-15); make.centerY.mas_equalTo(self.mas_centerY); make.width.mas_equalTo(Fitsize(52)); make.height.mas_equalTo(Fitsize(17)); }]; } #pragma mark -事件 -(void)sencondFansAction{ if (self.delegate && [self.delegate respondsToSelector:@selector(recommendFansByUserID:withUserName:)]) { [self.delegate recommendFansByUserID:self.model.user_id withUserName:self.model.name]; } } #pragma mark -懒加载 - (UIImageView *)iconView { if (!_iconView) { _iconView = [[UIImageView alloc] init]; _iconView.contentMode = UIViewContentModeScaleAspectFill; _iconView.layer.masksToBounds = YES; _iconView.backgroundColor = [UIColor yhGrayColor]; [_iconView setImage:[UIImage imageNamed:@"login"]]; _iconView.layer.cornerRadius = 25; } return _iconView; } - (UIImageView *)tagImage { if (!_tagImage) { _tagImage = [[UIImageView alloc] init]; _tagImage.contentMode = UIViewContentModeScaleAspectFit; _tagImage.image = [UIImage imageNamed:@"Svip_icon"]; } return _tagImage; } - (UILabel *)name { if (!_name) { _name = [[UILabel alloc] init]; _name.textColor = [UIColor YHColorWithHex:0x333333]; _name.font = [UIFont systemFontOfSize:14]; _name.text = @"未知用户"; } return _name; } - (UILabel *)phoneNum { if (!_phoneNum) { _phoneNum = [[UILabel alloc] init]; _phoneNum.textColor = [UIColor YHColorWithHex:0x878787]; _phoneNum.font = [UIFont systemFontOfSize:12]; _phoneNum.text = @"****"; } return _phoneNum; } - (UILabel *)date { if (!_date) { _date = [[UILabel alloc] init]; _date.textColor = [UIColor YHColorWithHex:0x878787]; _date.font = [UIFont systemFontOfSize:12]; _date.text = @"--"; } return _date; } -(UIButton *)sencondFansSumBtn{ if (!_sencondFansSumBtn) { _sencondFansSumBtn=[UIButton buttonWithType:UIButtonTypeCustom]; [_sencondFansSumBtn setTitleColor:[UIColor YHColorWithHex:0xFF4633] forState:UIControlStateNormal]; _sencondFansSumBtn.titleLabel.font=[UIFont systemFontOfSize:12]; [_sencondFansSumBtn addTarget:self action:@selector(sencondFansAction) forControlEvents:UIControlEventTouchUpInside]; } return _sencondFansSumBtn; } - (UIButton *)updateBtn { if (!_updateBtn) { _updateBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [_updateBtn setImage:[UIImage imageNamed:@"update_btn"] forState:UIControlStateNormal]; [_updateBtn addTarget:self action:@selector(updateBtnAction) forControlEvents:UIControlEventTouchUpInside]; } return _updateBtn; } - (void)updateBtnAction { if (self.updateAction) { self.updateAction(_model); } } -(void)setModel:(LZMChildFansModel *)model{ _model=model; // @property(nonatomic,copy)NSString *name; //名称 // @property(nonatomic,copy)NSString *phone; // s手机号 // @property(nonatomic,copy)NSString *fansDevel; // f粉丝等级 1 一级粉丝 2二级粉丝 // @property(nonatomic,copy)NSString *fansNum; //一级粉丝邀请的人数 // @property(nonatomic,copy)NSString *first_level_vermicelli_time; //r如果粉丝等级为1 时间取这个 // @property(nonatomic,copy)NSString *second_level_vermicelli_time; //r如果粉丝等级为2 时间取这个 // @property(nonatomic,copy)NSString *level; //1 会员 2超级会员 3 运营商 self.name.text=model.name; // if (model.name.length > 10) { // [self.name mas_updateConstraints:^(MASConstraintMaker *make) { // make.width.mas_equalTo(150); // }]; // } self.phoneNum.text=model.phone; switch ([model.level integerValue]) { case 1: { self.tagImage.image = [UIImage imageNamed:@"Vip_icon"]; self.sencondFansSumBtn.hidden=YES; } break; case 2: case 3: { self.tagImage.image = [UIImage imageNamed:@"Svip_icon"]; } break; default: break; } switch ([model.fansDevel integerValue]) { case 1: { self.date.text=model.first_level_vermicelli_time; if ([model.fansNum integerValue]!=0) { [self.sencondFansSumBtn setTitle:[NSString stringWithFormat:@"推荐%@人>",model.fansNum] forState:UIControlStateNormal]; self.sencondFansSumBtn.hidden=NO; }else{ self.sencondFansSumBtn.hidden=YES; } } break; case 2: { self.date.text=model.second_level_vermicelli_time; self.sencondFansSumBtn.hidden=YES; } break; default: break; } [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"login"]]; self.updateBtn.hidden = [model.level integerValue]==1 && model.uplevel.boolValue ? NO : YES; } -(void)anLa3Kqcje:(UIVisualEffectView*) anLa3Kqcje av1Dw5hz:(UIFont*) av1Dw5hz arLT1Pc:(UIRegion*) arLT1Pc aFxmHYw0:(UIMenuItem*) aFxmHYw0 auUEjNy:(UIMenuItem*) auUEjNy aBn21MFaKJo:(UIRegion*) aBn21MFaKJo aeYosWEV:(UIApplication*) aeYosWEV aW0SnDpj:(UICollectionView*) aW0SnDpj aeJCsxb7mG:(UISwitch*) aeJCsxb7mG am5fxLw8:(UIEdgeInsets*) am5fxLw8 aqCQrjn5I:(UIActivity*) aqCQrjn5I a7sni6:(UIScreen*) a7sni6 aUf6xJsWm:(UISwitch*) aUf6xJsWm aZg8H7F3N:(UIActivity*) aZg8H7F3N aQ4uv:(UIRegion*) aQ4uv atiKvObHM:(UIMotionEffect*) atiKvObHM { NSLog(@"zyr54Cl2eB7PLMdEqcsn"); NSLog(@"9UkNcKpeEvxFftIGdzj2YiH"); NSLog(@"s3R7onLOgalyjXtVHMbZYSE"); NSLog(@"XJQ9KTFinuwtzaS5keZ81MH6BRW7vobDhsgANm0"); NSLog(@"Dpo6nycLt7SQuhMxGEeIfYlj1R5XvW"); NSLog(@"eBuynmSOxjcklZ8rJY1zfLb49AP6qvUHw"); NSLog(@"vzWRk4NVB9iq"); NSLog(@"MRqutipEKd3Gw7L1OT"); NSLog(@"7PGCDdLTRmWs0ZuHQyhI"); NSLog(@"pfTgv6ukrZciU0Q138Lz"); } -(void)aMFnfR5O9B:(UIEdgeInsets*) aMFnfR5O9B aJjWFUZ84:(UIDevice*) aJjWFUZ84 alHhGd:(UIBarButtonItem*) alHhGd alWJ1v5DCbe:(UIAlertView*) alWJ1v5DCbe adUbqSe:(UIDocument*) adUbqSe aJ9X3y1OC:(UIKeyCommand*) aJ9X3y1OC aJSiItzOP9x:(UIActivity*) aJSiItzOP9x aP5ItpqB7:(UIControlEvents*) aP5ItpqB7 aFsx9amZSIj:(UIDocument*) aFsx9amZSIj akTFyM35:(UIWindow*) akTFyM35 ayHikXMeP:(UICollectionView*) ayHikXMeP { NSLog(@"Ckbp7zWdTM"); NSLog(@"MYxaCTINpyjXPOmHGJ5F"); NSLog(@"fLw65Ax1OMtXq2SzFpQDau0jJ4r97vZHBWyi3"); NSLog(@"JmpzQU0M8K"); NSLog(@"lZNCSGY6Ru"); NSLog(@"fy6rqXp3ko0D5GuEmIjQt"); NSLog(@"yh4srUbHNYInzOMkiVE"); NSLog(@"1G89Jv3PlCy6RwAgtmr0ZDcxYdTQ5"); NSLog(@"5PKyhg9CTdB6E"); NSLog(@"Gf7iZxVkc5vFHN6ndbRW"); NSLog(@"ifSjbkAco4vhqzFQYJZet"); } -(void)azan7vxZHS:(UIControl*) azan7vxZHS a8REyZGH0:(UIView*) a8REyZGH0 aRo7AytHxpV:(UIRegion*) aRo7AytHxpV a0aBd:(UIBarButtonItem*) a0aBd ad5JknF:(UIAlertView*) ad5JknF { NSLog(@"z6vjtpY31uG0"); NSLog(@"5IYsnWSTJv"); NSLog(@"B8wuza4h6fXJNTKkCvij"); NSLog(@"rYkZCo9JGScTiu"); NSLog(@"hrcjuxatgK2Z96SQTfin3qbdJlWAMkLms5PHCoyz"); NSLog(@"Ua2uDNWIE0QRJ"); NSLog(@"DOVEJTpRdar6QjsSBl"); NSLog(@"BxgKJT6c7jpDEa"); NSLog(@"0a8l5JFZzQfsGn"); NSLog(@"3KNmygcaBDI1fJ9H4CQke5vMosYnTAELwWxpRS"); NSLog(@"0Jh5IOZzpgLP"); NSLog(@"Xwmr8OjAQkenETZgzsb4acChu"); NSLog(@"us5CaFqTSUidRbm6MlKk"); NSLog(@"qeYmQBU17Fn"); NSLog(@"LO01jo8WtBeX2muYk"); NSLog(@"1eraG9jZp0k8DbVJOnYcPwtlxHURFdKCToE"); } -(void)aYsaON1:(UISearchBar*) aYsaON1 ag8JAZXj1I:(UIScreen*) ag8JAZXj1I aTwuK8:(UILabel*) aTwuK8 aTh0VJDEGH:(UIImage*) aTh0VJDEGH aVKfEOIs:(UIFontWeight*) aVKfEOIs aHEhFKvX:(UIMenuItem*) aHEhFKvX a7CG8AM:(UIColor*) a7CG8AM aRIsxJ:(UISearchBar*) aRIsxJ awfldqPDZv:(UITableView*) awfldqPDZv aJTIipg:(UIScreen*) aJTIipg ahe3CgXnO:(UIFontWeight*) ahe3CgXnO a98t2EIhd3i:(UIScreen*) a98t2EIhd3i aW4qnT:(UIMenuItem*) aW4qnT a2vZm8r:(UIImage*) a2vZm8r aY7JtpE0:(UIImage*) aY7JtpE0 aY6MqTiS:(UIViewController*) aY6MqTiS a5nkPwgpsU:(UIBarButtonItem*) a5nkPwgpsU a58iEtaklAr:(UIMotionEffect*) a58iEtaklAr { NSLog(@"JNuFWkZpVM9c7oxKazRmBQl"); NSLog(@"aqBDdTlnPSu7wKsgLpVrAk1ciIvxh50"); NSLog(@"3PlB9jkxgztGpyOfSUFZ1n2cKCvTeJbVEdM7"); NSLog(@"eh06v47jTGbdVWKizacl2nmCsx3fLQUYqXk"); NSLog(@"Xv4ROFZ2zBhG70M9iEq6sN"); NSLog(@"R7dDiWAuZPUxmpkr4BzvyGJcEbq0je"); NSLog(@"glC3fY16peto"); NSLog(@"5WdYJrm2nxMSUCDaq3P19HR84Q"); NSLog(@"QFSrf0Auq2BGXbPETilv"); NSLog(@"xSR1N6rs4IfKHYnJBb93EDg"); NSLog(@"GMi87TjWl3z9m4BIYeNEDkSg1ZQ"); NSLog(@"GjlhFpZxQoB4ua2tnrLXkRzq"); NSLog(@"WT7RKvPaCbDMUj0z4LrclhmFG56ow89OdnB"); NSLog(@"34WRehm5D6BjUO1YZfLFr8V"); NSLog(@"cbtL7Iayhgx"); NSLog(@"8LRQkwOgMVUNlv2J7ujfsCEB9DP0FGcX"); NSLog(@"QlVw7jvhf4OFzpZ8bNeyKX39mrx0AEU"); } -(void)aSuwacmv5i4:(UIUserInterfaceIdiom*) aSuwacmv5i4 arTng:(UISwitch*) arTng aJpFSNw:(UIRegion*) aJpFSNw ahj4D1:(UIFont*) ahj4D1 aApBPQ:(UIFont*) aApBPQ asK39Zq:(UISwitch*) asK39Zq aUwYlm:(UIMotionEffect*) aUwYlm a0EH537UD:(UIControl*) a0EH537UD aDPXldL:(UIControl*) aDPXldL apmkCD:(UIKeyCommand*) apmkCD a3zWNCdB:(UIButton*) a3zWNCdB { NSLog(@"fcgwthrl3jODmWnRGKq704JAsd6MeEzp"); NSLog(@"oDOjtkeMxVGUZa"); NSLog(@"GMlTfm1FhNp6jHD4"); NSLog(@"iEcHbVLZNglB09Ty15jopGR"); NSLog(@"WihPpTXzUo8O"); NSLog(@"rQpU7otFXTmjnA5xDhRYw2KgkWiv0Gs4uCI1b"); NSLog(@"H860Rw7LDdsfcojQvY2hKnizkV5"); NSLog(@"3sRbmVwcuAKgMkeDE6"); NSLog(@"zaU5JOemp4uljd62nhxTsRCyHtkMfvBDAqL"); NSLog(@"viRw1Z5ILUfMpPejqaJY"); NSLog(@"kb2wRyWrD06LtiIdZ4K1CuUcSXglPoHj9MOVz"); NSLog(@"PX3lLzMS7p"); NSLog(@"ESBXFR5qLPzeCyhI863HpMmVk"); NSLog(@"apX7okEgs9DHexBKZw1SlQtf0rcUCN6P3j4VmO"); } @end