Compare commits

...

3 Commits

Author SHA1 Message Date
eggmanQQQ
6af3be305f fix:修正阿语房间背景价格显示问题 2024-11-15 16:33:27 +08:00
eggmanQQQ
5f277f648d fix: 修正首页列表加载逻辑 | 修正部分 UI 效果 2024-11-15 15:58:01 +08:00
eggmanQQQ
bede4a80c7 fix:修正首页列表显示问题 2024-11-15 11:02:04 +08:00
18 changed files with 90 additions and 100 deletions

View File

@@ -101,6 +101,7 @@ HWDMP4PlayDelegate>
@implementation XPMineUserInfoViewController @implementation XPMineUserInfoViewController
- (void)dealloc { - (void)dealloc {
[self hideHUD];
[[NSNotificationCenter defaultCenter]removeObserver:self]; [[NSNotificationCenter defaultCenter]removeObserver:self];
} }

View File

@@ -23,7 +23,6 @@
if (self) { if (self) {
[self addSubview:self.frameImageView]; [self addSubview:self.frameImageView];
[self addSubview:self.numLabel]; [self addSubview:self.numLabel];
// [self addSubview:self.copiedImageView];
[self.frameImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.frameImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.leading.bottom.mas_equalTo(self); make.top.leading.bottom.mas_equalTo(self);
@@ -40,11 +39,6 @@
} }
make.centerY.mas_equalTo(self).offset(0.8); make.centerY.mas_equalTo(self).offset(0.8);
}]; }];
// [self.copiedImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.trailing.centerY.mas_equalTo(self);
// make.size.mas_equalTo(CGSizeMake(14, 14));
// }];
} }
return self; return self;
} }
@@ -53,7 +47,7 @@
_num = num; _num = num;
self.numLabel.text = num; self.numLabel.text = num;
UIImage *longBackgroundImage = [UIImage imageNamed:@"user_info_id_beatiful_mark_short"]; UIImage *longBackgroundImage = kImage(@"user_info_id_beatiful_mark_short");
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 27, 0, 14); UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 27, 0, 14);
UIImage *resizableImage = [longBackgroundImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch]; UIImage *resizableImage = [longBackgroundImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
self.frameImageView.image = resizableImage; self.frameImageView.image = resizableImage;
@@ -62,7 +56,10 @@
- (UIImageView *)frameImageView { - (UIImageView *)frameImageView {
if (!_frameImageView) { if (!_frameImageView) {
_frameImageView = [[UIImageView alloc] init]; _frameImageView = [[UIImageView alloc] init];
_frameImageView.image = [UIImage imageNamed:@"user_info_id_beatiful_mark_short"]; UIImage *longBackgroundImage = kImage(@"user_info_id_beatiful_mark_short");
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 27, 0, 14);
UIImage *resizableImage = [longBackgroundImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
_frameImageView.image = resizableImage;//Image(@"user_info_id_beatiful_mark_short");
} }
return _frameImageView; return _frameImageView;
} }
@@ -71,7 +68,7 @@
if (!_copiedImageView) { if (!_copiedImageView) {
_copiedImageView = [[UIImageView alloc] init]; _copiedImageView = [[UIImageView alloc] init];
_copiedImageView.contentMode = UIViewContentModeScaleAspectFit; _copiedImageView.contentMode = UIViewContentModeScaleAspectFit;
_copiedImageView.image = [UIImage getLanguageImage:@"user_card_copy_id1"]; _copiedImageView.image = kImage(@"user_card_copy_id1");
} }
return _copiedImageView; return _copiedImageView;
} }

View File

