From 0b14b6bf5f4d34b068fb7d3b77f7a7009026718a Mon Sep 17 00:00:00 2001 From: eggmanQQQ <3671373519@qq.com> Date: Mon, 14 Oct 2024 15:26:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=AD=A3=E5=90=84=E7=A7=8D?= =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98=EF=BC=8C=E8=A1=A5=E5=85=85=E5=A4=9A?= =?UTF-8?q?=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YuMi/Global/YUMIHtmlUrl.h | 2 + YuMi/Global/YUMIHtmlUrl.m | 7 +- .../Features/Boom/BoomInfoViewController.h | 2 + .../Features/Boom/BoomInfoViewController.m | 153 ++++++++++++++---- .../Features/Boom/RoomBoomBannerAnimation.m | 6 +- .../Features/Boom/RoomBoomExplosionView.m | 1 + .../YMRoom/Features/Boom/RoomBoomManager.m | 6 +- .../XPRoomActivityContainerView.m | 2 + .../View/CandyTree/View/XPRoomHalfWebView.h | 3 + .../XPRoomMessageContainerView.m | 44 ++--- .../View/RoomGame/View/MSTabbarRoomGameVC.m | 2 - .../YMRoom/View/XPRoomViewController.m | 70 ++------ .../View/PIFullScreenBannerAnimation.m | 4 +- .../YMTabbar/View/TabbarViewController.m | 4 +- YuMi/ar.lproj/Localizable.strings | 12 +- YuMi/en.lproj/Localizable.strings | 6 +- YuMi/zh-Hans.lproj/Localizable.strings | 10 +- YuMi/zh-Hant.lproj/Localizable.strings | 11 +- 18 files changed, 213 insertions(+), 132 deletions(-) diff --git a/YuMi/Global/YUMIHtmlUrl.h b/YuMi/Global/YUMIHtmlUrl.h index ec4d76d3..81bea732 100644 --- a/YuMi/Global/YUMIHtmlUrl.h +++ b/YuMi/Global/YUMIHtmlUrl.h @@ -103,6 +103,8 @@ typedef NS_ENUM(NSUInteger, URLType) { kLUDOUrl, /// CP 規則頁 kCPRule, + /// 火箭规则 + KBoomRule, }; NSString * const URLWithType(URLType type); diff --git a/YuMi/Global/YUMIHtmlUrl.m b/YuMi/Global/YUMIHtmlUrl.m index bd2eb125..8608c438 100644 --- a/YuMi/Global/YUMIHtmlUrl.m +++ b/YuMi/Global/YUMIHtmlUrl.m @@ -23,7 +23,8 @@ NSString * const URLWithType(URLType type) { @(kCandyTreeRuleURL) : @"modules/rule/newWishingWellRule.html",///糖果树规则 modules/rank/index.html#/wishingWellRule @(kChannelUrl) : @"modules/%@/index.html?channelType=%@&deviceId=%@", @(kLUDOUrl) : @"modules/gameRank/index.html",///LUDO排行榜路径 - @(kCPRule) : @"modules/rule/cpRule.html" + @(kCPRule) : @"modules/rule/cpRule.html", + @(KBoomRule) : @"modules/rule/boom.html?partitionId=",///收益记录 }; NSString * newUrl = [newDic objectForKey:@(type)]; if(newUrl != nil){ @@ -75,8 +76,8 @@ NSString * const URLWithType(URLType type) { @(kRedPacketRuleURL) : @"nRMNKGz9zmwOEcoRr/bGneWzsrl+qHbvUGgXJhFAfVGcldkazbiNrc/v2rR0HFw+",///红包规则 modules/rule/red-packet-rule.html @(kXinZuoStarURL) : @"3l3NxeDKO2bNAESpzjZ76mvJa2D26Bgqy+nNusiuH1UHYM+bYk+MM/TNM4VRqk1K",///星座礼物 activity/act-constellation/index.html @(kMineEarningsRecord) : @"0HJ5o+40NtYGeHo1KRoQE3VdLhFQnvGyqgph9CCLjyU53rS29T2nD7UEh3CpX2BG",///收益记录 - - + + }; NSString * url = [dic objectForKey:@(type)]; NSString * webUrl = [AESUtils aesDecrypt:url]; diff --git a/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.h b/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.h index 23896076..f57f4065 100644 --- a/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.h +++ b/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.h @@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN //+ (BoomInfoViewController *)vcFromBoomProgress:(NSArray *)models; @property (nonatomic, copy) void(^showGiftPanel)(void); +@property (nonatomic, assign) NSInteger roomUid; +@property (nonatomic, copy) NSString *partitionId; @end diff --git a/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.m b/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.m index 521d9ae7..ead0077c 100644 --- a/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.m +++ b/YuMi/Modules/YMRoom/Features/Boom/BoomInfoViewController.m @@ -7,8 +7,10 @@ #import "BoomInfoViewController.h" +#import "Api+Boom.h" #import "BoomInfoModel.h" #import "RoomBoomManager.h" +#import "XPRoomHalfWebView.h" #import "RoomBoomExplosionView.h" #import "XPRoomGiftAnimationParser.h" @@ -133,6 +135,8 @@ @property (nonatomic, strong) UILabel *rankName_2; @property (nonatomic, strong) UILabel *rankName_3; +@property (nonatomic, strong) UILabel *rankTipsLabel; + @end @implementation BoomInfoViewController @@ -141,7 +145,7 @@ - (instancetype)init { if (self = [super init]) { self.view.backgroundColor = [UIColor clearColor]; - + } return self; } @@ -158,6 +162,7 @@ [super viewDidLoad]; [self setupUI]; + [self setupNotification]; @kWeakify(self); [[RoomBoomManager sharedManager] registerBoomProgressUpdate:^(id _Nonnull sth) { @@ -170,6 +175,44 @@ self.selectedIndex = -1; self.boomInfoArray = [[RoomBoomManager sharedManager] loadBoomDetails]; + [self locateToRightLevel]; +} + +- (void)setPartitionId:(NSString *)partitionId { + _partitionId = partitionId; + self.rankTipsLabel.text = [self.partitionId isEqualToString:@"2"] ? YMLocalizedString(@"RoomBoom_6") : YMLocalizedString(@"RoomBoom_9"); +} + +- (void)setRoomUid:(NSInteger)roomUid { + _roomUid = roomUid; + [self loadDetailData]; +} + +- (void)setupNotification { + @kWeakify(self); + [[NSNotificationCenter defaultCenter] addObserverForName:@"UpdateWhenBoomExplosion" + object:nil + queue:[NSOperationQueue mainQueue] + usingBlock:^(NSNotification * _Nonnull notification) { + @kStrongify(self); + [self loadDetailData]; + }]; +} + +- (void)loadDetailData { + // 确保进入时数据正确 + @kWeakify(self); + [Api getBoomDetailInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + @kStrongify(self); + if (code == 200) { + NSArray *array = [BoomDetailModel modelsWithArray:data.data]; + self.boomInfoArray = array; + [self locateToRightLevel]; + } + } roomUid:@(self.roomUid).stringValue]; +} + +- (void)locateToRightLevel { for (BoomDetailModel *boom in self.boomInfoArray) { if (boom.currLevel == 1 || boom.speed > 0) { [self handleTapRocket:boom level:boom.level]; @@ -267,14 +310,25 @@ make.width.height.mas_equalTo(43); }]; - UIImageView *jackpotTitleImageView = [self jackpotTitleView]; + UIImageView *jackpotTitleImageView = [self jackpotTitleBG]; [self.giftsView addSubview:jackpotTitleImageView]; + + UILabel *jackpotTitleLabel = [self jackpotTitleLabel]; + [self.giftsView addSubview:jackpotTitleLabel]; + [jackpotTitleImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(jackpotBackgroundImageView); make.centerY.mas_equalTo(helpButton); - make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(52))); +// make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(52))); + make.height.mas_equalTo(kGetScaleWidth(52)); + make.leading.mas_equalTo(jackpotTitleLabel).offset(-40); + make.trailing.mas_equalTo(jackpotTitleLabel).offset(40); }]; - + + [jackpotTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.mas_equalTo(jackpotTitleImageView); + }]; + UILabel *tipsLabel = [self jackpotTipsLabel]; [self.giftsView addSubview:tipsLabel]; [tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) { @@ -366,7 +420,6 @@ [progressBG addSubview:self.progressBar]; [self.progressBar mas_makeConstraints:^(MASConstraintMaker *make) { -// make.centerX.mas_equalTo(progressBG); make.leading.mas_equalTo(progressBG).offset(kGetScaleWidth(21.5)); make.bottom.mas_equalTo(progressBG).offset(kGetScaleWidth(-35)); make.width.mas_equalTo(kGetScaleWidth(18)); @@ -377,7 +430,6 @@ [self.view addSubview:progressNumberBG]; [progressNumberBG mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.mas_equalTo(progressBG).offset(kGetScaleWidth(-13)); -// make.centerX.mas_equalTo(progressBG); make.leading.mas_equalTo(progressBG).offset(11); make.width.height.mas_equalTo(kGetScaleWidth(43)); }]; @@ -452,21 +504,29 @@ UIButton *helpButton_2 = [self helpButton]; [self.rankingView addSubview:helpButton_2]; - [helpButton mas_makeConstraints:^(MASConstraintMaker *make) { + [helpButton_2 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(rankingBG).offset(-8); make.trailing.mas_equalTo(rankingBG).offset(-3); make.width.height.mas_equalTo(43); }]; - UIImageView *rankingTitle = [self rankingTitle]; - [self.rankingView addSubview:rankingTitle]; - [rankingTitle mas_makeConstraints:^(MASConstraintMaker *make) { + UIImageView *rankingTitleBG = [self rankingTitleBG]; + [self.rankingView addSubview:rankingTitleBG]; + [rankingTitleBG mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(rankingBG.mas_top).offset(-14); make.centerX.mas_equalTo(self.rankingView); - make.width.mas_equalTo(kGetScaleWidth(215)); +// make.width.mas_equalTo(kGetScaleWidth(215)); make.height.mas_equalTo(kGetScaleWidth(52)); }]; + UILabel *rankingTitleLabel = [self rankingTitleLabel]; + [self.rankingView addSubview:rankingTitleLabel]; + [rankingTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(rankingTitleBG); + make.leading.mas_equalTo(rankingTitleBG).offset(40); + make.trailing.mas_equalTo(rankingTitleBG).offset(-40); + }]; + [self.rankingView addSubview:self.rankAvatar_1]; [self.rankAvatar_1 mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(self.rankingView); @@ -545,9 +605,9 @@ make.center.mas_equalTo(nameBG_3); }]; - UILabel *tipsLabel_2 = [self rankTipsLabel]; - [self.rankingView addSubview:tipsLabel_2]; - [tipsLabel_2 mas_makeConstraints:^(MASConstraintMaker *make) { + [self.rankingView addSubview:self.rankTipsLabel]; + [self.rankingView addSubview:self.rankTipsLabel]; + [self.rankTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(self.rankingView); make.bottom.mas_equalTo(-15); }]; @@ -564,7 +624,13 @@ } - (void)handleTapHelpButton { - + [self dismissViewControllerAnimated:YES completion:^{ + NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomUid]; + XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init]; + webView.roomUid = roomUid; + webView.url = [NSString stringWithFormat:@"%@%@", URLWithType(KBoomRule), self.partitionId]; + [TTPopup popupView:webView style:TTPopupStyleActionSheet]; + }]; } - (void)handleTapEmptySpace { @@ -631,9 +697,9 @@ self.rankName_1.text = @""; self.rankName_2.text = @""; self.rankName_3.text = @""; - self.rankAvatar_1.image = nil; - self.rankAvatar_2.image = nil; - self.rankAvatar_3.image = nil; + self.rankAvatar_1.imageUrl = @""; + self.rankAvatar_2.imageUrl = @""; + self.rankAvatar_3.imageUrl = @""; for (roomBoomRankVo *rank in boom.roomBoomRankVos) { switch (rank.position) { @@ -723,6 +789,7 @@ - (void)viewDidStopPlayMP4:(NSInteger)lastFrameIndex view:(VAPView *)container { } + - (void)viewDidFailPlayMP4:(NSError *)error{ } @@ -777,13 +844,23 @@ return button; } -- (UIImageView *)jackpotTitleView { - UIImageView *imageView = [[UIImageView alloc] initWithImage:kImage(@"room_boom_progress_jsckpot_title")]; +- (UIImageView *)jackpotTitleBG { + UIImage *image = [kImage(@"room_boom_result_top_bg") resizableImageWithCapInsets:UIEdgeInsetsMake(0, 40, 0, 40) resizingMode:UIImageResizingModeStretch]; + UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; return imageView; } +- (UILabel *)jackpotTitleLabel { + UILabel *label = [UILabel labelInitWithText:YMLocalizedString(@"RoomBoom_8") + font:kFontMedium(17.5) + textColor:UIColorFromRGB(0xF0E7BA)]; + label.textAlignment = NSTextAlignmentCenter; + return label; +} + + - (UILabel *)jackpotTipsLabel { - UILabel *label = [UILabel labelInitWithText:@"以下的奖励仅供参考,具体发放的礼物由您的贡献值和幸运程度决定" font:kFontRegular(10) textColor:UIColorFromRGB(0xCBA1FF)]; + UILabel *label = [UILabel labelInitWithText:YMLocalizedString(@"RoomBoom_10") font:kFontRegular(10) textColor:UIColorFromRGB(0xCBA1FF)]; label.textAlignment = NSTextAlignmentCenter; return label; } @@ -811,11 +888,20 @@ return imageView; } -- (UIImageView *)rankingTitle { - UIImageView *imageView = [[UIImageView alloc] initWithImage:kImage(@"room_boom_raning_title")]; +- (UIImageView *)rankingTitleBG { + UIImage *image = [kImage(@"room_boom_result_top_bg") resizableImageWithCapInsets:UIEdgeInsetsMake(0, 40, 0, 40) resizingMode:UIImageResizingModeStretch]; + UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; return imageView; } +- (UILabel *)rankingTitleLabel { + UILabel *label = [UILabel labelInitWithText:YMLocalizedString(@"RoomBoom_7") + font:kFontMedium(17.5) + textColor:UIColorFromRGB(0xF0E7BA)]; + label.textAlignment = NSTextAlignmentCenter; + return label; +} + - (UIImageView *)rankingAvatarWear { UIImageView *imageView = [[UIImageView alloc] initWithImage:kImage(@"room_boom_progress_avatar")]; return imageView; @@ -847,9 +933,16 @@ return _rankName_3; } +- (NetImageConfig *)avatarConfig { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + return config; +} + - (NetImageView *)rankAvatar_1 { if (!_rankAvatar_1) { - _rankAvatar_1 = [[NetImageView alloc] init]; + _rankAvatar_1 = [[NetImageView alloc] initWithConfig:self.avatarConfig]; _rankAvatar_1.contentMode = UIViewContentModeScaleAspectFit; _rankAvatar_1.layer.cornerRadius = 86/2; _rankAvatar_1.layer.masksToBounds = YES; @@ -859,7 +952,7 @@ - (NetImageView *)rankAvatar_2 { if (!_rankAvatar_2) { - _rankAvatar_2 = [[NetImageView alloc] init]; + _rankAvatar_2 = [[NetImageView alloc] initWithConfig:self.avatarConfig]; _rankAvatar_2.contentMode = UIViewContentModeScaleAspectFit; _rankAvatar_2.layer.cornerRadius = 66/2; _rankAvatar_2.layer.masksToBounds = YES; @@ -869,7 +962,7 @@ - (NetImageView *)rankAvatar_3 { if (!_rankAvatar_3) { - _rankAvatar_3 = [[NetImageView alloc] init]; + _rankAvatar_3 = [[NetImageView alloc] initWithConfig:self.avatarConfig]; _rankAvatar_3.contentMode = UIViewContentModeScaleAspectFit; _rankAvatar_3.layer.cornerRadius = 66/2; _rankAvatar_3.layer.masksToBounds = YES; @@ -1016,9 +1109,11 @@ } - (UILabel *)rankTipsLabel { - UILabel *label = [UILabel labelInitWithText:YMLocalizedString(@"RoomBoom_6") font:kFontLight(12) textColor:[UIColor whiteColor]]; - label.textAlignment = NSTextAlignmentCenter; - return label; + if (!_rankTipsLabel) { + _rankTipsLabel = [UILabel labelInitWithText:@"" font:kFontLight(12) textColor:[UIColor whiteColor]]; + _rankTipsLabel.textAlignment = NSTextAlignmentCenter; + } + return _rankTipsLabel; } diff --git a/YuMi/Modules/YMRoom/Features/Boom/RoomBoomBannerAnimation.m b/YuMi/Modules/YMRoom/Features/Boom/RoomBoomBannerAnimation.m index 23ce5610..d405a26c 100644 --- a/YuMi/Modules/YMRoom/Features/Boom/RoomBoomBannerAnimation.m +++ b/YuMi/Modules/YMRoom/Features/Boom/RoomBoomBannerAnimation.m @@ -97,7 +97,7 @@ __block NSString *targetRoomUid = @(self.model.roomUid).stringValue; @kWeakify(self); [TTPopup alertWithMessage:YMLocalizedString(@"Combo_10") confirmHandler:^{ - @kStrongify(self); +// @kStrongify(self); [roomVC exitRoom]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [XPRoomViewController openRoom:targetRoomUid @@ -152,7 +152,7 @@ [self addSubview:self.rocket]; [self.rocket mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(avatarWearImageView.mas_right); - make.centerY.mas_equalTo(avatarWearImageView); + make.centerY.mas_equalTo(backgroundImageView); make.width.height.mas_equalTo(kGetScaleWidth(35)); }]; @@ -215,7 +215,7 @@ - (UILabel *)contentLabel { if (!_contentLabel) { - _contentLabel = [UILabel labelInitWithText:@"触发了BOOM,前去围观" + _contentLabel = [UILabel labelInitWithText:@"" font:kFontMedium(10) textColor:[UIColor whiteColor]]; NSAttributedString *as_2 = [[NSAttributedString alloc] initWithString:@"Boom" diff --git a/YuMi/Modules/YMRoom/Features/Boom/RoomBoomExplosionView.m b/YuMi/Modules/YMRoom/Features/Boom/RoomBoomExplosionView.m index 123929bf..fa5a7c4e 100644 --- a/YuMi/Modules/YMRoom/Features/Boom/RoomBoomExplosionView.m +++ b/YuMi/Modules/YMRoom/Features/Boom/RoomBoomExplosionView.m @@ -34,6 +34,7 @@ with:(NSArray *)vapSources complete:(void(^)(void))complete { if (vapSources.count < 2) { + [[RoomBoomManager sharedManager] explosionEnd]; return; } diff --git a/YuMi/Modules/YMRoom/Features/Boom/RoomBoomManager.m b/YuMi/Modules/YMRoom/Features/Boom/RoomBoomManager.m index 6cdf5337..6986ebf2 100644 --- a/YuMi/Modules/YMRoom/Features/Boom/RoomBoomManager.m +++ b/YuMi/Modules/YMRoom/Features/Boom/RoomBoomManager.m @@ -262,7 +262,11 @@ break; case Custom_Message_Room_Boom_LevelUp: { NSLog(@" 火箭 -------- 632 : %@", attachment.data); - [self.boomEventsQueue addObject:attachment]; + + if ([[XPSkillCardPlayerManager shareInstance] isInRoomVC]) { + [self.boomEventsQueue addObject:attachment]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"UpdateWhenBoomExplosion" object:nil]; + } [self.bannerEventsQueue addObject:attachment]; [self checkAndStartBoomEvent]; diff --git a/YuMi/Modules/YMRoom/View/ActivityContainerView/XPRoomActivityContainerView.m b/YuMi/Modules/YMRoom/View/ActivityContainerView/XPRoomActivityContainerView.m index f4b37bb2..8a73293d 100644 --- a/YuMi/Modules/YMRoom/View/ActivityContainerView/XPRoomActivityContainerView.m +++ b/YuMi/Modules/YMRoom/View/ActivityContainerView/XPRoomActivityContainerView.m @@ -641,6 +641,8 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView; - (void)displayBoomInfoProgress { BoomInfoViewController *vc = [[BoomInfoViewController alloc] init]; + vc.roomUid = self.hostDelegate.getRoomInfo.uid; + vc.partitionId = self.hostDelegate.getUserInfo.partitionId; vc.modalPresentationStyle = UIModalPresentationOverFullScreen; [self.hostDelegate.getCurrentNav presentViewController:vc animated:YES completion:nil]; diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPRoomHalfWebView.h b/YuMi/Modules/YMRoom/View/CandyTree/View/XPRoomHalfWebView.h index 12d0d0ec..f479e836 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPRoomHalfWebView.h +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPRoomHalfWebView.h @@ -18,6 +18,9 @@ NS_ASSUME_NONNULL_BEGIN ///房间uid @property (nonatomic,copy) NSString *roomUid; +///地区码 +@property (nonatomic, assign) NSInteger partitionId; + ///资源位玩法 @property (nonatomic,assign) BOOL isPlayView; @property(nonatomic,assign) BOOL isSailing; diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m b/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m index 8d886872..4b9c65fc 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/XPRoomMessageContainerView.m @@ -113,6 +113,10 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; } else { self.messageTableView.tableHeaderView = nil; } + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self scrollToBottom:YES]; + }); } - (void)updateAllDataSource { @@ -1171,26 +1175,26 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey"; } - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - NSArray *source = @[]; - switch (self.displayType) { - case 1: - source = self.datasource; - break; - case 2: - source = self.datasource_chat; - break; - case 3: - source = self.datasource_gift; - break; - - default: - source = self.datasource; - break; - } - XPMessageInfoModel *model = [source xpSafeObjectAtIndex:indexPath.row]; - if (model.rowHeight == 0) { - model.rowHeight = CGRectGetHeight(cell.frame); - } +// NSArray *source = @[]; +// switch (self.displayType) { +// case 1: +// source = self.datasource; +// break; +// case 2: +// source = self.datasource_chat; +// break; +// case 3: +// source = self.datasource_gift; +// break; +// +// default: +// source = self.datasource; +// break; +// } +// XPMessageInfoModel *model = [source xpSafeObjectAtIndex:indexPath.row]; +// if (model.rowHeight == 0) { +// model.rowHeight = CGRectGetHeight(cell.frame); +// } } diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m b/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m index fa700822..af47e253 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/MSTabbarRoomGameVC.m @@ -113,8 +113,6 @@ beginGameView.delegate = self; self.chooseGameModel = model; [kWindow addSubview:beginGameView]; - - } -(void)startMatchGameSuccess{ [self.presenter getCoinNum]; diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index 48c333d0..1ef6ed3d 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -358,65 +358,9 @@ XPCandyTreeInsufficientBalanceViewDelegate> // [b addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside]; //#endif } -- (void)test { - // 创建 UITextView - UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20, 100, 300, 100)]; - textView.editable = NO; - textView.backgroundColor = [UIColor clearColor]; // 设置背景为透明 - - // 创建 NSMutableAttributedString - NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init]; - - // 创建 NSTextAttachment 并添加图片 - NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; - attachment.image = [UIImage imageNamed:@"room_boom_progress_avatar"]; // 替换成你的图片名字 - - // 调整图片的 bounds 以让图片和文字在视觉上居中对齐 - CGFloat imageOffsetY = -5.0; // 调整这个值来垂直对齐文本和图片 - attachment.bounds = CGRectMake(0, imageOffsetY, 40, 40); // 设定图片的大小 - - // 创建图片的 attributed string - NSAttributedString *imageString = [NSAttributedString attributedStringWithAttachment:attachment]; - - // 添加图片到 attributed string - [attributedString appendAttributedString:imageString]; - - // 创建文本 - NSString *text1 = @" 恭喜!"; - NSString *text2 = @" 八六八八八本"; - NSString *text3 = @" 触发超级大奖BOOM,所有在房用户将获得奖励!"; - - // 创建段落样式以调整文本与图片的对齐 - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; - paragraphStyle.alignment = NSTextAlignmentLeft; // 左对齐 - paragraphStyle.lineSpacing = 5.0; // 行间距 - paragraphStyle.paragraphSpacing = 10.0; // 段落间距 - - // 创建文本的 attributed string 并设置段落样式 - NSDictionary *attributes1 = @{NSFontAttributeName: [UIFont systemFontOfSize:17], - NSParagraphStyleAttributeName: paragraphStyle}; - - NSAttributedString *attributedText1 = [[NSAttributedString alloc] initWithString:text1 attributes:attributes1]; - [attributedString appendAttributedString:attributedText1]; - - // 设置红色字体 - NSDictionary *attributes2 = @{NSFontAttributeName: [UIFont boldSystemFontOfSize:17], - NSForegroundColorAttributeName: [UIColor redColor], - NSParagraphStyleAttributeName: paragraphStyle}; - - NSAttributedString *attributedText2 = [[NSAttributedString alloc] initWithString:text2 attributes:attributes2]; - [attributedString appendAttributedString:attributedText2]; - - // 设置默认字体 - NSAttributedString *attributedText3 = [[NSAttributedString alloc] initWithString:text3 attributes:attributes1]; - [attributedString appendAttributedString:attributedText3]; - - // 将 attributedString 设置为 UITextView 的内容 - textView.attributedText = attributedString; - - // 添加 UITextView 到视图 - [self.view addSubview:textView]; -} +//- (void)test { +// +//} - (void)setupForBoom { @kWeakify(self); @@ -446,6 +390,11 @@ XPCandyTreeInsufficientBalanceViewDelegate> } target:self]; } +- (void)requestBoomData { + [self.presenter getBoomRocketAnimationInfo:self.roomUid]; + [self.presenter getBoomDetail:self.roomUid]; +} + - (void)loadRoomDataAndUsers { [XNDJTDDLoadingTool showAnchorLoading:self.navigationController.view]; [self.presenter initEnterRoom:self.roomUid user:[AccountInfoStorage instance].getUid]; @@ -1409,8 +1358,7 @@ XPCandyTreeInsufficientBalanceViewDelegate> self.roomInfo = roomInfo; self.userInfo = userInfo; - [self.presenter getBoomRocketAnimationInfo:@(roomInfo.uid).stringValue]; - [self.presenter getBoomDetail:@(roomInfo.uid).stringValue]; + [self requestBoomData]; @kWeakify(self); dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_global_queue(0, 0), ^{ diff --git a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m index 85e94548..1ca55a70 100644 --- a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m +++ b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m @@ -339,8 +339,10 @@ webVC.isPush = YES; webVC.url = model.skipContent; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES]; + } else if (model.skipType == 7) { + // 跳转到指定游戏 } - + } #pragma mark - 收到h5通用飘屏 -(void)receiveCommonH5Banner:(AttachmentModel *)attachment{ diff --git a/YuMi/Modules/YMTabbar/View/TabbarViewController.m b/YuMi/Modules/YMTabbar/View/TabbarViewController.m index 09f11955..a605ba71 100644 --- a/YuMi/Modules/YMTabbar/View/TabbarViewController.m +++ b/YuMi/Modules/YMTabbar/View/TabbarViewController.m @@ -677,8 +677,10 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; // [self.roomAnimation receiveNobleLevelUp:attachment]; }else if (attachment.first == CustomMessageType_General_Floating_Screen && attachment.second == Custom_Message_Sub_General_Floating_Screen_All_Room){ if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES) { - [self.roomAnimation receiveRoomGeneralFloatingScreen:attachment]; + return; } + // 房间会发通知 +// [self.roomAnimation receiveRoomGeneralFloatingScreen:attachment]; } } } diff --git a/YuMi/ar.lproj/Localizable.strings b/YuMi/ar.lproj/Localizable.strings index 10892100..43eb2185 100644 --- a/YuMi/ar.lproj/Localizable.strings +++ b/YuMi/ar.lproj/Localizable.strings @@ -3931,13 +3931,17 @@ ineHeadView12" = "الحمل"; "RoomEffect_CP_lv_4" = "ثنائي مثالي"; "RoomEffect_CP_lv_5" = "ثنائي رائع"; -"RoomBoom_0" = "Unfortunately! You did not receive reward, please keep up the good work!"; -"RoomBoom_1" = "Congratulations on being awarded the following prizes in this round of Boom"; -"RoomBoom_2" = "Give gifts and win super prizes"; +"RoomBoom_0" = "لسوء الحظ! لم تحصل على مكافأة، يرجى مواصلة العمل الجيد"; +"RoomBoom_1" = "تهانينا على حصولك على الجوائز التالية في هذه الجولة من Boom"; +"RoomBoom_2" = "قدم الهدايا واربح جوائز كبرى"; "RoomBoom_3" = "触发了"; "RoomBoom_4" = ",前去圍觀"; -"RoomBoom_5" = "房間暱稱:"; +"RoomBoom_5" = "لقب الغرفة:"; "RoomBoom_6" = "Reset time: 0:00 (GMT+3) daily"; +"RoomBoom_7" = "تصنيف الداعمين"; +"RoomBoom_8" = "الجائزة الكبرى"; +"RoomBoom_9" = "Reset time: 0:00 (GMT+8) daily"; +"RoomBoom_10" = "المكافآت هي للإشارة فقط. يتم تحديد الهدايا المحددة بناءً على قيمة مساهمتك وحظك"; "RoomMessageTitle_0" = "الكل"; "RoomMessageTitle_1" = "رسالة خاصة"; diff --git a/YuMi/en.lproj/Localizable.strings b/YuMi/en.lproj/Localizable.strings index d3795e7d..5d61ed80 100644 --- a/YuMi/en.lproj/Localizable.strings +++ b/YuMi/en.lproj/Localizable.strings @@ -3732,8 +3732,12 @@ "RoomBoom_2" = "Give gifts and win super prizes"; "RoomBoom_3" = "触发了"; "RoomBoom_4" = ",前去圍觀"; -"RoomBoom_5" = "房間暱稱:"; +"RoomBoom_5" = "Room name:"; "RoomBoom_6" = "Reset time: 0:00 (GMT+3) daily"; +"RoomBoom_7" = " Supporter Ranking"; +"RoomBoom_8" = "Super Jackpot"; +"RoomBoom_9" = "Reset time: 0:00 (GMT+8) daily"; +"RoomBoom_10" = "The rewards are for reference only. The specific gifts are determined by your contribution value and luck."; "RoomMessageTitle_0" = "All"; "RoomMessageTitle_1" = "Chat"; diff --git a/YuMi/zh-Hans.lproj/Localizable.strings b/YuMi/zh-Hans.lproj/Localizable.strings index c53f3a65..33215fe3 100644 --- a/YuMi/zh-Hans.lproj/Localizable.strings +++ b/YuMi/zh-Hans.lproj/Localizable.strings @@ -3391,13 +3391,17 @@ "RoomEffect_CP_lv_4" = "完美雙人組"; "RoomEffect_CP_lv_5" = "神仙眷侶"; -"RoomBoom_0" = "Unfortunately! You did not receive reward, please keep up the good work!"; -"RoomBoom_1" = "Congratulations on being awarded the following prizes in this round of Boom"; -"RoomBoom_2" = "Give gifts and win super prizes"; +"RoomBoom_0" = "很遺憾 您沒有獲得獎品,請繼續努力!"; +"RoomBoom_1" = "恭喜您在本輪 Boom 中獲得以下獎励。"; +"RoomBoom_2" = "送禮物,贏取超級獎品"; "RoomBoom_3" = "触发了"; "RoomBoom_4" = ",前去圍觀"; "RoomBoom_5" = "房間暱稱:"; "RoomBoom_6" = "Reset time: 0:00 (GMT+3) daily"; +"RoomBoom_7" = "支持者排名"; +"RoomBoom_8" = "超大獎"; +"RoomBoom_9" = "Reset time: 0:00 (GMT+8) daily"; +"RoomBoom_10" = "以下的奖励仅供参考,具体发放的礼物由您的贡献值和幸运程度决定"; "RoomMessageTitle_0" = "全部"; "RoomMessageTitle_1" = "聊天"; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index bd717c89..995d04fe 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -3383,16 +3383,21 @@ "RoomEffect_CP_lv_4" = "完美雙人組"; "RoomEffect_CP_lv_5" = "神仙眷侶"; -"RoomBoom_0" = "Unfortunately! You did not receive reward, please keep up the good work!"; -"RoomBoom_1" = "Congratulations on being awarded the following prizes in this round of Boom"; -"RoomBoom_2" = "Give gifts and win super prizes"; +"RoomBoom_0" = "很遺憾 您沒有獲得獎品,請繼續努力!"; +"RoomBoom_1" = "恭喜您在本輪 Boom 中獲得以下獎励。"; +"RoomBoom_2" = "送禮物,贏取超級獎品"; "RoomBoom_3" = "触发了"; "RoomBoom_4" = ",前去圍觀"; "RoomBoom_5" = "房間暱稱:"; "RoomBoom_6" = "Reset time: 0:00 (GMT+3) daily"; +"RoomBoom_7" = "支持者排名"; +"RoomBoom_8" = "超大獎"; +"RoomBoom_9" = "Reset time: 0:00 (GMT+8) daily"; +"RoomBoom_10" = "以下的奖励仅供参考,具体发放的礼物由您的贡献值和幸运程度决定"; "RoomMessageTitle_0" = "全部"; "RoomMessageTitle_1" = "聊天"; "RoomMessageTitle_2" = "禮物"; "RoomMessageBoom_0" = "恭喜!"; "RoomMessageBoom_1" = "触发超级大奖BOOM,所有在房用户将获得奖励!"; +