feat:强制 web 使用 initWithRoomUID 初始化

This commit is contained in:
eggmanQQQ
2024-10-08 11:47:06 +08:00
parent 259d161df8
commit 94c11e5148
44 changed files with 212 additions and 130 deletions

View File

@@ -549,6 +549,13 @@
54C9A1252C3E74AE00C6D970 /* MessageGameOrderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */; };
54E4D5302C9048E1009E1FEA /* LuckyGiftWinningFlagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E4D52F2C9048E1009E1FEA /* LuckyGiftWinningFlagView.m */; };
54E4D5332C90658C009E1FEA /* LuckyGiftWinningBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E4D5322C90658C009E1FEA /* LuckyGiftWinningBannerView.m */; };
54E82E9F2CA6876300C931D9 /* RoomBoomManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82E9E2CA6876300C931D9 /* RoomBoomManager.m */; };
54E82EA22CA6886700C931D9 /* RoomBoomBannerAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82EA12CA6886700C931D9 /* RoomBoomBannerAnimation.m */; };
54E82EA52CA693FA00C931D9 /* RoomBoomProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82EA42CA693FA00C931D9 /* RoomBoomProgressView.m */; };
54E82EA82CA6940900C931D9 /* RoomBoomResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82EA72CA6940900C931D9 /* RoomBoomResultView.m */; };
54E82EAB2CA9261000C931D9 /* Api+Boom.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82EAA2CA9261000C931D9 /* Api+Boom.m */; };
54E82EAE2CA9293C00C931D9 /* BoomInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82EAD2CA9293C00C931D9 /* BoomInfoModel.m */; };
54E82EB12CA93BE200C931D9 /* BoomInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82EB02CA93BE200C931D9 /* BoomInfoViewController.m */; };
54F179072C8EA48C00CB5219 /* Combo_Boom.svga in Resources */ = {isa = PBXBuildFile; fileRef = 54F179062C8EA48C00CB5219 /* Combo_Boom.svga */; };
54F1790A2C8EDDF400CB5219 /* CountdownRingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F179092C8EDDF400CB5219 /* CountdownRingView.m */; };
54F469352C29711400A83655 /* XPMomentUserDataViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 54F469342C29711400A83655 /* XPMomentUserDataViewController.m */; };
@@ -2648,6 +2655,20 @@
54E4D52F2C9048E1009E1FEA /* LuckyGiftWinningFlagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LuckyGiftWinningFlagView.m; sourceTree = "<group>"; };
54E4D5312C90658C009E1FEA /* LuckyGiftWinningBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuckyGiftWinningBannerView.h; sourceTree = "<group>"; };
54E4D5322C90658C009E1FEA /* LuckyGiftWinningBannerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LuckyGiftWinningBannerView.m; sourceTree = "<group>"; };
54E82E9D2CA6876300C931D9 /* RoomBoomManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomBoomManager.h; sourceTree = "<group>"; };
54E82E9E2CA6876300C931D9 /* RoomBoomManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomBoomManager.m; sourceTree = "<group>"; };
54E82EA02CA6886700C931D9 /* RoomBoomBannerAnimation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomBoomBannerAnimation.h; sourceTree = "<group>"; };
54E82EA12CA6886700C931D9 /* RoomBoomBannerAnimation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomBoomBannerAnimation.m; sourceTree = "<group>"; };
54E82EA32CA693FA00C931D9 /* RoomBoomProgressView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomBoomProgressView.h; sourceTree = "<group>"; };
54E82EA42CA693FA00C931D9 /* RoomBoomProgressView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomBoomProgressView.m; sourceTree = "<group>"; };
54E82EA62CA6940900C931D9 /* RoomBoomResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomBoomResultView.h; sourceTree = "<group>"; };
54E82EA72CA6940900C931D9 /* RoomBoomResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomBoomResultView.m; sourceTree = "<group>"; };
54E82EA92CA9261000C931D9 /* Api+Boom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Boom.h"; sourceTree = "<group>"; };
54E82EAA2CA9261000C931D9 /* Api+Boom.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Boom.m"; sourceTree = "<group>"; };
54E82EAC2CA9293C00C931D9 /* BoomInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BoomInfoModel.h; sourceTree = "<group>"; };
54E82EAD2CA9293C00C931D9 /* BoomInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BoomInfoModel.m; sourceTree = "<group>"; };
54E82EAF2CA93BE200C931D9 /* BoomInfoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BoomInfoViewController.h; sourceTree = "<group>"; };
54E82EB02CA93BE200C931D9 /* BoomInfoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BoomInfoViewController.m; sourceTree = "<group>"; };
54F179062C8EA48C00CB5219 /* Combo_Boom.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = Combo_Boom.svga; sourceTree = "<group>"; };
54F179082C8EDDF400CB5219 /* CountdownRingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CountdownRingView.h; sourceTree = "<group>"; };
54F179092C8EDDF400CB5219 /* CountdownRingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountdownRingView.m; sourceTree = "<group>"; };
@@ -6506,6 +6527,31 @@
path = SubViews;
sourceTree = "<group>";
};
54E82E9B2CA684A600C931D9 /* Features */ = {
isa = PBXGroup;
children = (
54E82E9C2CA684CB00C931D9 /* Boom */,
);
path = Features;
sourceTree = "<group>";
};
54E82E9C2CA684CB00C931D9 /* Boom */ = {
isa = PBXGroup;
children = (
54E82E9D2CA6876300C931D9 /* RoomBoomManager.h */,
54E82E9E2CA6876300C931D9 /* RoomBoomManager.m */,
54E82EA02CA6886700C931D9 /* RoomBoomBannerAnimation.h */,
54E82EA12CA6886700C931D9 /* RoomBoomBannerAnimation.m */,
54E82EA32CA693FA00C931D9 /* RoomBoomProgressView.h */,
54E82EA42CA693FA00C931D9 /* RoomBoomProgressView.m */,
54E82EA62CA6940900C931D9 /* RoomBoomResultView.h */,
54E82EA72CA6940900C931D9 /* RoomBoomResultView.m */,
54E82EAF2CA93BE200C931D9 /* BoomInfoViewController.h */,
54E82EB02CA93BE200C931D9 /* BoomInfoViewController.m */,
);
path = Boom;
sourceTree = "<group>";
};
54FFD3802C9BD12600DE61E5 /* cp */ = {
isa = PBXGroup;
children = (
@@ -7304,6 +7350,8 @@
E87AE8C0284E184300CAFBB3 /* RoomNewUserGreetModel.m */,
5412E0FB2C52512100FDD668 /* RoomBottomEntranceModel.h */,
5412E0FC2C52512100FDD668 /* RoomBottomEntranceModel.m */,
54E82EAC2CA9293C00C931D9 /* BoomInfoModel.h */,
54E82EAD2CA9293C00C931D9 /* BoomInfoModel.m */,
);
path = Model;
sourceTree = "<group>";
@@ -7313,6 +7361,8 @@
children = (
E89D60B8271D643A001F8895 /* Api+Room.h */,
E89D60B9271D643A001F8895 /* Api+Room.m */,
54E82EA92CA9261000C931D9 /* Api+Boom.h */,
54E82EAA2CA9261000C931D9 /* Api+Boom.m */,
);
path = Api;
sourceTree = "<group>";
@@ -10225,6 +10275,7 @@
E8AEAED3271412D00017FCE0 /* YMRoom */ = {
isa = PBXGroup;
children = (
54E82E9B2CA684A600C931D9 /* Features */,
E804875F2717DD70008595F2 /* Model */,
E80487602717DD89008595F2 /* Api */,
E8AEAED8271413530017FCE0 /* View */,
@@ -11614,6 +11665,7 @@
E83DB47A27462C4500D8CBD1 /* XPGiftBigPrizeModel.m in Sources */,
E86A16C52856DBEC004228B8 /* FindNewGreetListModel.m in Sources */,
2331C1632A5EB71000E1D940 /* XPNobleCenterPresenter.m in Sources */,
54E82EA22CA6886700C931D9 /* RoomBoomBannerAnimation.m in Sources */,
E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */,
9BBC028E2786FA060007C24B /* NobleCardModel.m in Sources */,
9BCB99A628F582EC00466D64 /* XPMineCollectRoomEditCell.m in Sources */,
@@ -11641,6 +11693,7 @@
23FF25762ABD66B90064E904 /* XPFreeGiftsObtainView.m in Sources */,
E81C27A226EF23490031E639 /* YUMINNNN.h in Sources */,
E80E900C27E0358900434B90 /* XPRoomTopicAlertView.m in Sources */,
54E82EA52CA693FA00C931D9 /* RoomBoomProgressView.m in Sources */,
9BDA3E7A27FD43EF00517FE6 /* XPAnchorFansTeamEntranceView.m in Sources */,
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
9BD8D4E328911E9900AE03FF /* XPMineCollectRoomListViewController.m in Sources */,
@@ -11722,6 +11775,7 @@
E85E7B262A4EB0D300B6D00A /* XPMineGuildViewController.m in Sources */,
E85E7B672A4EC35A00B6D00A /* XPBindExtractInfoModel.m in Sources */,
E86596512701A1C000846EBD /* StatisticsService.m in Sources */,
54E82EAB2CA9261000C931D9 /* Api+Boom.m in Sources */,
5412E0F42C4E460300FDD668 /* XPMineCenterAgencyView.m in Sources */,
23CEFC5E2AFB8FC100576D89 /* BSRealTimeView.m in Sources */,
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */,
@@ -12062,11 +12116,13 @@
9BC8C83028090C9200C24F85 /* XPRoomAnchorRankBannerView.m in Sources */,
E81A653F283511BE00F55894 /* XPMonentsInteractiveViewController.m in Sources */,
1464C5EA29A45FC300AF7C94 /* XPButton.m in Sources */,
54E82EB12CA93BE200C931D9 /* BoomInfoViewController.m in Sources */,
238B37C82AC55A2C00BFC9D5 /* XPTreasureFailyPrizeGiftView.m in Sources */,
2331C17E2A5ECCF600E1D940 /* XPNobleCenterPayView.m in Sources */,
E8395331276A03AE00CF2F24 /* Api+DressUp.m in Sources */,
E8B3E8092848B871009746AB /* InviteUserInfoModel.m in Sources */,
E85E7B352A4EB0D300B6D00A /* XPClanMemberTableViewCell.m in Sources */,
54E82EA82CA6940900C931D9 /* RoomBoomResultView.m in Sources */,
23194DBB2AD13EAB00649F51 /* PILoginManager.m in Sources */,
E8DEC99E2764A5B60078CB70 /* XPRoomMoreMenuViewController.m in Sources */,
E82325F2274E2DE6003A3332 /* XPUserCardViewController.m in Sources */,
@@ -12136,6 +12192,7 @@
2331C16E2A5EB71000E1D940 /* XPNobleAuthorityDescView.m in Sources */,
9BE01AE428937EDE00B50299 /* XPDressUpShopCollectionViewCell.m in Sources */,
1427219129A75F6F00C7C423 /* MultipartMessageHeaderField.m in Sources */,
54E82EAE2CA9293C00C931D9 /* BoomInfoModel.m in Sources */,
186A534B26FC6ED900D67B2C /* TTPopupManagerService.m in Sources */,
E8BD0F8B28A9EB0A00DE050D /* RoomSailingPrizeListModel.m in Sources */,
9BA812DD28BF6A7300783EA7 /* XPRoomRedPacketPresenter.m in Sources */,
@@ -12370,6 +12427,7 @@
E87DF50E2A42CF15009C1185 /* HomeLiveRoomModel.m in Sources */,
E8F6135F291E274E00E12650 /* NSArray+Safe.m in Sources */,
E87E62622A3F568A002F68C9 /* XPNewHomeNavView.m in Sources */,
54E82E9F2CA6876300C931D9 /* RoomBoomManager.m in Sources */,
18E7B33226F317A20064BC9B /* XPWebViewController.m in Sources */,
E8AEAEF927141CA30017FCE0 /* RoomHeaderView.m in Sources */,
545831A32C2AF01100364026 /* FifteenMicStageView.m in Sources */,
@@ -12994,7 +13052,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.20.39;
MARKETING_VERSION = 20.20.38;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -13346,7 +13404,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.20.39;
MARKETING_VERSION = 20.20.38;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",

View File

@@ -222,7 +222,7 @@ UIKIT_EXTERN NSString * adImageName;
case SplashInfoSkipTypeWeb: {
// H5
if (info.link.length > 0) {
XPWebViewController *webView = [[XPWebViewController alloc]init];
XPWebViewController *webView = [[XPWebViewController alloc] initWithRoomUID:nil];
webView.url = info.link;
[[[XCCurrentVCStackManager shareManager]currentNavigationController] pushViewController:webView animated:YES];
}

View File

@@ -144,7 +144,7 @@ NSString * const kYouMiNumberCountKey = @"kYouMinumbernnagna";
[att2 yy_setTextHighlightRange:NSMakeRange(8, 6) color:[DJDKMIMOMColor appMainColor] backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@kStrongify(self);
[TTPopup dismiss];
XPWebViewController *web = [[XPWebViewController alloc] init];
XPWebViewController *web = [[XPWebViewController alloc] initWithRoomUID:nil];
web.url = URLWithType(kPrivacyURL);
[self.controller.navigationController pushViewController:web animated:YES];
}];
@@ -152,7 +152,7 @@ NSString * const kYouMiNumberCountKey = @"kYouMinumbernnagna";
[att2 yy_setTextHighlightRange:NSMakeRange(15, 6) color:[DJDKMIMOMColor appMainColor] backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@kStrongify(self);
[TTPopup dismiss];
XPWebViewController *web = [[XPWebViewController alloc] init];
XPWebViewController *web = [[XPWebViewController alloc] initWithRoomUID:nil];
web.url = URLWithType(kUserProtocalURL);
[self.controller.navigationController pushViewController:web animated:YES];
}];

View File

@@ -621,7 +621,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
[attString yy_setTextHighlightRange:userRange color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@strongify(self);
//
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kUserProtocalURL);
[self.navigationController pushViewController:webVC animated:YES];
} longPressAction:nil];
@@ -634,7 +634,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
[attString yy_setTextHighlightRange:protocolRange color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@strongify(self);
//
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kPrivacyURL);
[self.navigationController pushViewController:webVC animated:YES];
} longPressAction:nil];