@@ -45,22 +45,22 @@
- (instancetype)initWithFrame:(CGRect)frame { - (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) { if (self = [super initWithFrame:frame]) {
[self.contentView addSubview:self.imageView]; [self.contentView addSubview:self.imageView];
[self.contentView addSubview:self.titleLabel]; // [self.contentView addSubview:self.titleLabel];
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.contentView); make.edges.mas_equalTo(self.contentView);
}]; }];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { // [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.contentView); // make.center.mas_equalTo(self.contentView);
}]; // }];
} }
return self; return self;
} }
- (void)updateCell:(NameplateModel *)model { - (void)updateCell:(NameplateModel *)model {
self.titleLabel.hidden = !model.isCustomWord; // self.titleLabel.hidden = !model.isCustomWord;
self.titleLabel.text = model.word; // self.titleLabel.text = model.word;
self.imageView.imageUrl = model.nameplateImage; self.imageView.imageUrl = model.nameplateImage;
} }
@@ -188,7 +188,7 @@ UICollectionViewDelegateFlowLayout>
CGFloat cellHeight = 20; CGFloat cellHeight = 20;
// collectionView // collectionView
CGFloat sidePadding = kGetScaleWidth(15) * 2; // 15 CGFloat sidePadding = kGetScaleWidth(15); // 15
CGFloat itemSpacing = 4; // cell CGFloat itemSpacing = 4; // cell
CGFloat lineSpacing = 2; // CGFloat lineSpacing = 2; //
@@ -204,7 +204,7 @@ UICollectionViewDelegateFlowLayout>
NSInteger rows = (list.count + itemsPerRow - 1) / itemsPerRow; NSInteger rows = (list.count + itemsPerRow - 1) / itemsPerRow;
// = cell + // = cell +
namePlateHeight = rows * cellHeight + (rows - 1) * lineSpacing; namePlateHeight = rows * cellHeight + rows * lineSpacing;
} }
return namePlateHeight; return namePlateHeight;
@@ -235,7 +235,7 @@ UICollectionViewDelegateFlowLayout>
} }
// topAlbum + cp + name plate area + line contents + others // topAlbum + cp + name plate area + line contents + others
height = kGetScaleWidth(195) + 170 + [self namePlateHeight:model.userNameplateList] + (lineHeight * numberOfLines) + kGetScaleWidth(220); height = kGetScaleWidth(195) + 160 + [self namePlateHeight:model.userNameplateList] + (lineHeight * numberOfLines) + kGetScaleWidth(220);
return height; return height;
} }
@@ -418,7 +418,7 @@ UICollectionViewDelegateFlowLayout>
[self.beautIDView mas_makeConstraints:^(MASConstraintMaker *make) { [self.beautIDView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(24); make.height.mas_equalTo(24);
make.width.mas_greaterThanOrEqualTo(60); make.width.mas_greaterThanOrEqualTo(10);
}]; }];
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -448,7 +448,7 @@ UICollectionViewDelegateFlowLayout>
[self.nameplateCollectionView mas_makeConstraints:^(MASConstraintMaker *make) { [self.nameplateCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(30); make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(30);
make.leading.mas_equalTo(self.userInfoView).offset(kGetScaleWidth(15)); make.leading.mas_equalTo(self.userInfoView).offset(kGetScaleWidth(15));
make.trailing.mas_equalTo(self.userInfoView).offset(kGetScaleWidth(-15)); make.trailing.mas_equalTo(self.userInfoView);//.offset(kGetScaleWidth(-15));
make.height.mas_equalTo(0); make.height.mas_equalTo(0);
}]; }];
} }
@@ -783,7 +783,9 @@ UICollectionViewDelegateFlowLayout>
[self.nameplateCollectionView mas_updateConstraints:^(MASConstraintMaker *make) { [self.nameplateCollectionView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo([XPMineUserInfoHeaderView namePlateHeight:nameplateList]); make.height.mas_equalTo([XPMineUserInfoHeaderView namePlateHeight:nameplateList]);
}]; }];
[self.nameplateCollectionView reloadData]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.nameplateCollectionView reloadData];
});
} }
- (void)updateNameAndGenderInfo { - (void)updateNameAndGenderInfo {
@@ -1050,7 +1052,6 @@ UICollectionViewDelegateFlowLayout>
_pageButton.backgroundColor = UIColorRGBAlpha(0x000000, 0.6); _pageButton.backgroundColor = UIColorRGBAlpha(0x000000, 0.6);
_pageButton.layer.cornerRadius = 9; _pageButton.layer.cornerRadius = 9;
_pageButton.layer.masksToBounds = YES; _pageButton.layer.masksToBounds = YES;
} }
return _pageButton; return _pageButton;
} }
@@ -1316,7 +1317,7 @@ UICollectionViewDelegateFlowLayout>
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(72, 20); layout.itemSize = CGSizeMake(72, 20);
layout.minimumLineSpacing = 2; layout.minimumLineSpacing = 2;
layout.minimumInteritemSpacing = 2; layout.minimumInteritemSpacing = 4;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
_nameplateCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; _nameplateCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_nameplateCollectionView.backgroundColor = [UIColor clearColor]; _nameplateCollectionView.backgroundColor = [UIColor clearColor];

