1.返回数组里,有空数据
//判断服务器返回List类型
+ (BOOL)arrayIfNull:(id)source;
//判断服务器返回List类型
+ (BOOL)arrayIfNull:(id)source
{
if ([source isKindOfClass:[NSArray class]]) {
return YES;
}else{
return NO;
}
}
if ([Collect arrayIfNull:[[dataArrayList_ objectAtIndex:indexPath.row] objectForKey:@"imgList"]]) {
goodImg = [Collect replaceNull:[[[dataArrayList_ objectAtIndex:indexPath.row] objectForKey:@"imgList"] firstObject]];
[cell.goodImg sd_setImageWithURL:[NSURL URLWithString:goodImg] placeholderImage:SD_WEB_IMAGE];
}else{
[cell.goodImg removeFromSuperview];
}