View File

@@ -91,7 +91,7 @@
}
#pragma mark - Event Response
- (void)checkButtonAction:(UIButton *)sender {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kUserLevelURL);
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -118,7 +118,7 @@
switch (type) {
case SecretaryRouterType_H5: {
if (value.length) {
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = value;
[self.nim_viewController.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -171,12 +171,12 @@
if (self.tweetModel.routerType == 1) {
[XPRoomViewController openRoom:self.tweetModel.routerValue viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
} else if (self.tweetModel.routerType == 2) {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = self.tweetModel.routerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
} else {
if ([self.tweetModel.webUrl hasPrefix:@"http"]) {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = self.tweetModel.webUrl;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -89,7 +89,7 @@
SessionSettingModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.row];
if (model.settingType == SessionSettingType_report) {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_report_click];
XPWebViewController *webVC = [[XPWebViewController alloc] init];
XPWebViewController *webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = [NSString stringWithFormat:@"%@?reportUid=%ld&source=CHAT",
URLWithType(kReportRoomURL),
self.userInfo.uid];

View File

@@ -204,7 +204,7 @@
#pragma mark - XPMineCustomNavViewDelegate
- (void)xPMineCustomNavView:(XPMineUserInfoCustomNavView *)view didClickEditButton:(UIButton *)sender {
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kCPRule);
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -229,7 +229,7 @@
if (info.skipType == ActivitySkipType_Room) {
[XPRoomViewController openRoom:info.skipUri viewController:self.navigationController];
} else if(info.skipType == ActivitySkipType_Web) {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = info.skipUri;
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -146,7 +146,7 @@
if (info.skipType == ActivitySkipType_Room) {
[XPRoomViewController openRoom:info.skipUri viewController:self.navigationController];
} else if(info.skipType == ActivitySkipType_Web) {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = info.skipUri;
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -165,7 +165,7 @@
switch (type) {
case ClickType_Diamond_Detail:
{
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kMineEarningsRecord);
[self.navigationController pushViewController:webVC animated:YES];
break;
@@ -195,7 +195,7 @@
{
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kGoldEarningsRecord);
[self.navigationController pushViewController:webVC animated:YES];

View File

@@ -8,13 +8,9 @@
#import "XPMineUserInfoViewController.h"
///Third
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import <SDCycleScrollView/SDCycleScrollView.h>
#import <JXPagingView/JXPagerView.h>
#import <JXPagingView/JXPagerListRefreshView.h>
#import <JXCategoryView/JXCategoryView.h>
#import <AFNetworking.h>
#import <ReactiveObjC/ReactiveObjC.h>
#import "UIView+VAP.h"
#import "QGVAPConfigModel.h"
#import "XPRoomGiftAnimationParser.h"
@@ -195,7 +191,7 @@ HWDMP4PlayDelegate>
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];
TTActionSheetConfig *report = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMineUserInfoViewController0") clickAction:^{
XPWebViewController *vc = [[XPWebViewController alloc]init];
XPWebViewController *vc = [[XPWebViewController alloc] initWithRoomUID:nil];
NSString *urlStr = [NSString stringWithFormat:@"%@?reportUid=%@&source=PERSONAL",URLWithType(kReportRoomURL),uid];
vc.url = urlStr;
[self.navigationController pushViewController:vc animated:YES];

View File

@@ -889,7 +889,7 @@
}
- (void)didTapHelpButton {
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kNobleRuleURL);
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -230,7 +230,7 @@ XPIAPRechargeHeadCellDelegate>
return;
}
XPWebViewController * webVC= [[XPWebViewController alloc] init];
XPWebViewController * webVC= [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kRechargePrivacyURL);
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -258,7 +258,7 @@
}
- (void)pushWebViewWIthUrl:(NSString *)url {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -342,7 +342,7 @@ UIKIT_EXTERN NSString *kRequestTicket;
}
- (void)pushWebViewWithUrl:(NSString *)url {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES];
}
@@ -472,7 +472,7 @@ UIKIT_EXTERN NSString *kRequestTicket;
return;
}
if([self.clanInfo.clanMode isEqualToString:@"family"]){
XPWebViewController *webViewVC = [XPWebViewController new];
XPWebViewController *webViewVC = [[XPWebViewController alloc] initWithRoomUID:nil];
NSString *url = self.clanInfo.family.familyId ? self.clanInfo.family.myFamilyUrl : self.clanInfo.family.familyListUrl;
if([url hasPrefix:@"/"]){
url = [url substringFromIndex:1];
@@ -714,7 +714,7 @@ UIKIT_EXTERN NSString *kRequestTicket;
break;
case HomeBannerInfoSkipType_Web:
{
XPWebViewController *vc = [[XPWebViewController alloc]init];
XPWebViewController *vc = [[XPWebViewController alloc]initWithRoomUID:nil];
vc.url = info.skipUri;
[self.navigationController pushViewController:vc animated:YES];
}

View File

@@ -35,7 +35,7 @@
}
- (void)pushWebViewWIthUrl:(NSString *)url {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -224,7 +224,7 @@
}
action1 = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMonentsTooBarView1") clickAction:^{
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.momentsInfo.uid, @"WORLDDYNAMIC"];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = url;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}];

View File

@@ -222,7 +222,7 @@
} else {
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMonentsUserInfoView1") clickAction:^{
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.momentsInfo.uid, @"WORLDDYNAMIC"];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = url;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}];