View File

@@ -54,7 +54,6 @@
- (void)getHomeAllTopsData { - (void)getHomeAllTopsData {
RACSubject *banner = [RACSubject subject]; RACSubject *banner = [RACSubject subject];
RACSubject *banner_2 = [RACSubject subject];
RACSubject *menu = [RACSubject subject]; RACSubject *menu = [RACSubject subject];
RACSubject *rank = [RACSubject subject]; RACSubject *rank = [RACSubject subject];
@@ -62,10 +61,6 @@
return [RACSignal return:nil]; return [RACSignal return:nil];
}]; }];
RACSignal *bannerSignal_2 = [banner_2 catch:^RACSignal *(NSError *error) {
return [RACSignal return:nil];
}];
RACSignal *menuSignal = [menu catch:^RACSignal *(NSError *error) { RACSignal *menuSignal = [menu catch:^RACSignal *(NSError *error) {
return [RACSignal return:nil]; return [RACSignal return:nil];
}]; }];
@@ -119,15 +114,6 @@
[rank sendError:nil]; [rank sendError:nil];
[rank sendCompleted]; [rank sendCompleted];
}]]; }]];
// [Api getHomeSecondBannerCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
// NSArray * array = [HomeBannerInfoModel modelsWithArray:data.data];
// [banner_2 sendNext:array];
// [banner_2 sendCompleted];
// }fail:^(NSInteger code, NSString * _Nullable msg) {
// [banner_2 sendError:nil];
// [banner_2 sendCompleted];
// } errorToast:NO] uid:uid type:@"1"];
} }
/// ///

View File

@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
// @param pageSize 一页有多少个 - 默认 20 // @param pageSize 一页有多少个 - 默认 20
- (void)getRecommendRoomList:(NSString *)tabId page:(NSInteger)page; - (void)getRecommendRoomList:(NSString *)tabId page:(NSInteger)page;
- (void)loadSecondBanner;
/// 获取更多的个播房间 /// 获取更多的个播房间
- (void)getHomeMoreAnchorRoomList; - (void)getHomeMoreAnchorRoomList;

View File

