diff --git a/QXLive/Base/WKWebView+QX.m b/QXLive/Base/WKWebView+QX.m index 4843ebf..28bca30 100644 --- a/QXLive/Base/WKWebView+QX.m +++ b/QXLive/Base/WKWebView+QX.m @@ -30,6 +30,8 @@ NSArray *criticalDomains = @[ H5ServerUrl, ServerUrl, + RServerUrl, + RH5ServerUrl ]; NSDictionary *proxySettings = (__bridge NSDictionary *)CFNetworkCopySystemProxySettings(); for (NSString *domain in criticalDomains) { diff --git a/QXLive/Dynamic(语圈)/Controller/QXReportViewController.m b/QXLive/Dynamic(语圈)/Controller/QXReportViewController.m index 34f36e7..cbd4a50 100644 --- a/QXLive/Dynamic(语圈)/Controller/QXReportViewController.m +++ b/QXLive/Dynamic(语圈)/Controller/QXReportViewController.m @@ -41,8 +41,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; } - (void)loadData { // 1-用户,2房间,3动态&fromId=对应id + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSURL* url= [NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/report?id=%@&fromType=%@&fromId=%@&h=%ld",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token ,self.reportType,self.fromId,safeTop]]; + NSURL* url= [NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/report?id=%@&fromType=%@&fromId=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token ,self.reportType,self.fromId,safeTop]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Login(登录)/Controlller/QXLoginProtocolViewController.m b/QXLive/Login(登录)/Controlller/QXLoginProtocolViewController.m index 4961edf..8217b8d 100644 --- a/QXLive/Login(登录)/Controlller/QXLoginProtocolViewController.m +++ b/QXLive/Login(登录)/Controlller/QXLoginProtocolViewController.m @@ -39,7 +39,11 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; [self.view addSubview:self.contentWebView]; [self.view addSubview:self.progressView]; [self layoutConstraints]; - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@%@?id=%ld",ServerUrl,QXAppProtocol,self.type]]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@%@?id=%ld",server,QXAppProtocol,self.type]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Login(登录)/Controlller/QXLoginViewController.m b/QXLive/Login(登录)/Controlller/QXLoginViewController.m index e109d07..f2f9dc8 100644 --- a/QXLive/Login(登录)/Controlller/QXLoginViewController.m +++ b/QXLive/Login(登录)/Controlller/QXLoginViewController.m @@ -287,12 +287,16 @@ return frame; }; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } model.checkBoxImages = @[[UIImage imageNamed:@"login_agreement_nor"],[UIImage imageNamed:@"login_agreement_sel"]]; model.checkBoxWH = 30; model.privacyNavBackImage = [UIImage imageNamed:@"back"]; model.checkBoxIsChecked = YES; - model.privacyOne = @[[NSString stringWithFormat:@"%@",QXText(@"《用户使用协议》")],[NSString stringWithFormat:@"%@%@?id=6",ServerUrl,QXAppProtocol]]; - model.privacyTwo = @[[NSString stringWithFormat:@"%@",QXText(@"《隐私政策》")],[NSString stringWithFormat:@"%@%@?id=4",ServerUrl,QXAppProtocol]]; + model.privacyOne = @[[NSString stringWithFormat:@"%@",QXText(@"《用户使用协议》")],[NSString stringWithFormat:@"%@%@?id=6",server,QXAppProtocol]]; + model.privacyTwo = @[[NSString stringWithFormat:@"%@",QXText(@"《隐私政策》")],[NSString stringWithFormat:@"%@%@?id=4",server,QXAppProtocol]]; model.privacyOperatorPreText = @"《"; model.privacyOperatorSufText = @"》"; model.privacyColors = @[RGB16(0x333333),QXConfig.themeColor]; diff --git a/QXLive/Manager/QXManagerMqtt.m b/QXLive/Manager/QXManagerMqtt.m index 3c52b2a..3bfd64d 100755 --- a/QXLive/Manager/QXManagerMqtt.m +++ b/QXLive/Manager/QXManagerMqtt.m @@ -32,6 +32,10 @@ } #pragma mark - 绑定 - (void)bindWithUserName:(NSString *)username password:(NSString *)password cliendId:(NSString *)cliendId isSSL:(BOOL)isSSL{ + NSString *server = AddressOfMQTTServer; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RAddressOfMQTTServer; + } self.username = username; self.password = password; self.cliendId = cliendId; diff --git a/QXLive/Message(音信)/Controller/群聊/QXGuildGroupSettingVC.m b/QXLive/Message(音信)/Controller/群聊/QXGuildGroupSettingVC.m index d0be2ba..31661c7 100644 --- a/QXLive/Message(音信)/Controller/群聊/QXGuildGroupSettingVC.m +++ b/QXLive/Message(音信)/Controller/群聊/QXGuildGroupSettingVC.m @@ -41,7 +41,11 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/union/setGroup?id=%@&guildId=%@",H5ServerUrl,QXGlobal.shareGlobal.loginModel.token,self.groupId]]; + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/union/setGroup?id=%@&guildId=%@",server,QXGlobal.shareGlobal.loginModel.token,self.groupId]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Mine(音域)/Controller/亲密关系/QXHeartBeatSpaceViewController.m b/QXLive/Mine(音域)/Controller/亲密关系/QXHeartBeatSpaceViewController.m index e8370f9..56fe76c 100644 --- a/QXLive/Mine(音域)/Controller/亲密关系/QXHeartBeatSpaceViewController.m +++ b/QXLive/Mine(音域)/Controller/亲密关系/QXHeartBeatSpaceViewController.m @@ -138,8 +138,12 @@ } -(void)helpAction{ + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } QXHeartBeatLevelRuleView *view = [[QXHeartBeatLevelRuleView alloc] init]; - NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=31",ServerUrl]; + NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=31",server]; view.rule = urlStr; [view showInView:self.view]; } diff --git a/QXLive/Mine(音域)/Controller/公会中心/QXGuildViewController.m b/QXLive/Mine(音域)/Controller/公会中心/QXGuildViewController.m index 3d05159..0035f83 100644 --- a/QXLive/Mine(音域)/Controller/公会中心/QXGuildViewController.m +++ b/QXLive/Mine(音域)/Controller/公会中心/QXGuildViewController.m @@ -43,8 +43,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSString *urlString = [NSString stringWithFormat:@"%@web/index.html#/pages/union/index?id=%@&h=%ld",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,safeTop]; + NSString *urlString = [NSString stringWithFormat:@"%@web/index.html#/pages/union/index?id=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,safeTop]; if ([self.joinGuild isExist]) { urlString = [urlString stringByAppendingFormat:@"&guild_id=%@",self.joinGuild]; diff --git a/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m b/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m index 6b349d9..6ff43b5 100644 --- a/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m +++ b/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m @@ -60,8 +60,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/help?id=%@&h=%ld",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,safeTop]]; + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/help?id=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,safeTop]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Mine(音域)/Controller/歌单列表/QXMineSongListViewController.m b/QXLive/Mine(音域)/Controller/歌单列表/QXMineSongListViewController.m index 0913cf2..44b7635 100644 --- a/QXLive/Mine(音域)/Controller/歌单列表/QXMineSongListViewController.m +++ b/QXLive/Mine(音域)/Controller/歌单列表/QXMineSongListViewController.m @@ -82,7 +82,11 @@ }]; } -(void)helpAction{ - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"34"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"34"]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Mine(音域)/Controller/歌手认证/QXRoomSingerAuthViewController.m b/QXLive/Mine(音域)/Controller/歌手认证/QXRoomSingerAuthViewController.m index ddd39f5..4afebf9 100644 --- a/QXLive/Mine(音域)/Controller/歌手认证/QXRoomSingerAuthViewController.m +++ b/QXLive/Mine(音域)/Controller/歌手认证/QXRoomSingerAuthViewController.m @@ -99,7 +99,11 @@ } } -(void)helpAction{ - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"33"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"33"]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Mine(音域)/Controller/段位/QXLevelViewController.m b/QXLive/Mine(音域)/Controller/段位/QXLevelViewController.m index e08f333..18e1b65 100644 --- a/QXLive/Mine(音域)/Controller/段位/QXLevelViewController.m +++ b/QXLive/Mine(音域)/Controller/段位/QXLevelViewController.m @@ -40,8 +40,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/grade?id=%@&type=%d&h=%ld",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,0,safeTop]]; + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/grade?id=%@&type=%d&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,0,safeTop]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m b/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m index a4602ed..4c9a5ed 100644 --- a/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m +++ b/QXLive/Mine(音域)/Controller/爵位/QXNobilityBuyViewController.m @@ -176,7 +176,11 @@ } -(void)agreementAction{ // id = 30; - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"30"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"30"]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Mine(音域)/Controller/爵位/QXNobilityDetailViewController.m b/QXLive/Mine(音域)/Controller/爵位/QXNobilityDetailViewController.m index e0fd623..c08fbbb 100644 --- a/QXLive/Mine(音域)/Controller/爵位/QXNobilityDetailViewController.m +++ b/QXLive/Mine(音域)/Controller/爵位/QXNobilityDetailViewController.m @@ -56,7 +56,11 @@ } -(void)helpAction{ - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"29"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"29"]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m b/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m index fab8cb8..39eaa28 100644 --- a/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m +++ b/QXLive/Mine(音域)/Controller/爵位/QXNobilityViewController.m @@ -108,7 +108,11 @@ -(void)helpAction{ - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"29"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"29"]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m b/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m index 671ec5d..e164232 100644 --- a/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m +++ b/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m @@ -41,8 +41,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; } - (void)loadData { // H5ServerUrl + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs?h=%ld",H5ServerUrl,safeTop]; + NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs?h=%ld",server,safeTop]; NSURL* url=[NSURL URLWithString:urlStr]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; diff --git a/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m b/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m index 90a25b5..c074d77 100644 --- a/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m +++ b/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m @@ -60,7 +60,11 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/prop/propMall?id=%@&is_show=%@",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]]; + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/prop/propMall?id=%@&is_show=%@",server,[QXGlobal shareGlobal].loginModel.token,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m b/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m index 4d79d14..e538a4f 100644 --- a/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m +++ b/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m @@ -62,8 +62,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/income??id=%@&h=%ld&is_show=%@",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,safeTop,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]]; + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/income??id=%@&h=%ld&is_show=%@",server,[QXGlobal shareGlobal].loginModel.token,safeTop,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Mine(音域)/View/每日任务/QXDayTaskRuleView.m b/QXLive/Mine(音域)/View/每日任务/QXDayTaskRuleView.m index 41403af..654c97b 100644 --- a/QXLive/Mine(音域)/View/每日任务/QXDayTaskRuleView.m +++ b/QXLive/Mine(音域)/View/每日任务/QXDayTaskRuleView.m @@ -38,7 +38,11 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; [self removeFromSuperview]; } - (void)loadData { - NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/taskDesc",H5ServerUrl]; + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } + NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/taskDesc",server]; NSURL* url=[NSURL URLWithString:urlStr]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; diff --git a/QXLive/Mine(音域)/View/钱包/QXWalletRuleView.m b/QXLive/Mine(音域)/View/钱包/QXWalletRuleView.m index 03c72d3..07acece 100644 --- a/QXLive/Mine(音域)/View/钱包/QXWalletRuleView.m +++ b/QXLive/Mine(音域)/View/钱包/QXWalletRuleView.m @@ -83,7 +83,11 @@ [self hide]; } - (void)loadData { - NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=28",ServerUrl]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=28",server]; NSURL* url=[NSURL URLWithString:urlStr]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; diff --git a/QXLive/Network/QXRequest.m b/QXLive/Network/QXRequest.m index 0eed390..f374785 100644 --- a/QXLive/Network/QXRequest.m +++ b/QXLive/Network/QXRequest.m @@ -209,7 +209,11 @@ static NSInteger HTTP_ERROR_CODE = 0; return nil; } if (!([urlString hasPrefix:@"http"] || [urlString hasPrefix:@"https"])) { - urlString = [NSString stringWithFormat:@"%@%@",ServerUrl,urlString]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + urlString = [NSString stringWithFormat:@"%@%@",server,urlString]; } NSLog(@"发起请求 --- URL : %@",urlString); diff --git a/QXLive/Other/NoitceAndKey.h b/QXLive/Other/NoitceAndKey.h index 94d6bca..8555de3 100644 --- a/QXLive/Other/NoitceAndKey.h +++ b/QXLive/Other/NoitceAndKey.h @@ -36,6 +36,7 @@ static NSString *const TencentIMSecret = @"448a3259085924f89957c1884c761974e8fde //static NSString *const AddressOfMQTTServer = @"1.13.181.248"; static NSString *const AddressOfMQTTServer = @"test.vespa.qxyushen.top"; +static NSString *const RAddressOfMQTTServer = @"test.vespa.qxyushen.top"; static NSInteger const AddressOfMQTTPort = 1883; static NSInteger const AppPushId = 46164; @@ -61,6 +62,7 @@ static NSString *const TencentIMSecret = @"d9a5b8088ed39113d0c92ae434bc37528c471 //static NSString *const AddressOfMQTTServer = @"1.13.20.30"; static NSString *const AddressOfMQTTServer = @"yushengapi.qxyushen.top"; +static NSString *const RAddressOfMQTTServer = @"qixinghuishen.qxhs.xyz"; static NSInteger const AddressOfMQTTPort = 1883; static NSInteger const AppPushId = 46163; diff --git a/QXLive/Other/QXApi.h b/QXLive/Other/QXApi.h index 06db60b..b5f24ec 100644 --- a/QXLive/Other/QXApi.h +++ b/QXLive/Other/QXApi.h @@ -27,8 +27,8 @@ static NSString* RH5ServerUrl = @"https://test.vespa.qxyushen.top/h5/"; //static NSString* H5ServerUrl = @"https://vespa.qxyushen.top/h5/"; static NSString* ServerUrl = @"https://yushengapi.qxyushen.top/"; static NSString* H5ServerUrl = @"https://yushengapi.qxyushen.top/h5/"; -static NSString* RServerUrl = @"https://vespa.qxhs.xyz/"; -static NSString* RH5ServerUrl = @"https://vespa.qxhs.xyz/h5/"; +static NSString* RServerUrl = @"https://qixinghuishen.qxhs.xyz/"; +static NSString* RH5ServerUrl = @"https://qixinghuishen.qxhs.xyz/h5/"; #endif #pragma mark - 引导页 /// 引导页 diff --git a/QXLive/Room(房间)/View/QXAllRoomHourRankView.m b/QXLive/Room(房间)/View/QXAllRoomHourRankView.m index 28800e5..8c5e4ad 100644 --- a/QXLive/Room(房间)/View/QXAllRoomHourRankView.m +++ b/QXLive/Room(房间)/View/QXAllRoomHourRankView.m @@ -182,7 +182,11 @@ -(void)helpAction{ QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"24"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"24"]; vc.urlStr = urlString; [self.viewController.navigationController pushViewController:vc animated:YES]; } diff --git a/QXLive/Room(房间)/View/红包/QXRedBagSendView.m b/QXLive/Room(房间)/View/红包/QXRedBagSendView.m index b7fe81c..20b0088 100644 --- a/QXLive/Room(房间)/View/红包/QXRedBagSendView.m +++ b/QXLive/Room(房间)/View/红包/QXRedBagSendView.m @@ -798,7 +798,11 @@ -(void)helpAction{ self.isFromRule = YES; - NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@api/Page/page_show?id=25",ServerUrl]]]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@api/Page/page_show?id=25",server]]]; [self.webView loadRequest:request]; self.backBtn.hidden = NO; self.helpBtn.hidden = YES; diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeAuctionView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeAuctionView.m index 151f3fc..ec0dc74 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeAuctionView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeAuctionView.m @@ -1082,7 +1082,11 @@ /// 亲密 Id = @"22"; } - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,Id]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,Id]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.viewController.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSignView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSignView.m index 85feb44..365ea6c 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSignView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSignView.m @@ -497,7 +497,11 @@ } -(void)helpAction{ - NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"32"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"32"]; QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init]; vc.urlStr = urlString; [self.viewController.navigationController pushViewController:vc animated:YES]; diff --git a/QXLive/Tools/COS/QXCOSUploadManager.m b/QXLive/Tools/COS/QXCOSUploadManager.m index bb1c900..eaf890f 100644 --- a/QXLive/Tools/COS/QXCOSUploadManager.m +++ b/QXLive/Tools/COS/QXCOSUploadManager.m @@ -28,7 +28,11 @@ return self; } -(void)uploadFile:(id)file withObjectKey:(NSString *)key path:(NSString *)path complete:(void (^)(NSString * _Nonnull, QXCOSUploadImageState))complete { - [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]]; if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) { QXLOG(@"服务端配置错误"); @@ -98,7 +102,11 @@ } -(void)audioUploadFile:(id)file withObjectKey:(NSString *)key complete:(void (^)(NSString * fileUrl, QXCOSUploadImageState state))complete{ - [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]]; if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) { QXLOG(@"服务端配置错误"); @@ -168,7 +176,11 @@ } -(void)uploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray * _Nullable, QXCOSUploadImageState))complete{ - [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]]; if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) { QXLOG(@"服务端配置错误"); @@ -264,7 +276,11 @@ } -(void)activityUploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray * _Nonnull, QXCOSUploadImageState))complete{ - [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) { QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]]; if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) { QXLOG(@"服务端配置错误"); diff --git a/QXLive/chirld(青少年)/QXChirldViewController.m b/QXLive/chirld(青少年)/QXChirldViewController.m index 9b72c02..85f6c6f 100644 --- a/QXLive/chirld(青少年)/QXChirldViewController.m +++ b/QXLive/chirld(青少年)/QXChirldViewController.m @@ -41,8 +41,12 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { + NSString *server = H5ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RH5ServerUrl; + } NSInteger safeTop = kSafeAreaTop; - NSURL* url= [NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/teenage?id=%@&h=%ld",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,safeTop]]; + NSURL* url= [NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/teenage?id=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,safeTop]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/活动/天空之境/QXSkyPraizePoolView.m b/QXLive/活动/天空之境/QXSkyPraizePoolView.m index 362698c..2149c48 100644 --- a/QXLive/活动/天空之境/QXSkyPraizePoolView.m +++ b/QXLive/活动/天空之境/QXSkyPraizePoolView.m @@ -71,7 +71,11 @@ return; } MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":self.giftModel.gift_bag?self.giftModel.gift_bag:@"",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":self.giftModel.gift_bag?self.giftModel.gift_bag:@"",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.model = model; [self.collectionView reloadData]; diff --git a/QXLive/活动/天空之境/QXSkyPraizeRecordView.m b/QXLive/活动/天空之境/QXSkyPraizeRecordView.m index 6090bfc..8bd5d99 100644 --- a/QXLive/活动/天空之境/QXSkyPraizeRecordView.m +++ b/QXLive/活动/天空之境/QXSkyPraizeRecordView.m @@ -125,11 +125,15 @@ @"gift_bag_id":self.giftModel.gift_bag, @"page":[NSNumber numberWithInteger:self.page] }; - NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_my_record"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"]; if (self.myRecordBtn.selected) { - url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_my_record"]; + url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"]; }else{ - url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_all_record"]; + url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_all_record"]; } [[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) { if (weakSelf.myRecordBtn.selected == YES) { diff --git a/QXLive/活动/天空之境/QXSkyPraizeView.m b/QXLive/活动/天空之境/QXSkyPraizeView.m index 12c9357..d16ccf6 100644 --- a/QXLive/活动/天空之境/QXSkyPraizeView.m +++ b/QXLive/活动/天空之境/QXSkyPraizeView.m @@ -348,7 +348,11 @@ static NSInteger toSlowCount = 4; // return; // } MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":self.giftModel.gift_bag?self.giftModel.gift_bag:@"",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":self.giftModel.gift_bag?self.giftModel.gift_bag:@"",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.model = model; weakSelf.centerView.model = model; @@ -405,7 +409,11 @@ static NSInteger toSlowCount = 4; }; self.isDrawing = YES; MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { QXDrawGiftResultModel *model = [QXDrawGiftResultModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.drawResultModel = model; [weakSelf.targetArrayIndex removeAllObjects]; @@ -634,7 +642,11 @@ static NSInteger toSlowCount = 4; NSDictionary *parameters = @{ @"send_id":self.drawResultModel.blind_box_turntable_id?self.drawResultModel.blind_box_turntable_id:@"" }; - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) { } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { diff --git a/QXLive/活动/岁月之城/QXAgePraizePoolView.m b/QXLive/活动/岁月之城/QXAgePraizePoolView.m index d2c5087..83eaffc 100644 --- a/QXLive/活动/岁月之城/QXAgePraizePoolView.m +++ b/QXLive/活动/岁月之城/QXAgePraizePoolView.m @@ -65,7 +65,11 @@ return; } MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"11",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"11",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.model = model; [self.collectionView reloadData]; diff --git a/QXLive/活动/岁月之城/QXAgePraizeRecordView.m b/QXLive/活动/岁月之城/QXAgePraizeRecordView.m index af54f4f..1a528dc 100644 --- a/QXLive/活动/岁月之城/QXAgePraizeRecordView.m +++ b/QXLive/活动/岁月之城/QXAgePraizeRecordView.m @@ -118,11 +118,15 @@ @"gift_bag_id":@"11", @"page":[NSNumber numberWithInteger:self.page] }; - NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_my_record"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"]; if (self.myRecordBtn.selected) { - url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_my_record"]; + url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"]; }else{ - url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_all_record"]; + url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_all_record"]; } [[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) { if (weakSelf.myRecordBtn.selected == YES) { diff --git a/QXLive/活动/岁月之城/QXAgePraizeView.m b/QXLive/活动/岁月之城/QXAgePraizeView.m index e5c9a36..eb9e437 100644 --- a/QXLive/活动/岁月之城/QXAgePraizeView.m +++ b/QXLive/活动/岁月之城/QXAgePraizeView.m @@ -368,7 +368,11 @@ static NSInteger toSlowCount = 4; // return; // } MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"11",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"11",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.model = model; weakSelf.centerView.model = model; @@ -419,7 +423,11 @@ static NSInteger toSlowCount = 4; }; self.isDrawing = YES; MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { QXDrawGiftResultModel *model = [QXDrawGiftResultModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.drawResultModel = model; [weakSelf.targetArrayIndex removeAllObjects]; @@ -648,7 +656,11 @@ static NSInteger toSlowCount = 4; NSDictionary *parameters = @{ @"send_id":self.drawResultModel.blind_box_turntable_id?self.drawResultModel.blind_box_turntable_id:@"" }; - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) { } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { diff --git a/QXLive/活动/巡乐会/QXMeetActivityPoolView.m b/QXLive/活动/巡乐会/QXMeetActivityPoolView.m index 51154e9..c7bd116 100644 --- a/QXLive/活动/巡乐会/QXMeetActivityPoolView.m +++ b/QXLive/活动/巡乐会/QXMeetActivityPoolView.m @@ -63,7 +63,11 @@ return; } MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/xlh"] parameters:@{@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/xlh"] parameters:@{@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { QXActivityXLHModel *model = [QXActivityXLHModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.model = model; [self.collectionView reloadData]; diff --git a/QXLive/活动/巡乐会/QXMeetActivityRankView.m b/QXLive/活动/巡乐会/QXMeetActivityRankView.m index 8733bc0..9e80cf7 100644 --- a/QXLive/活动/巡乐会/QXMeetActivityRankView.m +++ b/QXLive/活动/巡乐会/QXMeetActivityRankView.m @@ -105,8 +105,12 @@ @"room_id":self.roomId?self.roomId:@"", @"page":[NSNumber numberWithInteger:self.page] }; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } if ([type isEqualToString:@"1"]) { - NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_xlh_all_record"]; + NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_xlh_all_record"]; [[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) { if (weakSelf.page == 1) { [weakSelf.allRecordArray removeAllObjects]; @@ -126,7 +130,7 @@ [weakSelf.tableView.mj_header endRefreshing]; }]; }else{ - NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_xlh_ranking"]; + NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_xlh_ranking"]; [[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) { if (weakSelf.page == 1) { [weakSelf.allRecordArray removeAllObjects]; diff --git a/QXLive/活动/巡乐会/QXMeetActivityRecordView.m b/QXLive/活动/巡乐会/QXMeetActivityRecordView.m index d27c36b..6b4a177 100644 --- a/QXLive/活动/巡乐会/QXMeetActivityRecordView.m +++ b/QXLive/活动/巡乐会/QXMeetActivityRecordView.m @@ -79,7 +79,11 @@ @"room_id":self.roomId?self.roomId:@"", @"page":[NSNumber numberWithInteger:self.page] }; - NSString *url = [NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_xlh_my_record"]; + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_xlh_my_record"]; [[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) { if (weakSelf.page == 1) { [weakSelf.myRecordArray removeAllObjects]; diff --git a/QXLive/活动/巡乐会/QXMeetActivityView.m b/QXLive/活动/巡乐会/QXMeetActivityView.m index 7dcc5b0..f143f68 100644 --- a/QXLive/活动/巡乐会/QXMeetActivityView.m +++ b/QXLive/活动/巡乐会/QXMeetActivityView.m @@ -354,7 +354,11 @@ // return; // } MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/xlh"] parameters:@{@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/xlh"] parameters:@{@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) { QXActivityXLHModel *model = [QXActivityXLHModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.model = model; [weakSelf configData]; @@ -401,7 +405,11 @@ self.isDrawing = YES; self.resultView.times = num; MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/xlh_draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/xlh_draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { weakSelf.resultArray = [NSArray yy_modelArrayWithClass:[QXDrawGiftModel class] json:responseObject[@"data"]]; [weakSelf getMyWallet]; if (weakSelf.jumpAnimateBtn.selected) { diff --git a/QXLive/活动/时空之巅/QXTimePraizeView.m b/QXLive/活动/时空之巅/QXTimePraizeView.m index eca6650..dad2dce 100644 --- a/QXLive/活动/时空之巅/QXTimePraizeView.m +++ b/QXLive/活动/时空之巅/QXTimePraizeView.m @@ -430,7 +430,11 @@ static NSInteger toSlowCount = 4; }; self.isDrawing = YES; MJWeakSelf - [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { + NSString *server = ServerUrl; + if (QXGlobal.shareGlobal.isNeedChangeServer) { + server = RServerUrl; + } + [[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) { QXDrawGiftResultModel *model = [QXDrawGiftResultModel yy_modelWithJSON:responseObject[@"data"]]; weakSelf.drawResultModel = model; [weakSelf.targetArrayIndex removeAllObjects];