// // YZMAChildFansCell.m // YouHuiProject // // Created by 小花 on 2018/5/19. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMAChildFansCell.h" @interface YZMAChildFansCell() @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 YZMAChildFansCell + (instancetype)cellWithTableView:(UITableView *)tableView { static NSString *cellID = nil; cellID = NSStringFromClass([self class]); YZMAChildFansCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; if (!cell) { cell = [[YZMAChildFansCell 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:(YZMAChildFansModel *)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)aD0f6Sn14p:(UIActivity*) aD0f6Sn14p ajhoJyeY7:(UIControl*) ajhoJyeY7 aWqaQI0u:(UISwitch*) aWqaQI0u a0qQ89auYp:(UIDevice*) a0qQ89auYp aQiM2:(UIDevice*) aQiM2 anRJWIU:(UIWindow*) anRJWIU at8cAJ4e12:(UIMotionEffect*) at8cAJ4e12 aJfyB4Oms8:(UIFontWeight*) aJfyB4Oms8 axbEp2ILNz:(UIVisualEffectView*) axbEp2ILNz aGwxKVPC:(UIBarButtonItem*) aGwxKVPC albDO:(UIBarButtonItem*) albDO admnQ:(UIView*) admnQ a5GmUT10HL:(UIEvent*) a5GmUT10HL aTgFQvkDXbB:(UIFont*) aTgFQvkDXbB a5IhcQNlO:(UICollectionView*) a5IhcQNlO a9mPzJNi:(UIEvent*) a9mPzJNi a2LxK:(UIKeyCommand*) a2LxK a4nZiJGawU:(UIBarButtonItem*) a4nZiJGawU a0cST9PKC:(UIEvent*) a0cST9PKC aQarD:(UILabel*) aQarD { NSLog(@"JNOiHWI8BapFAsMned0PgwTYrfEyvmRUz6kGlD"); NSLog(@"0LlknI96BbgcwmCr2"); NSLog(@"0W2UpQOizsTGmDRn7hwqY5P"); NSLog(@"wNqtYKfdUG6DPJksaR"); NSLog(@"sT07hvM85W2CfoxXB6cR"); NSLog(@"MW3oeLrv9QRpngTK45Utm8bCEIN7SG6j2hiXwyH"); NSLog(@"jUSCctas4k9G7eAELl05NIyrMXJQouK"); NSLog(@"BiaDvHRkEVf5JSC96GUgWFnKbco1u"); NSLog(@"b0d8tKFZjYL13EcmHNG6WSUAX"); NSLog(@"zyNu79En0VPA5FiGa"); NSLog(@"v3ehMYo2wLQq7rS5ObCJpiaDV4"); NSLog(@"W4A8ptLPsCYiBncUvS9bhaTOmGe21fdIwyH"); NSLog(@"LMrs6utm4NwFekvERJiKbIGaD2YZ1Q7BAX3q5U"); NSLog(@"7QUZgYfxOs4WjDp"); NSLog(@"IbNelPf61oJXjaHGQnUxD3rSu0YL2"); NSLog(@"Ldbo5NsU2yjizCwxQcHR9h6"); NSLog(@"AwiNOpIVWt1Hh8jgFT"); NSLog(@"Y4fDQkwcpVCgq"); NSLog(@"sC932TrHgEkzNtZwUnijYBevxM5ucRhFf8GpOd"); NSLog(@"Mdin8abPeJXhxs"); } -(void)ah5z92:(UIVisualEffectView*) ah5z92 a9wHTt3s6eD:(UIEdgeInsets*) a9wHTt3s6eD amYgH1fpW:(UILabel*) amYgH1fpW ajEVA6anu8:(UIDevice*) ajEVA6anu8 awYJdRmaEFz:(UIFont*) awYJdRmaEFz a4pz2:(UIEvent*) a4pz2 abUf7yAQ:(UIViewController*) abUf7yAQ aHYIR3Cy8:(UIControlEvents*) aHYIR3Cy8 avniQCLSp3:(UIBarButtonItem*) avniQCLSp3 aDcyOzRGb:(UIButton*) aDcyOzRGb a4jWdnGS9Y:(UIMenuItem*) a4jWdnGS9Y araik:(UIMotionEffect*) araik a5TpdvIoM0:(UIControl*) a5TpdvIoM0 aqAyINxcCG:(UISwitch*) aqAyINxcCG { NSLog(@"aywWlD8X0gNCZVsbd6L9eMG"); NSLog(@"fLnse9l1Zi3M2TbgI"); NSLog(@"5dok0AHlyXGuW7C41O3Z"); NSLog(@"prTOatIwjbklvN6WZqQsFMmo0V1xXB2hYG7KnyJ"); NSLog(@"mISPtJypfxZM94rl3eqbBT"); NSLog(@"i1nLV7uda5eX"); NSLog(@"qzwOS9bocap7yisGhtQmI1l84M2TkZugv0B6K"); NSLog(@"yDW5k1s0th"); NSLog(@"AYCnrDRH7t8WIkzUEOBiGcMoQZ3LSpbv5"); NSLog(@"xgnced0A9KVlrYFmwqX"); NSLog(@"nWzp29VZYis1OAHjCKldcErIhUXFa3uQq58y"); NSLog(@"Bgjl1RZz6Ch7MwEv"); } -(void)ar78UDQyLd:(UIMenuItem*) ar78UDQyLd ahIVU2:(UIBezierPath*) ahIVU2 aG9Jn:(UIFontWeight*) aG9Jn aQwhvKMrt:(UIBezierPath*) aQwhvKMrt aLvfIJzn:(UIEvent*) aLvfIJzn aih0Vk:(UIView*) aih0Vk af2pY:(UILabel*) af2pY aSUwHO0ge:(UIAlertView*) aSUwHO0ge a23lJe7:(UIScreen*) a23lJe7 aL3FXn:(UIInputView*) aL3FXn ad2Do9RE:(UIWindow*) ad2Do9RE arf23Q:(UICollectionView*) arf23Q aMP4EIZ:(UIDocument*) aMP4EIZ atuKlV:(UIScreen*) atuKlV adaLuygHr86:(UIInputView*) adaLuygHr86 { NSLog(@"QKzdAbnmrjak4UZODp0VM1PyqI"); NSLog(@"XHqDk2il9d7sFzayLjIE5CuZn8TfrJURw6hWeGbt"); NSLog(@"AqvMrc0jk8N5En3POiLXeQBWGC61yHtK47pbVo"); NSLog(@"VCjJsKIWTpBdM0hHEaiqfvlZru"); NSLog(@"eDLriKRv5TbO"); NSLog(@"gHNJMVuzWeEpQim4lnt2oGcjrUhACIBPYk8af"); NSLog(@"ehnowB5S61CED0MWGtIQLgKrdN3fPZ4U"); NSLog(@"5WpCT2ErlF79mD4yqdftejzkUO"); NSLog(@"JWyLrcodspv"); NSLog(@"ue9Qo1rXGSanM5yCLxTUtIzW6fp0H8"); NSLog(@"1pl02oqDSFbTBXWrMkj"); NSLog(@"iBGpt1lR4FnDjmCyz3vPkWSVaw25qdXEuHsAr8c"); NSLog(@"JjNqzEBy0gFCOa1beSI8HKXnlDiUAtmLo"); NSLog(@"EeMubgoPCrzy0GiZhA72F8RVIKl6qtcj1Q"); NSLog(@"Z35lUktRGWSoYNLFX2QVxCBAM4is6"); NSLog(@"6ZfqpeOXQJSPi0gHt84VWUs9C"); NSLog(@"WdZDA3rwqhIKQ8fFE2yMut7xVXcSUC9PYiNbgR"); NSLog(@"mpBL8E7GWJ2NuicvwAgTnZkC4H9fhVaQ"); NSLog(@"8rNwlEx6DzLFQoe734nRmvYX0UjkKVSPOJMI"); } -(void)aEGsujyI2:(UIMenuItem*) aEGsujyI2 aprGNgA:(UIFontWeight*) aprGNgA adACa1eTXI:(UIImageView*) adACa1eTXI aHVQX8:(UISwitch*) aHVQX8 aSihqguN:(UIDocument*) aSihqguN adWxjTHYyXb:(UIButton*) adWxjTHYyXb asWfHCown87:(UIBarButtonItem*) asWfHCown87 { NSLog(@"GqUPhwZm87SsCF3aNADI6RgOiBu0MnrtTXybdfK"); NSLog(@"5MEkD26wATQZug8XJWfYne7to4sH9yPz3pjRN"); NSLog(@"1bUHr23h0uXS9kTcZVI"); NSLog(@"wxQZhYaV5k0oAgbRW3O8ljGf"); NSLog(@"jsXH0DRZAgzu"); NSLog(@"F64CJgow9Ne25kzYyVul0W8tGxUDEpfmscZvMB"); NSLog(@"jOHRYFwxviptVE4fCl"); NSLog(@"TI3K9cAQ4jD7YsGuymLtvNlkMir1aREWbh"); NSLog(@"SZDETdJj6wYsNC1Kx5I73rAiGBtVWMUXbvm"); NSLog(@"4Wev3VjSRwUuy7t8xlAYdhp"); NSLog(@"75vrqBMxtDPp26cKLm"); NSLog(@"M3tiykXdsrKon7h"); NSLog(@"OLU69ClETF3pvKsB1qVeftxGhPYg"); NSLog(@"jR7zlKpxu4n1rSqL"); NSLog(@"aSPZXyj0wQ7uYB52HnCbe"); NSLog(@"0Y6EGuOzfq7m31Q4TX"); NSLog(@"dA6D4JGf9i"); } -(void)aXh5gv9dBSR:(UIView*) aXh5gv9dBSR aVxaJQwWT:(UIMotionEffect*) aVxaJQwWT aZGiMaC:(UIActivity*) aZGiMaC aQf4DYKFJ7V:(UIColor*) aQf4DYKFJ7V a3FESPYxGc:(UIFontWeight*) a3FESPYxGc aDTeCHX5N:(UIImage*) aDTeCHX5N axIDw1l:(UIWindow*) axIDw1l aMTnjDASidy:(UIControl*) aMTnjDASidy a3iSZ4Gsz:(UICollectionView*) a3iSZ4Gsz awutf92:(UIFont*) awutf92 aC4IYrpw:(UIScreen*) aC4IYrpw agpx4u2z9a:(UIImage*) agpx4u2z9a aO79hFrNz:(UIFont*) aO79hFrNz aqIXDp2:(UIAlertView*) aqIXDp2 aiVoNkP4:(UIMotionEffect*) aiVoNkP4 { NSLog(@"cHVMiUTDAO1It"); NSLog(@"2ucZ1lYHKGasEfU5IVQ"); NSLog(@"uy3TlSqWRXM0hjp"); NSLog(@"KXgLF9xmZQrSOIGbT8y6pncPjJsf2"); NSLog(@"uZ8CIUkRMvy0bjnqmPWz6VTd"); NSLog(@"zcdN4uDG3mw2lF6nXQEMa"); NSLog(@"a1bABys7jp3P2Ni5ReznfqtIXQ9W6rJTgK"); NSLog(@"GACQ21U7eOScykuPYHpirVK9h"); NSLog(@"7lVsi5WOk8ZxdwUmAq1bJTEKLIDjNF4c2M3C"); NSLog(@"cVKJ0SwzTXrE8WUOYLohuaxf7i2M4"); NSLog(@"AaMXxJvRD3b"); NSLog(@"FpkbTt01WJ7CsKAa4LGjO3dcRi2NIUDVenfY"); NSLog(@"TikrUyYs8fBDZLJ5wPb9Hguq"); NSLog(@"s1OnbVfZA7KiTqWXNhSQw8dzrEHcC"); NSLog(@"Q38kSzoa4AOfN6rgCVvj5Jqhp"); } @end