View File

@@ -300,7 +300,7 @@
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController6") clickAction:^{
@kStrongify(self);
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.momentsInfo.uid, @"WORLDDYNAMIC"];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES];
}];

View File

@@ -301,15 +301,16 @@
}
-(void)pushMyRoomVC{
NSString* roomUid = [[AccountInfoStorage instance] getUid];
// [XPRoomViewController openRoom:roomUid viewController:self];
self.headView.userInteractionEnabled = NO;
[self showLoading];
NSString* roomUid = [[AccountInfoStorage instance] getUid];
@kWeakify(self);
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
[self hideHUD];
self.headView.userInteractionEnabled = YES;
if (code == 200) {
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
if (roomInfo.isReselect) {

View File

@@ -49,7 +49,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,copy) NSArray<HomePlayRoomModel *> *playTeamList;
///
@@ -61,8 +60,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
///cell
@property(nonatomic,strong)XPNewHomePartyTableViewCell *pi_playAudioCell;
@end
@implementation XPHomeRecommendViewController
@@ -76,17 +73,12 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidAppear:animated];
[self.countDownHelper stopCountDown];
@@ -95,9 +87,8 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
[self.pi_playAudioCell setPlaySoundStatus:NO];
self.pi_playAudioCell = nil;
}
}
-(void)dealloc{
[[NSNotificationCenter defaultCenter]removeObserver:self];
}
@@ -109,7 +100,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
@@ -117,10 +107,10 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if(section == 0) return 1;
return self.personalRoomList.count > 0 ? self.personalRoomList.count : 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -128,7 +118,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
return self.playTeamList.count > 0 ? kGetScaleWidth(102) : kGetScaleWidth(75);
}
return self.personalRoomList.count > 0 ? kGetScaleWidth(104) : 300;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -139,7 +128,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
cell = [[XPNewHomePlayTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPNewHomePlayTableViewCell class])];
}
cell.playRoomList = self.playTeamList;
cell.delegate = self;
@@ -150,15 +138,11 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
cell = [[XPNewHomePlayEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPNewHomePlayEmptyTableViewCell class])];
}
cell.isClan = YES;
cell.delegate = self;
return cell;
}
XPNewHomePartyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPNewHomePartyTableViewCell class])];
if (cell == nil) {
cell = [[XPNewHomePartyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPNewHomePartyTableViewCell class])];
@@ -172,20 +156,13 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 0.01;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 0.01;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if(indexPath.section == 3) {
@@ -269,10 +246,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
[self showErrorToast:msg];
}
} uid:uid intoUid:uid];
}
///
-(void)updateRoomInformation:(LittleGameInfoModel *)gameModel roomInfo:(RoomInfoModel *)roomInfo{
@@ -314,16 +287,14 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
#pragma mark - XPHomeBannerTableViewCell
- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info {
switch (info.skipType) {
case HomeBannerInfoSkipType_Room:
{
case HomeBannerInfoSkipType_Room: {
if (info.skipUri.length > 0) {
[XPRoomViewController openRoom:info.skipUri viewController:self];
}
}
break;
case HomeBannerInfoSkipType_Web:
{
XPWebViewController *vc = [[XPWebViewController alloc]init];
case HomeBannerInfoSkipType_Web: {
XPWebViewController *vc = [[XPWebViewController alloc] initWithRoomUID:@(self.roomInfo.roomId).stringValue];
vc.url = info.skipUri;
[self.navigationController pushViewController:vc animated:YES];
}
@@ -333,13 +304,7 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
}
}
#pragma mark - XPHomeRecommendProtocol
- (void)getFriendList:(NSArray *)list{
for (int i = 0;i < list.count;i++) {
HomePlayRoomModel *model = list[i];
NSMutableArray *labels = [NSMutableArray array];

View File

@@ -57,10 +57,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
@interface XPNewHomeViewController ()<JXPagerViewDelegate,JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate,XPNewHomeHeadViewDelegate,XPHomeRecommendOtherRoomViewDelegate,XPHomeRecommendViewControllerDelegate>
///
//@property (nonatomic,strong) UIImageView *backImageView;
///
//@property (nonatomic,strong) XPNewHomeNavView *navView;
///
@property(nonatomic,strong) XPNewHomeHeadView *headView;
///
@@ -240,7 +236,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
#pragma mark - XPNewHomeNavViewDelegate
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickRank:(UIButton *)sender {
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kHomeRankURL);
[self.navigationController pushViewController:webVC animated:YES];
}
@@ -430,7 +426,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
///
-(void)selectItemWithModel:(PIHomeItemModel *)model{
if (model.resourceType == HomeMenuResourceType_H5) {
XPWebViewController * webVC = [[ XPWebViewController alloc] init];
XPWebViewController * webVC = [[ XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = model.resourceContent;
[self.navigationController pushViewController:webVC animated:YES];
}else if (model.resourceType == HomeMenuResourceType_Match) { //
@@ -469,7 +465,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
break;
case HomeBannerInfoSkipType_Web:
{
XPWebViewController *vc = [[XPWebViewController alloc]init];
XPWebViewController *vc = [[XPWebViewController alloc] initWithRoomUID:nil];
vc.url = model.skipUri;
[self.navigationController pushViewController:vc animated:YES];
}

View File

@@ -129,7 +129,7 @@
}
- (XPWebViewController *)webVC {
if (_webVC == nil) {
_webVC = [[XPWebViewController alloc] init];
_webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
_webVC.isProperty = YES;
_webVC.view.backgroundColor = [UIColor clearColor];
CGFloat heigth = 643 * kWebViewScale - kGetScaleWidth(60);

View File

@@ -46,23 +46,23 @@
#import "XPRoomAnimationView.h"
#import "MSRoomMenuGameVC.h"
#import "BoomInfoModel.h"
#import "BoomInfoViewController.h"
UIKIT_EXTERN NSString *kShowFirstRechargeView;
@interface XPRoomActivityContainerView ()<SDCycleScrollViewDelegate,PIRoomEnterRedPacketViewDelegate>
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) SDCycleScrollView *pi_cycleScrollView;
///
@property(nonatomic,strong) PIRoomEnterRedPacketView *redPacketView;
/// API
@property(nonatomic, strong) UIButton *configEntranceMenuButton;
///
@property(nonatomic, strong) UIButton *gambleMenuButton;
///
@property(nonatomic, strong) UIButton *pkMenuButton;
///
@property (nonatomic,strong) UIImageView *joinDatingView;
///host
@@ -72,6 +72,9 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
///
@property (nonatomic,assign) BOOL isLoadActivity;
@property (nonatomic, strong) UIView *boomView;
@property (nonatomic, strong) BoomInfoModel *boomModel;
@property (nonatomic, strong) NetImageView *loader_url_1;
@property (nonatomic, strong) NetImageView *loader_url_2;
@@ -99,6 +102,13 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
}
}
- (void)updateForBoom:(BoomInfoModel *)model {
_boomModel = model;
if (model) {
self.boomView.hidden = NO;
}
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.stackView];
@@ -107,6 +117,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
[self.stackView addArrangedSubview:emptyView];
[self.stackView addArrangedSubview:self.redPacketView];
[self.stackView addArrangedSubview:self.joinDatingView];
[self.stackView addArrangedSubview:self.boomView];
[self.stackView addArrangedSubview:self.pkMenuButton];
[self.stackView addArrangedSubview:self.configEntranceMenuButton];
[self.stackView addArrangedSubview:self.gambleMenuButton];
@@ -137,6 +148,11 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
make.size.mas_equalTo(itemSize);
}];
[self.boomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(0);
make.size.mas_equalTo(itemSize);
}];
[self.configEntranceMenuButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(0);
make.size.mas_equalTo(itemSize);
@@ -157,14 +173,14 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
self.playList = [NSMutableArray arrayWithArray:playModels];
self.littleGameList = [NSMutableArray arrayWithArray:littleGameModels];
self.gambleMenuButton.hidden = self.playList.count > 0 ? NO : YES;
self.gambleMenuButton.hidden = (self.playList.count == 0 && littleGameModels.count == 0) ? YES : NO;
[self onRoomUpdate];
return nil;
}] subscribeError:^(NSError * _Nullable error) {}];
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.uid];
[Api roomActivityList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
@@ -248,6 +264,9 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
RoomBottomEntranceModel *model = roomInfo.rightBottomIconConfig;
if (model) {
@kWeakify(self);
model.skipUrl = @"https://api.hfighting.com/molistar/modules/smashEggs/index.html";
model.icon1Url = @"https://image.pekolive.com/egg.png";
if (model.icon2Url.length > 0) {
if (!_loader_url_2) {
_loader_url_2 = [[NetImageView alloc] init];
@@ -594,9 +613,17 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
[self.hostDelegate.getCurrentNav presentViewController:vc animated:YES completion:nil];
}
- (void)displayBoomInfoProgress {
BoomInfoViewController *vc = [BoomInfoViewController vcFromBoomProgress:self.boomModel];
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
[self.hostDelegate.getCurrentNav presentViewController:vc animated:YES completion:nil];
}
- (void)didTapConfigEntranceButton {
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
RoomBottomEntranceModel *model = roomInfo.rightBottomIconConfig;
model.skipUrl = @"https://api.molistar.xyz/molistar/modules/smashEggs/index.html";
model.icon1Url = @"https://image.pekolive.com/egg.png";
if (!model) {
return;
}
@@ -606,7 +633,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
switch (model.skipType) {
case 1: {
XPWebViewController *vc = [[XPWebViewController alloc]init];
XPWebViewController *vc = [[XPWebViewController alloc] initWithRoomUID:@(roomInfo.uid).stringValue];
vc.url = model.skipUrl;
[self.hostDelegate.getCurrentNav pushViewController:vc animated:YES];
}
@@ -682,8 +709,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
return;
}
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:@(self.hostDelegate.getRoomInfo.uid).stringValue];
webVC.url = model.skipContent;
[self.hostDelegate.getCurrentNav pushViewController:webVC animated:YES];
}
@@ -796,5 +822,17 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
return _pkMenuButton;
}
- (UIView *)boomView {
if (!_boomView) {
_boomView = [[UIView alloc] init];
_boomView.hidden = YES;
_boomView.userInteractionEnabled = YES;
_boomView.backgroundColor = [UIColor systemYellowColor];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(displayBoomInfoProgress)];
[_boomView addGestureRecognizer:tap];
}
return _boomView;
}
@end

