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