修正首页排行榜显示判断
This commit is contained in:
@@ -113,8 +113,12 @@
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPNewHomeItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomeItemCell class]) forIndexPath:indexPath];
|
||||
if(indexPath.row < self.itemList.count){
|
||||
cell.itemModel = self.itemList[indexPath.row];
|
||||
cell.rankAvatarsModelArray = self.rankAvatars;
|
||||
if (indexPath.row == 0) {
|
||||
cell.rankAvatarsModelArray = self.rankAvatars;
|
||||
cell.itemModel = self.itemList[indexPath.row];
|
||||
} else {
|
||||
cell.itemModel = self.itemList[indexPath.row];
|
||||
}
|
||||
}
|
||||
@kWeakify(self);
|
||||
cell.didTapRankArea = ^{
|
||||
|
@@ -165,7 +165,7 @@
|
||||
}
|
||||
-(void)setItemModel:(PIHomeItemModel *)itmeModel{
|
||||
_itemModel = itmeModel;
|
||||
if ([itmeModel.ID isEqualToString:@"3"]) {
|
||||
if (self.rankAvatarsModelArray.count > 0) {
|
||||
_bgImageView.image = [UIImage imageNamed:@"home_rank_Heads_bg"];
|
||||
} else {
|
||||
_bgImageView.layer.cornerRadius = kGetScaleWidth(12);
|
||||
@@ -178,9 +178,9 @@
|
||||
}
|
||||
|
||||
- (void)setRankAvatarsModelArray:(NSArray<HomeRankAvatarModel *> *)rankAvatarsModelArray {
|
||||
if (![self.itemModel.ID isEqualToString:@"3"]) {
|
||||
return;
|
||||
}
|
||||
// if (![self.itemModel.ID isEqualToString:@"3"]) {
|
||||
// return;
|
||||
// }
|
||||
if (rankAvatarsModelArray.count>0) {
|
||||
_rankAvatarsModelArray = rankAvatarsModelArray;
|
||||
if (!self.pi_BannerView.superview) {
|
||||
|
Reference in New Issue
Block a user