// // KankanListCollectionViewCell.m // Ifish // // Created by imac on 16/11/8. // Copyright © 2016年 lianxiang. All rights reserved. // #import "KankanListCollectionViewCell.h" #import "UIImageView+WebCache.h" @implementation KankanListCollectionViewCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } -(void)loadDataAt:(NSIndexPath *)indexPath withListModel:(IfishKankanListModel*)model { if (indexPath.section==1) { } self.userNameLabel.text = model.nickname; self.userNameLabel.userInteractionEnabled = YES; self.roomDesc.text = model.room_name; self.roomDesc.userInteractionEnabled = YES; //获取系统当前的时间戳 防止缓存 //NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0]; //NSTimeInterval time=[dat timeIntervalSince1970]*1000; //NSString *timeString = [NSString stringWithFormat:@"%.0f",time]; //NSString * imgUrl = [NSString stringWithFormat:@"%@/room/%@.png?time=%@",JIEKOUPORTHTTP,model.room_id,timeString]; NSString * imgUrl = [NSString stringWithFormat:@"%@/room/%@.png",JIEKOUPORTHTTP,model.room_id]; self.faceImg.userInteractionEnabled = YES; [self.faceImg sd_setImageWithURL:[NSURL URLWithString:imgUrl] placeholderImage:[UIImage imageNamed:@"live_hold"]]; if (!model.userType) { model.userType = @"0"; } if ([model.userType isEqualToString:@"1"]) { self.renZhengImg.hidden =NO; self.renZhengImg.image = [UIImage imageNamed:@"look_home_attestation"]; }else{ self.renZhengImg.image = nil; self.renZhengImg.hidden =YES; } self.punlunNumber.text = [NSString stringWithFormat:@"%d",model.pinglunNum]; } @end