房间相册
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
//////充值banner位
|
||||
@property(nonatomic,copy) NSArray *bannerList;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPIAPRechargeViewController
|
||||
@@ -213,11 +214,15 @@
|
||||
[self showSuccessToast:YMLocalizedString(@"XPIAPRechargeViewController11")];
|
||||
return;
|
||||
}
|
||||
RechargeListModel *model = [self.dataSource safeObjectAtIndex1:self.selectedIndex.row];
|
||||
if (model.chargeProdId) {
|
||||
[XNDJTDDLoadingTool showOnlyView:kWindow];
|
||||
[self.presenter requestIAPRechargeOrderWithChargeProdId:model.chargeProdId];
|
||||
NSInteger index = self.bannerList.count > 0 ? self.selectedIndex.row - 1 : self.selectedIndex.row;
|
||||
if(index < self.dataSource.count){
|
||||
RechargeListModel *model = [self.dataSource safeObjectAtIndex1:index];
|
||||
if (model.chargeProdId) {
|
||||
[XNDJTDDLoadingTool showOnlyView:kWindow];
|
||||
[self.presenter requestIAPRechargeOrderWithChargeProdId:model.chargeProdId];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)protcoloButtonAction:(UIButton *)sender {
|
||||
@@ -246,6 +251,11 @@
|
||||
}
|
||||
- (void)getBannerListSuccessWithList:(NSArray *)list{
|
||||
self.bannerList = list;
|
||||
if(self.bannerList.count > 0){
|
||||
self.selectedIndex = [NSIndexPath indexPathForRow:1 inSection:0];
|
||||
}else{
|
||||
self.selectedIndex = [NSIndexPath indexPathForRow:0 inSection:0];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
///批量验证
|
||||
@@ -467,7 +477,10 @@
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.dataSource.count + self.bannerList.count;
|
||||
if(self.bannerList.count > 0){
|
||||
return self.dataSource.count + 1;
|
||||
}
|
||||
return self.dataSource.count;
|
||||
}
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return self.bannerList.count > 0 && indexPath.row == 0 ? CGSizeMake(KScreenWidth, kGetScaleWidth(114)) : CGSizeMake(KScreenWidth, kGetScaleWidth(80));
|
||||
|
Reference in New Issue
Block a user