1.1.15
This commit is contained in:
@@ -36,54 +36,109 @@
|
||||
-(void)appStartNetWork{
|
||||
[self getAppTheme];
|
||||
}
|
||||
|
||||
/**
|
||||
@property (nonatomic,strong)NSString *icon_sy_select;
|
||||
@property (nonatomic,strong)NSString *icon_sy_notselect;
|
||||
@property (nonatomic,strong)NSString *icon_dt_select;
|
||||
@property (nonatomic,strong)NSString *icon_dt_notselect;
|
||||
@property (nonatomic,strong)NSString *icon_xx_select;
|
||||
@property (nonatomic,strong)NSString *icon_xx_notselect;
|
||||
@property (nonatomic,strong)NSString *icon_wd_select;
|
||||
@property (nonatomic,strong)NSString *icon_wd_notselect;
|
||||
*/
|
||||
-(void)getAppTheme{
|
||||
NSString *themeUrl = [NSString stringWithFormat:@"%@%@",ServerUrl,QXAppTheme];
|
||||
[[QXRequset shareInstance] getWithUrl:themeUrl parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
[QXConfig defaultConfig];
|
||||
QXThemeModel *model = [QXThemeModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (model.theme_color && model.theme_color.length > 0) {
|
||||
QXConfig.shared.themeColor = [UIColor colorWithHexString:model.theme_color];
|
||||
}
|
||||
// QXConfig.shared.themeColor = [UIColor colorWithHexString:@"#ff0000"];
|
||||
if (model.btn_text_color && model.btn_text_color.length > 0) {
|
||||
QXConfig.shared.btnTextColor = [UIColor colorWithHexString:model.btn_text_color];
|
||||
}
|
||||
if (model.app_bg && model.app_bg.length > 0) {
|
||||
QXConfig.shared.backgroundImage = model.app_bg;
|
||||
}
|
||||
QXTabbarModel *tabbarIndex1 = QXConfig.shared.tabbarArray[0];
|
||||
QXTabbarModel *tabbarIndex2 = QXConfig.shared.tabbarArray[1];
|
||||
QXTabbarModel *tabbarIndex3 = QXConfig.shared.tabbarArray[2];
|
||||
QXTabbarModel *tabbarIndex4 = QXConfig.shared.tabbarArray[3];
|
||||
|
||||
if (model.home_nor && model.home_nor.length > 0) {
|
||||
tabbarIndex1.normalImage = model.home_nor;
|
||||
id object = responseObject[@"data"];
|
||||
NSInteger is_open = 0;
|
||||
if ([object isKindOfClass:[NSDictionary class]]) {
|
||||
is_open = [responseObject[@"data"][@"is_open"] integerValue];
|
||||
}
|
||||
if (model.home_sel && model.home_sel.length > 0) {
|
||||
tabbarIndex1.selectedImage = model.home_sel;
|
||||
}
|
||||
|
||||
if (model.find_nor && model.find_nor.length > 0) {
|
||||
tabbarIndex2.normalImage = model.find_nor;
|
||||
}
|
||||
if (model.find_sel && model.find_sel.length > 0) {
|
||||
tabbarIndex2.selectedImage = model.find_sel;
|
||||
}
|
||||
|
||||
if (model.msg_nor && model.msg_nor.length > 0) {
|
||||
tabbarIndex3.normalImage = model.msg_nor;
|
||||
}
|
||||
if (model.msg_sel && model.msg_sel.length > 0) {
|
||||
tabbarIndex3.selectedImage = model.msg_sel;
|
||||
}
|
||||
|
||||
if (model.mine_nor && model.mine_nor.length > 0) {
|
||||
tabbarIndex4.normalImage = model.mine_nor;
|
||||
}
|
||||
if (model.mine_sel && model.mine_sel.length > 0) {
|
||||
tabbarIndex4.selectedImage = model.mine_sel;
|
||||
if (is_open == 1) {
|
||||
tabbarIndex1.normalImage = @"icon_sy_notselect";
|
||||
tabbarIndex1.selectedImage = @"icon_sy_select";
|
||||
tabbarIndex2.normalImage = @"icon_dt_notselect";
|
||||
tabbarIndex2.selectedImage = @"icon_dt_select";
|
||||
tabbarIndex3.normalImage = @"icon_xx_notselect";
|
||||
tabbarIndex3.selectedImage = @"icon_xx_select";
|
||||
tabbarIndex4.normalImage = @"icon_wd_notselect";
|
||||
tabbarIndex4.selectedImage = @"icon_wd_select";
|
||||
|
||||
|
||||
|
||||
QXThemeModel *model = [[QXThemeModel alloc] init];
|
||||
model.app_home_bg = @"bg_dark";
|
||||
model.logo_shouye = @"logo_shouye";
|
||||
model.bg_rmfj = @"bg_rmfj";
|
||||
model.bg_wdfj = @"bg_wdfj";
|
||||
model.bg_phb = @"bg_phb";
|
||||
model.bg_gfgg = @"bg_gfgg";
|
||||
model.bg_xiaoxi = @"bg_xiaoxi";
|
||||
model.bg_phb = @"bg_phb";
|
||||
model.button_qwg = @"button_qwg";
|
||||
model.bg_light = @"bg_light";
|
||||
|
||||
model.icon_wdjz = @"icon_wdjz";
|
||||
model.icon_dj = @"icon_dj";
|
||||
model.icon_gxzb = @"icon_gxzb";
|
||||
model.icon_wdbb = @"icon_wdbb";
|
||||
model.icon_bzzx = @"icon_bzzx";
|
||||
model.icon_yq = @"icon_yq";
|
||||
model.icon_rw = @"icon_rw";
|
||||
model.icon_yjfk = @"icon_yjfk";
|
||||
model.icon_gskf = @"icon_gskf";
|
||||
model.icon_gsrz = @"icon_gsrz";
|
||||
model.icon_wdgd = @"icon_wdgd";
|
||||
model.icon_sz = @"icon_sz";
|
||||
|
||||
model.tabbarSelectedColor = @"#FF3700";
|
||||
QXConfig.shared.model =model;
|
||||
}
|
||||
// QXThemeModel *model = [QXThemeModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
// if (model.theme_color && model.theme_color.length > 0) {
|
||||
// QXConfig.shared.themeColor = [UIColor colorWithHexString:model.theme_color];
|
||||
// }
|
||||
//
|
||||
// if (model.btn_text_color && model.btn_text_color.length > 0) {
|
||||
// QXConfig.shared.btnTextColor = [UIColor colorWithHexString:model.btn_text_color];
|
||||
// }
|
||||
// if (model.app_bg && model.app_bg.length > 0) {
|
||||
// QXConfig.shared.backgroundImage = model.app_bg;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (model.home_nor && model.home_nor.length > 0) {
|
||||
// tabbarIndex1.normalImage = model.home_nor;
|
||||
// }
|
||||
// if (model.home_sel && model.home_sel.length > 0) {
|
||||
// tabbarIndex1.selectedImage = model.home_sel;
|
||||
// }
|
||||
//
|
||||
// if (model.find_nor && model.find_nor.length > 0) {
|
||||
// tabbarIndex2.normalImage = model.find_nor;
|
||||
// }
|
||||
// if (model.find_sel && model.find_sel.length > 0) {
|
||||
// tabbarIndex2.selectedImage = model.find_sel;
|
||||
// }
|
||||
//
|
||||
// if (model.msg_nor && model.msg_nor.length > 0) {
|
||||
// tabbarIndex3.normalImage = model.msg_nor;
|
||||
// }
|
||||
// if (model.msg_sel && model.msg_sel.length > 0) {
|
||||
// tabbarIndex3.selectedImage = model.msg_sel;
|
||||
// }
|
||||
//
|
||||
// if (model.mine_nor && model.mine_nor.length > 0) {
|
||||
// tabbarIndex4.normalImage = model.mine_nor;
|
||||
// }
|
||||
// if (model.mine_sel && model.mine_sel.length > 0) {
|
||||
// tabbarIndex4.selectedImage = model.mine_sel;
|
||||
// }
|
||||
QXConfig.shared.tabbarArray = @[tabbarIndex1,tabbarIndex2,tabbarIndex3,tabbarIndex4];
|
||||
AppDelegate *delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
|
||||
[delegate changeRootViewControllerIsTabbar];
|
||||
|
||||
Reference in New Issue
Block a user