提交
This commit is contained in:
@@ -8,8 +8,11 @@
|
||||
#import "QXAppStartViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "TUIChatConfig.h"
|
||||
#import "OpenUDID.h"
|
||||
#import "QXManagerMqtt.h"
|
||||
@interface QXAppStartViewController ()
|
||||
@property (nonatomic,strong)UIImageView *bgImaegView;
|
||||
@property (nonatomic,assign)BOOL isNeedChangeServer;
|
||||
@end
|
||||
|
||||
@implementation QXAppStartViewController
|
||||
@@ -47,7 +50,11 @@
|
||||
@property (nonatomic,strong)NSString *icon_wd_notselect;
|
||||
*/
|
||||
-(void)getAppTheme{
|
||||
NSString *themeUrl = [NSString stringWithFormat:@"%@%@",ServerUrl,QXAppTheme];
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *themeUrl = [NSString stringWithFormat:@"%@%@",server,QXAppTheme];
|
||||
[[QXRequset shareInstance] getWithUrl:themeUrl parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
[QXConfig defaultConfig];
|
||||
QXTabbarModel *tabbarIndex1 = QXConfig.shared.tabbarArray[0];
|
||||
@@ -145,10 +152,13 @@
|
||||
BOOL api_version = [responseObject[@"api_version"] boolValue];
|
||||
TUIChatConfig.defaultConfig.isAppStore = api_version;
|
||||
[QXGlobal shareGlobal].isAppStore = api_version;
|
||||
NSString *clientId = [OpenUDID value];
|
||||
[[QXManagerMqtt sharedInstance] bindWithUserName:@"public" password:@"" cliendId:clientId isSSL:NO];
|
||||
NSLog(@"请求成功");
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
NSLog(@"请求失败");
|
||||
[self alertNetworkError];
|
||||
QXGlobal.shareGlobal.isNeedChangeServer = YES;
|
||||
}];
|
||||
}
|
||||
-(void)loginSuccess{
|
||||
|
||||
@@ -20,6 +20,7 @@ typedef void (^showFinishBlock)(void);
|
||||
@interface QXGlobal : NSObject
|
||||
+(instancetype)shareGlobal;
|
||||
@property (nonatomic,assign)BOOL isNeedUpdate;
|
||||
@property (nonatomic,assign)BOOL isNeedChangeServer;
|
||||
// 是否登录
|
||||
@property (nonatomic,readonly,assign)BOOL isLogin;
|
||||
@property (nonatomic,assign)BOOL isShowLoginVC;
|
||||
|
||||
@@ -77,8 +77,6 @@
|
||||
[[QXLocationManager shareManager] startLoction];
|
||||
[QXLocationManager shareManager].delegate = self;
|
||||
[self getUserInfo];
|
||||
NSString *clientId = [OpenUDID value];
|
||||
[[QXManagerMqtt sharedInstance] bindWithUserName:@"public" password:@"" cliendId:clientId isSSL:NO];
|
||||
}
|
||||
-(void)onConnectSuccess{
|
||||
// showToast(@"腾讯重连服务器成功");
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
//tmd.xscmmidi.site -- 这是接口 api
|
||||
#if DEVELOPENT == 1
|
||||
static NSString* ServerUrl = @"https://test.vespa.qxyushen.top/";
|
||||
//static NSString* ServerUrl = @"http://test.chat.qxyushen.top";
|
||||
static NSString* H5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
static NSString* RServerUrl = @"https://test.vespa.qxyushen.top/";
|
||||
static NSString* RH5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
#else
|
||||
//static NSString* ServerUrl = @"https://test.vespa.qxyushen.top/";
|
||||
//static NSString* H5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
@@ -26,6 +27,8 @@ static NSString* H5ServerUrl = @"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/";
|
||||
#endif
|
||||
#pragma mark - 引导页
|
||||
/// 引导页
|
||||
|
||||
@@ -66,7 +66,11 @@
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"12",@"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":@"12",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
[self.collectionView reloadData];
|
||||
|
||||
@@ -118,11 +118,15 @@
|
||||
@"gift_bag_id":@"12",
|
||||
@"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) {
|
||||
|
||||
@@ -375,7 +375,11 @@ static NSInteger toSlowCount = 4;
|
||||
// return;
|
||||
// }
|
||||
MJWeakSelf
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",ServerUrl,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"12",@"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":@"12",@"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;
|
||||
@@ -655,7 +659,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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user