@@ -21,17 +21,11 @@
/// @param page /// @param page
- (void)getRecommendRoomList:(NSString *)tabId page:(NSInteger)page { - (void)getRecommendRoomList:(NSString *)tabId page:(NSInteger)page {
@kWeakify(self); @kWeakify(self);
[Api getHomeTabRoomsCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [Api getHomeTabRoomsCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
@kStrongify(self); @kStrongify(self);
NSArray * array = [HomePlayRoomModel modelsWithArray:data.data]; NSArray * array = [HomePlayRoomModel modelsWithArray:data.data];
[[self getView] getHomeRecommendRoomListSuccess:array]; [[self getView] getHomeRecommendRoomListSuccess:array];
if (page == 1
//&& [tabId isEqualToString: @"21"]
) {
[self loadSecondBanner];
}
}fail:^(NSInteger code, NSString * _Nullable msg) { }fail:^(NSInteger code, NSString * _Nullable msg) {
@kStrongify(self); @kStrongify(self);
[[self getView] getHomeRecommendRoomListFail:msg ]; [[self getView] getHomeRecommendRoomListFail:msg ];
@@ -39,8 +33,6 @@
pageNum:[NSString stringWithFormat:@"%ld", page] pageNum:[NSString stringWithFormat:@"%ld", page]
pageSize:@"50" pageSize:@"50"
tabId:tabId]; tabId:tabId];
} }
- (void)loadSecondBanner { - (void)loadSecondBanner {

View File

@@ -60,7 +60,9 @@
NSMutableArray * array = [NSMutableArray array]; NSMutableArray * array = [NSMutableArray array];
[_bannerList enumerateObjectsUsingBlock:^(HomeBannerInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { [_bannerList enumerateObjectsUsingBlock:^(HomeBannerInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.bannerPic.length > 0) { if (obj.bannerPic.length > 0) {
[array addObject:obj.bannerPic]; NSCharacterSet *allowedCharacters = [NSCharacterSet URLFragmentAllowedCharacterSet];
NSString *encodedURLString = [obj.bannerPic stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters];
[array addObject:encodedURLString];
} else { } else {
[array addObject:@""]; [array addObject:@""];
} }

View File

@@ -54,7 +54,9 @@
NSMutableArray *picArray = @[].mutableCopy; NSMutableArray *picArray = @[].mutableCopy;
for (HomeBannerInfoModel *model in bannerInfoList) { for (HomeBannerInfoModel *model in bannerInfoList) {
if (![NSString isEmpty:model.bannerPic]) { if (![NSString isEmpty:model.bannerPic]) {
[picArray addObject:model.bannerPic]; NSCharacterSet *allowedCharacters = [NSCharacterSet URLFragmentAllowedCharacterSet];
NSString *encodedURLString = [model.bannerPic stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters];
[picArray addObject:encodedURLString];
} }
} }
self.bannerView.imageURLStringsGroup = picArray.copy; self.bannerView.imageURLStringsGroup = picArray.copy;
@@ -74,7 +76,7 @@
_bannerView.pageControlDotSize = CGSizeMake(3, 3); _bannerView.pageControlDotSize = CGSizeMake(3, 3);
_bannerView.pageDotColor = [UIColor lightGrayColor]; _bannerView.pageDotColor = [UIColor lightGrayColor];
_bannerView.currentPageDotColor = [UIColor darkGrayColor]; _bannerView.currentPageDotColor = [UIColor darkGrayColor];
_bannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill; _bannerView.bannerImageViewContentMode = UIViewContentModeScaleToFill;
if (isMSRTL()) { if (isMSRTL()) {
for (UIView *subView in _bannerView.subviews) { for (UIView *subView in _bannerView.subviews) {
subView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; subView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
@@ -98,7 +100,7 @@
@interface XPHomePartyViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, XPHomeProtocol> @interface XPHomePartyViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, XPHomeProtocol>
/// ///
@property (nonatomic,strong) NSMutableArray *datasource; @property (nonatomic,strong) NSMutableArray *datasource;
@property (nonatomic,strong) NSMutableArray *displayDatasource;
/// ///
@property (nonatomic,strong) UICollectionView *collectionView; @property (nonatomic,strong) UICollectionView *collectionView;
/// ///
@@ -152,8 +154,7 @@
} else if([self.tagModel.id isEqualToString:@"-1"]){ } else if([self.tagModel.id isEqualToString:@"-1"]){
[self.presenter getHomePersonalRoomList]; [self.presenter getHomePersonalRoomList];
} else{ } else{
[self.presenter getRecommendRoomList:self.tagModel.id [self.presenter loadSecondBanner];
page:self.page];
} }
} }
@@ -172,13 +173,13 @@
#pragma mark - UICollectionViewDelegate And UICollectionViewDataSource #pragma mark - UICollectionViewDelegate And UICollectionViewDataSource
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
if(self.displayDatasource.count == 0){ if(self.datasource.count == 0){
XPGuildEmptyCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGuildEmptyCollectionViewCell class]) forIndexPath:indexPath]; XPGuildEmptyCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPGuildEmptyCollectionViewCell class]) forIndexPath:indexPath];
[cell setConstraints]; [cell setConstraints];
[cell setTitle:YMLocalizedString(@"XPGuildEmptyCollectionViewCell0")]; [cell setTitle:YMLocalizedString(@"XPGuildEmptyCollectionViewCell0")];
return cell; return cell;
} }
id item = [self.displayDatasource xpSafeObjectAtIndex:indexPath.row]; id item = [self.datasource xpSafeObjectAtIndex:indexPath.row];
if ([item isKindOfClass:[NSArray class]]) { if ([item isKindOfClass:[NSArray class]]) {
HomePartyBannerCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([HomePartyBannerCell class]) HomePartyBannerCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([HomePartyBannerCell class])
forIndexPath:indexPath]; forIndexPath:indexPath];
@@ -193,24 +194,24 @@
return cell; return cell;
} else { } else {
XPNewHomePartyCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomePartyCollectionViewCell class]) forIndexPath:indexPath]; XPNewHomePartyCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPNewHomePartyCollectionViewCell class]) forIndexPath:indexPath];
cell.roomInfo = [self.displayDatasource xpSafeObjectAtIndex:indexPath.row]; cell.roomInfo = [self.datasource xpSafeObjectAtIndex:indexPath.row];
return cell; return cell;
} }
} }
- (NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - (NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
if(self.displayDatasource.count == 0) { if(self.datasource.count == 0) {
return 1; return 1;
} }
return self.displayDatasource.count; return self.datasource.count;
} }
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
if(self.displayDatasource.count == 0) { if(self.datasource.count == 0) {
return self.collectionView.frame.size; return self.collectionView.frame.size;
} }
id item = [self.displayDatasource xpSafeObjectAtIndex:indexPath.row]; id item = [self.datasource xpSafeObjectAtIndex:indexPath.row];
if ([item isKindOfClass:[NSArray class]]) { if ([item isKindOfClass:[NSArray class]]) {
return CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(118)); return CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(118));
} else { } else {
@@ -219,7 +220,7 @@
} }
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
id item = [self.displayDatasource xpSafeObjectAtIndex:indexPath.row]; id item = [self.datasource xpSafeObjectAtIndex:indexPath.row];
if ([item isKindOfClass:[NSArray class]]) { if ([item isKindOfClass:[NSArray class]]) {
} else { } else {
@@ -246,11 +247,11 @@
[[NSNotificationCenter defaultCenter] postNotificationName:@"khomeVCRefreshComplete" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"khomeVCRefreshComplete" object:nil];
} }
- (void)sortDataSource { - (NSMutableArray *)insertBannerData:(NSArray *)firstPageList {
NSMutableArray *mutableArrayA = [self.datasource mutableCopy]; NSMutableArray *mutableArrayA = [firstPageList mutableCopy];
NSInteger insertIndex = 5;
if (self.bannerInfoList.count > 0) { if (self.bannerInfoList.count > 0) {
NSInteger insertIndex = 5;
if (mutableArrayA.count < insertIndex) { if (mutableArrayA.count < insertIndex) {
[mutableArrayA addObject:self.bannerInfoList]; [mutableArrayA addObject:self.bannerInfoList];
} else { } else {
@@ -258,33 +259,34 @@
} }
} }
self.displayDatasource = mutableArrayA.mutableCopy; return mutableArrayA;
[self.collectionView reloadData];
} }
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list{ - (void)getHomeRecommendRoomListSuccess:(NSArray *)list{
[self.collectionView.mj_footer endRefreshing];
for (HomePlayRoomModel *model in list) { for (HomePlayRoomModel *model in list) {
model.width = [UILabel getWidthWithText:@(model.onlineNum).stringValue height:kGetScaleWidth(12) font:kFontBold(10)]+1; model.width = [UILabel getWidthWithText:@(model.onlineNum).stringValue height:kGetScaleWidth(12) font:kFontBold(10)]+1;
} }
if(self.page == 1){ if(self.page == 1){
self.datasource = [NSMutableArray arrayWithArray:list]; self.datasource = [self insertBannerData:list];
[self sortDataSource];
}else{ }else{
[self.datasource addObjectsFromArray:list]; [self.datasource addObjectsFromArray:list];
} }
[self.collectionView reloadData];
[[NSNotificationCenter defaultCenter]postNotificationName:@"khomeVCRefreshComplete" object:nil]; [[NSNotificationCenter defaultCenter]postNotificationName:@"khomeVCRefreshComplete" object:nil];
[self.collectionView.mj_footer endRefreshing];
} }
- (void)getHomeSecondBannerSuccess:(NSArray *)banners { - (void)getHomeSecondBannerSuccess:(NSArray *)banners {
self.bannerInfoList = banners; self.bannerInfoList = banners;
[self sortDataSource]; [self.presenter getRecommendRoomList:self.tagModel.id
page:self.page];
} }
- (void)getHomeRecommendRoomListFail:(NSString *)message{ - (void)getHomeRecommendRoomListFail:(NSString *)message{
self.page--;
[self.collectionView.mj_footer endRefreshing]; [self.collectionView.mj_footer endRefreshing];
[[NSNotificationCenter defaultCenter]postNotificationName:@"khomeVCRefreshComplete" object:nil]; [[NSNotificationCenter defaultCenter]postNotificationName:@"khomeVCRefreshComplete" object:nil];
} }