View File

@@ -594,7 +594,7 @@ HWDMP4PlayDelegate>
[XPRoomViewController openRoom:model.skipContent viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
});
}else if (model.skipType == 3){
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.isPush = YES;
webVC.url = model.skipContent;
[self.delegate.getCurrentNav pushViewController:webVC animated:YES];
@@ -659,9 +659,8 @@ HWDMP4PlayDelegate>
#pragma mark - XPRoomStarKitchenBannerViewDelegate
- (void)xPRoomStarKitchenBannerView:(XPRoomStarKitchenBannerView *)view didClick:(XPRoomStarKitchenModel *)starModel{
if(starModel.skipUrl == nil || starModel.skipUrl.length == 0)return;
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:starModel.roomUid];
webVC.isPush = YES;
webVC.roomUid = starModel.roomUid;
webVC.url = starModel.skipUrl;
[self.delegate.getCurrentNav pushViewController:webVC animated:YES];

View File

@@ -87,7 +87,7 @@ static CGFloat const kContentAspectRatio = 2/3.f;
- (XPWebViewController *)webVC {
if (_webVC == nil) {
_webVC = [[XPWebViewController alloc] init];
_webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
_webVC.view.backgroundColor = UIColor.clearColor;
}
return _webVC;

View File

@@ -1229,8 +1229,7 @@
webView.url = [NSString stringWithFormat:@"%@?roomUid=%@", URLWithType(kAnchorFansListURL), roomUid];
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
} else {
XPWebViewController * webVC =[[XPWebViewController alloc] init];
webVC.roomUid = roomUid;
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:roomUid];
webVC.url = URLWithType(kAnchorFansOpenURL);
[self.delegate.getCurrentNav pushViewController:webVC animated:YES];
}

