Commit 639593b5 by 路少雄

新增H5配置

parent 53ecd4ee
......@@ -140,6 +140,7 @@
XHDataModel *model = [XHDataModel mj_objectWithKeyValues:responseObject[@"data"]];
XHGetDataManager.customerModel = model;
dispatch_async(self.main_queue_t, ^{
[weakSelf LoginSuccess];
});
} fail:^(id failMessage) {
......@@ -157,18 +158,45 @@
});
}];
}
// 请求h5链接
- (void)requestGiftLink{
HJSelfWeak;
[[XHHttpRequestManager shareManager] getHttpRequestURL:HFXGetGiftLink isJson:NO parameters:@{} success:^(id responseObject) {
[SVProgressHUD dismiss];
NSLog(@"responseObject:\n%@===%@",responseObject,responseObject[@"msg"]);
XHGetDataManager.giftLink = responseObject[@"data"];
dispatch_async(self.main_queue_t, ^{
[weakSelf setAppWindows];
[weakSelf setRootViewController];
});
} fail:^(id failMessage) {
}networkRequestsFail:^(id networkFail) {
}];
}
-(void)LoginSuccess{
HJSelfWeak;
dispatch_async(self.main_queue_t, ^{
[self setAppWindows];
[self setRootViewController];
[weakSelf setAppWindows];
[weakSelf setRootViewController];
});
}
// [self requestGiftLink];
}//
-(void)LoginAgain{
//断开蓝牙
HJGetBluetoothManager.noReconnect = true;
[HJGetBluetoothManager stopConnect];
[HJGetBluetoothManager stopScanning];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[HJGetBluetoothManager stopScanning];
});
// [HJGetBluetoothManager.delegate removeBluetoothDelegate:self];
[self resetDefaults];
[self setAppWindows];
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "DR_gift_Normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "DR_gift_Normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "DR_gift_Sel@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "DR_gift_Sel@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -168,9 +168,20 @@
self.tabBar.translucent = NO;
NSArray * normalItems = @[@"DR_Home_home-Normal",@"DR_Mine_Normal"];
NSArray * selectItmes = @[@"DR_Home_home-sel",@"DR_Mine_Sel"];
NSArray * controllClass = @[@"DXDeviceListVC",@"XHMineVC"];
NSArray * normalItems;
NSArray * selectItmes;
NSArray * controllClass;
if ([XHDataManager sharedManager].simparlanguage == 0) {
normalItems = @[@"DR_Home_home-Normal",@"DR_gift_Normal",@"DR_Mine_Normal"];
selectItmes = @[@"DR_Home_home-sel",@"DR_gift_Sel",@"DR_Mine_Sel"];
controllClass = @[@"DXDeviceListVC",@"DXBannerVC",@"XHMineVC"];
}else{
normalItems = @[@"DR_Home_home-Normal",@"DR_Mine_Normal"];
selectItmes = @[@"DR_Home_home-sel",@"DR_Mine_Sel"];
controllClass = @[@"DXDeviceListVC",@"XHMineVC"];
}
self.delegate = self;
NSMutableArray * controllers = [[NSMutableArray alloc]init];
for (int i = 0; i < normalItems.count; i++)
......
......@@ -63,7 +63,7 @@
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
[self setNavigationState];
[self addNotification];
[self addNotificationSuper];
[self initNavView];
[self startLocation1];
self.centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
......@@ -162,7 +162,7 @@
}
//添加通知
-(void)addNotification{
-(void)addNotificationSuper{
[HJNotificationCenter addObserver:self selector:@selector(popVcAction) name:@"popVC" object:nil];
}
......
......@@ -32,7 +32,13 @@
// [self bringSubviewToFront:self.scanBtn];
// 2.设置其它UITabBarButton的位置和尺寸//self.frame.size.width / 3;
CGFloat tabbarButtonW = HJScreenWidth / 2;
CGFloat tabbarButtonW;
if ([XHDataManager sharedManager].simparlanguage == 0 && TargetType == 5){
tabbarButtonW = HJScreenWidth / 3;
}else{
tabbarButtonW = HJScreenWidth / 2;
}
CGFloat tabbarButtonIndex = 0;
for (UIView *child in self.subviews) {
Class class = NSClassFromString(@"UITabBarButton");
......
......@@ -123,6 +123,8 @@
///// 个人模型
@property (nonatomic, strong) XHDataModel *customerModel;
@property (nonatomic,copy) NSString *giftLink;
+ (XHDataManager *)sharedManager;
+(void)saveValue:(id) value forKey:(NSString *)key;
......
......@@ -30,7 +30,7 @@
}
manager.requestSerializer.timeoutInterval = 50;
[manager.requestSerializer setValue:[NSString stringWithFormat:@"%d",XHGetDataManager.simparlanguage] forHTTPHeaderField:@"Accept-Language"];
[manager.requestSerializer setValue:XHGetDataManager.token forHTTPHeaderField:@"token"];
NSLog(@"%d",XHGetDataManager.simparlanguage );
[manager GET:url parameters:updateDic headers:nil progress:^(NSProgress * _Nonnull downloadProgress) {
......
......@@ -114,8 +114,16 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
DXBannerVC *banner = [DXBannerVC new];
banner.url = weakSelf.linkArray[index];
if(banner.url && ![banner.url isEqualToString:@""]){
banner.hidesBottomBarWhenPushed = YES;
[weakSelf.navigationController pushViewController:banner animated:YES];
if ([banner.url containsString:@"http://djmfa.imoreme.com"]) {
banner.hidesBottomBarWhenPushed = YES;
[weakSelf.tabBarController setSelectedIndex:1];
}else{
[weakSelf.navigationController pushViewController:banner animated:YES];
}
//
}else{
}
......@@ -140,7 +148,7 @@ static NSString *dxmachineCell = @"DXDeviceListCell";
weakSelf.linkArray = [NSMutableArray array];
for (XHBannerModel *model in weakSelf.bannerArray) {
[urlArray addObject:model.imgUrl];
[weakSelf.linkArray addObject:model.link];
[weakSelf.linkArray addObject:model.imgLink];
}
if (TargetType == 5 && weakSelf.bannerArray.count > 0) {
......
......@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *imgUrl;
@property (nonatomic,copy) NSString *link;
@property (nonatomic,copy) NSString *imgLink;
@end
NS_ASSUME_NONNULL_END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment