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