View File

@@ -207,8 +207,6 @@
}
}];
}
}
}];
}

View File

@@ -202,7 +202,7 @@
- (XPWebViewController *)webVC {
if (_webVC == nil) {
_webVC = [[XPWebViewController alloc] init];
_webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
_webVC.isProperty = YES;
_webVC.view.backgroundColor = [UIColor clearColor];

View File

@@ -284,8 +284,7 @@
return;
}
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:@(self.hostDelegate.getRoomInfo.uid).stringValue];
webVC.url = model.skipContent;
[self.hostDelegate.getCurrentNav pushViewController:webVC animated:YES];
}

View File

@@ -506,7 +506,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
TTActionSheetConfig *action1 = [TTActionSheetConfig normalTitle:YMLocalizedString(@"RoomHeaderView12") clickAction:^{
[FFPopup dismissPopupForView:self.view animated:NO];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:@(self.roomInfo.roomId).stringValue];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%ld&source=ROOM", URLWithType(kReportRoomURL),self.hostDelegate.getRoomInfo.uid];
webVC.url = urlstr;
[[self.hostDelegate getCurrentNav] pushViewController:webVC animated:YES];

View File

@@ -102,7 +102,7 @@
[self.navigationController pushViewController:iapVC animated:YES];
}
- (void)clickRankAction{
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kLUDOUrl);
[self.navigationController pushViewController:webVC animated:YES];
}