View File

@@ -23,10 +23,10 @@
} }
- (NSString *)pricePerDays { - (NSString *)pricePerDays {
return [NSString stringWithFormat:@"%@/%@%@", NSString *content =[NSString stringWithFormat:@"%@/%@",
@(self.goldPrice), @(self.goldPrice),
@(self.buyHour/24), @(self.buyHour/24)];
YMLocalizedString(@"1.0.18_8")]; return [NSString stringWithFormat:YMLocalizedString(@"1.0.18_8"), content];
} }
- (BOOL)isAlreadyPay { - (BOOL)isAlreadyPay {

View File

@@ -1086,24 +1086,6 @@ HWDMP4PlayDelegate>
} }
- (void)playUserEnterRoomAnimation:(NSString *)title experLevelSeq:(NSInteger)experLevelSeq effectPath:(NSString *)effectPath { - (void)playUserEnterRoomAnimation:(NSString *)title experLevelSeq:(NSInteger)experLevelSeq effectPath:(NSString *)effectPath {
NSString * path;
if (experLevelSeq >= 30 && experLevelSeq <= 39) {
path = @"svga_member_in_lv30";
} else if (experLevelSeq >= 40 && experLevelSeq <= 49) {
path = @"svga_member_in_lv40";
} else if (experLevelSeq >= 50 && experLevelSeq <= 59) {
path = @"svga_member_in_lv50";
} else if (experLevelSeq >= 60 && experLevelSeq <= 69) {
path = @"svga_member_in_lv60";
} else if (experLevelSeq >= 70 && experLevelSeq <= 79) {
path = @"svga_member_in_lv70";
} else if (experLevelSeq >= 80 && experLevelSeq <= 89) {
path = @"svga_member_in_lv80";
} else {
path = @"svga_member_in_lv90";
}
NSString * anatomiser1Name = [NSString stringWithFormat:@"%@/%@.svga", API_Image_URL, path];
if (self.enterEffectView.superview == nil) { if (self.enterEffectView.superview == nil) {
self.enterEffectView.frame = CGRectMake(KScreenWidth, 339 + kSafeAreaTopHeight, KScreenWidth, effectPath.length ? 75 : 40); self.enterEffectView.frame = CGRectMake(KScreenWidth, 339 + kSafeAreaTopHeight, KScreenWidth, effectPath.length ? 75 : 40);
[self.lowLevelView addSubview:self.enterEffectView]; [self.lowLevelView addSubview:self.enterEffectView];
@@ -1123,8 +1105,26 @@ HWDMP4PlayDelegate>
[self.enterEffectView setAttributedText:attribute forKey:@"room_text"]; [self.enterEffectView setAttributedText:attribute forKey:@"room_text"];
[self.enterEffectView startAnimation]; [self.enterEffectView startAnimation];
} failureBlock:^(NSError * _Nonnull error) { } failureBlock:^(NSError * _Nonnull error) {
NSLog(@"%@", error);
}]; }];
} else { } else {
NSString * path;
if (experLevelSeq >= 30 && experLevelSeq <= 39) {
path = @"svga_member_in_lv30";
} else if (experLevelSeq >= 40 && experLevelSeq <= 49) {
path = @"svga_member_in_lv40";
} else if (experLevelSeq >= 50 && experLevelSeq <= 59) {
path = @"svga_member_in_lv50";
} else if (experLevelSeq >= 60 && experLevelSeq <= 69) {
path = @"svga_member_in_lv60";
} else if (experLevelSeq >= 70 && experLevelSeq <= 79) {
path = @"svga_member_in_lv70";
} else if (experLevelSeq >= 80 && experLevelSeq <= 89) {
path = @"svga_member_in_lv80";
} else {
path = @"svga_member_in_lv90";
}
NSString * anatomiser1Name = [NSString stringWithFormat:@"%@/%@.svga", API_Image_URL, path];
@kWeakify(self); @kWeakify(self);
[self.parser parseWithURL:[NSURL URLWithString:anatomiser1Name] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { [self.parser parseWithURL:[NSURL URLWithString:anatomiser1Name] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self); @kStrongify(self);
@@ -1136,6 +1136,7 @@ HWDMP4PlayDelegate>
[self.enterEffectView setAttributedText:attribute forKey:@"room_text"]; [self.enterEffectView setAttributedText:attribute forKey:@"room_text"];
[self.enterEffectView startAnimation]; [self.enterEffectView startAnimation];
} failureBlock:^(NSError * _Nonnull error) { } failureBlock:^(NSError * _Nonnull error) {
NSLog(@"%@", error);
}]; }];
} }
[UIView animateWithDuration:0.5 animations:^{ [UIView animateWithDuration:0.5 animations:^{

View File

@@ -1453,10 +1453,10 @@
/// @param imageUrl /// @param imageUrl
- (NSMutableAttributedString *)createUrlImageAttribute:(NSString *)imageUrl size:(CGSize)size { - (NSMutableAttributedString *)createUrlImageAttribute:(NSString *)imageUrl size:(CGSize)size {
NetImageConfig *config = [[NetImageConfig alloc]init]; NetImageConfig *config = [[NetImageConfig alloc]init];
/// config.imageType = ImageTypeUserIcon;
config.autoLoad = YES; config.autoLoad = YES;
NetImageView *imageView = [[NetImageView alloc]initWithUrl:imageUrl config:config]; NetImageView *imageView = [[NetImageView alloc] initWithUrl:imageUrl config:config];
imageView.backgroundColor = [UIColor clearColor];
imageView.bounds = CGRectMake(0, 0, size.width, size.height); imageView.bounds = CGRectMake(0, 0, size.width, size.height);
imageView.layer.masksToBounds = YES; imageView.layer.masksToBounds = YES;
imageView.contentMode = UIViewContentModeScaleAspectFit; imageView.contentMode = UIViewContentModeScaleAspectFit;

View File

@@ -263,6 +263,11 @@
[self updateCollectionViewInsetWith:normalOriginArray.count]; [self updateCollectionViewInsetWith:normalOriginArray.count];
[self.giftCollectionView reloadData]; [self.giftCollectionView reloadData];
if (self.segmentType == GiftSegmentType_WeekStar && isMSRTL()) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.giftCollectionView reloadData];
});
}
} }
- (void)setPackOriginArray:(NSArray *)packOriginArray { - (void)setPackOriginArray:(NSArray *)packOriginArray {

View File

@@ -554,10 +554,12 @@
[self.backImageView mas_updateConstraints:^(MASConstraintMaker *make) { [self.backImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(180); make.height.mas_equalTo(180);
}]; }];
self.idLabel.textColor = UIColorFromRGB(0x313131);
} else { } else {
self.backImageView.layer.masksToBounds = YES; self.backImageView.layer.masksToBounds = YES;
self.backImageView.layer.cornerRadius = 25; self.backImageView.layer.cornerRadius = 25;
self.backImageView.imageUrl = userInfo.avatar; self.backImageView.imageUrl = userInfo.avatar;
self.idLabel.textColor = [DJDKMIMOMColor textThirdColor];
} }
NSString *resourcePath = [userInfo.userInfoCardPic stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSString *resourcePath = [userInfo.userInfoCardPic stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];

View File

@@ -346,8 +346,8 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
didReceiveScriptMessage:(WKScriptMessage *)message { didReceiveScriptMessage:(WKScriptMessage *)message {
[self.webview evaluateJavaScript:@"document.location.href" [self.webview evaluateJavaScript:@"document.location.href"
completionHandler:^(id _Nullable response, NSError * _Nullable error) { completionHandler:^(id _Nullable response, NSError * _Nullable error) {
NSLog(@"%@", response); // NSLog(@"%@", response);
NSLog(@"-- -- - -- - -%@: %@", message.name, message.body); // NSLog(@"-- -- - -- - -%@: %@", message.name, message.body);
NSString *currentUrl = [NSString stringWithFormat:@"%@", response]; NSString *currentUrl = [NSString stringWithFormat:@"%@", response];
///host,便h5 ///host,便h5
BOOL condition = currentUrl != nil && [currentUrl containsString:API_HOST_URL]; BOOL condition = currentUrl != nil && [currentUrl containsString:API_HOST_URL];

View File

@@ -3976,7 +3976,7 @@ ineHeadView12" = "الحمل";
سوف نراجع الخلفية التي تم تحميلها خلال 24 ساعة. سوف نراجع الخلفية التي تم تحميلها خلال 24 ساعة.
\nإذا تم رفض الخلفية، فسوف تتلقى استردادًا للعملات."; \nإذا تم رفض الخلفية، فسوف تتلقى استردادًا للعملات.";
"1.0.18_7" = "انتهاء الصلاحية"; "1.0.18_7" = "انتهاء الصلاحية";
"1.0.18_8" = "أيام"; "1.0.18_8" = "أيام%@";
"1.0.18_9" = "شراء"; "1.0.18_9" = "شراء";
"1.0.18_10" = "تجديد"; "1.0.18_10" = "تجديد";
"1.0.18_11" = "تلميح شراء"; "1.0.18_11" = "تلميح شراء";

View File

@@ -3769,7 +3769,7 @@
"1.0.18_5" = "You can customize up to 6 backgrounds."; "1.0.18_5" = "You can customize up to 6 backgrounds.";
"1.0.18_6" = "You can only upload up to 6 images at a time as a custom background. \nOnce the background is created, it cannot be canceled. \nWe will review the uploaded background within 24 hours. \nIf the background is rejected, you will receive a refund of coins."; "1.0.18_6" = "You can only upload up to 6 images at a time as a custom background. \nOnce the background is created, it cannot be canceled. \nWe will review the uploaded background within 24 hours. \nIf the background is rejected, you will receive a refund of coins.";
"1.0.18_7" = "Expired"; "1.0.18_7" = "Expired";
"1.0.18_8" = "Days"; "1.0.18_8" = "%@Days";
"1.0.18_9" = "Buy"; "1.0.18_9" = "Buy";
"1.0.18_10" = "Renew"; "1.0.18_10" = "Renew";
"1.0.18_11" = "Purchases Tips"; "1.0.18_11" = "Purchases Tips";

View File

@@ -3555,7 +3555,7 @@
"1.0.18_5" = "En fazla 6 arka planı özelleştirebilirsiniz."; "1.0.18_5" = "En fazla 6 arka planı özelleştirebilirsiniz.";
"1.0.18_6" = "Özel arka plan olarak aynı anda en fazla 6 resim yükleyebilirsiniz. \nArka plan oluşturulduktan sonra iptal edilemez. \nYüklenen arka planı 24 saat içinde inceleyeceğiz. \nArka plan reddedilirse, jeton iadesi alacaksınız."; "1.0.18_6" = "Özel arka plan olarak aynı anda en fazla 6 resim yükleyebilirsiniz. \nArka plan oluşturulduktan sonra iptal edilemez. \nYüklenen arka planı 24 saat içinde inceleyeceğiz. \nArka plan reddedilirse, jeton iadesi alacaksınız.";
"1.0.18_7" = "Süresi doldu"; "1.0.18_7" = "Süresi doldu";
"1.0.18_8" = "Günler"; "1.0.18_8" = "%@Günler";
"1.0.18_9" = "Satın Al"; "1.0.18_9" = "Satın Al";
"1.0.18_10" = "Yenile"; "1.0.18_10" = "Yenile";
"1.0.18_11" = "Satın Alma İpucu"; "1.0.18_11" = "Satın Alma İpucu";

View File

@@ -3425,7 +3425,7 @@
"1.0.18_5" = "您最多可以自定義 6 個背景。"; "1.0.18_5" = "您最多可以自定義 6 個背景。";
"1.0.18_6" = "您一次最多只能上传 6 张图片作为自定义背景。\n 背景一旦创建,就无法取消。\n我们将在 24 小时内审核上传的背景。\n 如果背景被拒绝,您将收到金币退款。"; "1.0.18_6" = "您一次最多只能上传 6 张图片作为自定义背景。\n 背景一旦创建,就无法取消。\n我们将在 24 小时内审核上传的背景。\n 如果背景被拒绝,您将收到金币退款。";
"1.0.18_7" = "過期"; "1.0.18_7" = "過期";
"1.0.18_8" = "天"; "1.0.18_8" = "%@天";
"1.0.18_9" = "買"; "1.0.18_9" = "買";
"1.0.18_10" = "更新"; "1.0.18_10" = "更新";
"1.0.18_11" = "購買提示"; "1.0.18_11" = "購買提示";