View File

@@ -406,7 +406,7 @@
}];
TTActionSheetConfig *action1 = [TTActionSheetConfig normalTitle:YMLocalizedString(@"RoomHeaderView12") clickAction:^{
[FFPopup dismissPopupForView:self.recommendRoomView animated:NO];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:@(self.hostDelegate.getRoomInfo.uid).stringValue];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%ld&source=ROOM", URLWithType(kReportRoomURL),self.hostDelegate.getRoomInfo.uid];
webVC.url = urlstr;
[[self.hostDelegate getCurrentNav] pushViewController:webVC animated:YES];

View File

@@ -181,12 +181,6 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
return _giftButton;
}
- (UIView *)bottomDevideView {
if (!_bottomDevideView) {
_bottomDevideView = [[UIView alloc] init];

View File

@@ -596,8 +596,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
@kWeakify(self);
[self dismissViewControllerAnimated:NO completion:^{
@kStrongify(self);
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.roomUid = self.roomUid;
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:self.roomUid];
webVC.url = URLWithType(kNewWeekStarURL);
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}];
@@ -790,7 +789,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
#pragma mark - XPGiftTwelveStarBroadcastViewDelegate
- (void)xPGiftTwelveStarBroadcastView:(XPGiftTwelveStarBroadcastView *)view didClickDetail:(UIButton *)sender {
[self dismissViewControllerAnimated:NO completion:^{
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:self.roomUid];
webVC.url = URLWithType(kNewWeekStarURL);
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
}];

View File

@@ -554,8 +554,7 @@
- (void)tapGiftValueRecognizer {
if (self.giftValueView.hidden) return;
if (self.userInfo && self.userInfo.uid > 0) {
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:@(self.roomInfo.uid).stringValue];
if (self.roomInfo.leaveMode && self.userInfo.uid == self.roomInfo.uid) { ///
webVC.url = [NSString stringWithFormat:@"%@?uid=%ld&roomUid=%ld", URLWithType(kRoomCharmRankURL), (self.microModel.userInfo.uid ? self.microModel.userInfo.uid : self.roomInfo.uid),(long)self.roomInfo.uid];
} else {

View File

@@ -84,7 +84,7 @@
- (XPWebViewController *)webVC {
if (_webVC == nil) {
_webVC = [[XPWebViewController alloc] init];
_webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
_webVC.view.backgroundColor = [UIColor clearColor];
_webVC.webview.scrollView.backgroundColor = [UIColor clearColor];
_webVC.webview.opaque = NO;

View File

@@ -1159,7 +1159,7 @@
- (void)reportButtonAction:(UIButton *)sender {
[self dismissViewControllerAnimated:YES completion:nil];
XPWebViewController *vc = [[XPWebViewController alloc]init];
XPWebViewController *vc = [[XPWebViewController alloc] initWithRoomUID:@(self.cardInfo.roomInfo.uid).stringValue];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%@&source=USERCARD",URLWithType(kReportRoomURL),self.cardInfo.uid];
vc.url = urlstr;
[(UINavigationController *)self.presentingViewController pushViewController:vc animated:YES];

View File

@@ -335,7 +335,7 @@
if (model.skipType == 2){
[XPRoomViewController openRoom:model.skipContent viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
}else if (model.skipType == 3){
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:nil];
webVC.isPush = YES;
webVC.url = model.skipContent;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
@@ -799,9 +799,8 @@
#pragma mark - XPRoomStarKitchenBannerViewDelegate
- (void)xPRoomStarKitchenBannerView:(XPRoomStarKitchenBannerView *)view didClick:(XPRoomStarKitchenModel *)starModel{
if(starModel.skipUrl == nil || starModel.skipUrl.length == 0)return;
XPWebViewController * webVC = [[XPWebViewController alloc] init];
XPWebViewController * webVC = [[XPWebViewController alloc] initWithRoomUID:starModel.roomUid];
webVC.isPush = YES;
webVC.roomUid = starModel.roomUid;
webVC.url = starModel.skipUrl;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];

View File

@@ -980,7 +980,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)jumpToTask:(UITapGestureRecognizer *)ges {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventtask_toast_click];
XPWebViewController * webVC =[[XPWebViewController alloc] init];
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = self.taskTipView.url;
[self.selectedViewController.navigationController pushViewController:webVC animated:YES];
if (self.taskTipView.superview) {

View File

@@ -2,7 +2,7 @@
// XPWebViewController.h
// YuMi
//
// Created by zu on 2021/9/16.
// Created by z on 2021/9/16.
//
#import "BaseViewController.h"
@@ -23,8 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic,readonly) WKWebView *webview;
///跳转方式如果push的直接pushViewController不用dismissViewControllerAnimated后再pushViewController
@property (nonatomic,assign) BOOL isPush;
//TODO: 先这样传进来 等修改了保存房间信息的manager 之后在修改
@property (nonatomic,copy) NSString *roomUid;
///是否从精灵页面过来
@property (nonatomic,assign) BOOL isFairyPay;
@property (nonatomic,assign) BOOL is_Pi_FairyPay;
@@ -39,8 +38,17 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) void (^InitShowNavBlock)(BOOL show);
///关闭webView 目前适用于半屏的情况下
@property (nonatomic,copy) void (^CloseWebViewBlock)(BOOL result);
- (instancetype)initWithCustomizeNav:(BOOL)isCustom;
//- (instancetype)initWithGame;
///强制使用 roomUID 初始化,尽量传入,防止 web 在需要时取不到数据
// 更好的做法是,全具保持一个 roomUID 记录
@property (nonatomic,copy) NSString *roomUid;
- (instancetype)initWithRoomUID:(NSString * _Nullable)roomUid;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END

View File

@@ -139,6 +139,14 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
return self;
}
- (instancetype)initWithRoomUID:(NSString * _Nullable)roomUid {
self = [super init];
if (self) {
self.roomUid = roomUid;
}
return self;
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
@@ -200,6 +208,8 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
msg = YMLocalizedString(@"PIWebViewSavePhotoView3");
}
[self showSuccessToast:msg];
}
- (void)initView {
if (self.navigationController.viewControllers.count > 1){
@@ -270,6 +280,30 @@ NSString * const kJSOpenPaymentCallback = @"openPaymentCallback";
if (self.urlLoadCompleted) {
self.urlLoadCompleted(YES, nil);
}
NSString *fileName = @"vconsole.min.js"; //
NSString *directory = [[NSBundle mainBundle] resourcePath];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSDirectoryEnumerator *enumerator = [fileManager enumeratorAtPath:directory];
NSString *filePath;
for (NSString *path in enumerator) {
if ([[path lastPathComponent] containsString:fileName]) {
filePath = [directory stringByAppendingPathComponent:path];
break;
}
}
if (filePath.length > 0) {
NSString *vConsoleScript = [NSString stringWithContentsOfFile:filePath
encoding:NSUTF8StringEncoding error:nil];
[webView evaluateJavaScript:vConsoleScript completionHandler:nil];
// vConsole
NSString *initVConsoleScript = @"var vConsole = new VConsole();";
[webView evaluateJavaScript:initVConsoleScript completionHandler:nil];
}
}
//