Commit ee757e1ccb927b917c7079a0792be0afe8ff3dd3
1 parent
fa897352
后台到前台展示增加接口请求调整
Showing
1 changed file
with
22 additions
and
2 deletions
CNLiveScioLive/AppDelegate.m
| ... | ... | @@ -94,7 +94,6 @@ |
| 94 | 94 | #pragma mark - 请求启动页 |
| 95 | 95 | -(void)requestLanchImage:(int)time |
| 96 | 96 | { |
| 97 | - __block int requestTime = time; | |
| 98 | 97 | NSString *urlStr = REQUESTURL(@"gxb/openBanner"); |
| 99 | 98 | NSDictionary *parameters = @{@"params":@"{\"plat\":\"i\",\"version\":\"5.0\",\"appid\":\"gxb\",\"pageUUID\":\"852cde69-ecd8-11e6-b52e-c7d8a7a18cc4\",\"pageType\":\"channelList\"}"}; |
| 100 | 99 | [XWHTTPTool GET:urlStr params:parameters success:^(id json) { |
| ... | ... | @@ -201,7 +200,28 @@ |
| 201 | 200 | - (void)applicationWillEnterForeground:(UIApplication *)application { |
| 202 | 201 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. |
| 203 | 202 | self.isPush = NO; |
| 204 | - | |
| 203 | + NSString *urlStr = REQUESTURL(@"gxb/openBanner"); | |
| 204 | + NSDictionary *parameters = @{@"params":@"{\"plat\":\"i\",\"version\":\"5.0\",\"appid\":\"gxb\",\"pageUUID\":\"852cde69-ecd8-11e6-b52e-c7d8a7a18cc4\",\"pageType\":\"channelList\"}"}; | |
| 205 | + [XWHTTPTool GET:urlStr params:parameters success:^(id json) { | |
| 206 | + NSDictionary *dic = [NSDictionary dictionaryWithDictionary:json]; | |
| 207 | + if (dic[@"homeTitleColor"]&&![dic[@"homeTitleColor"] isEqualToString:@""]) { | |
| 208 | + [[NSUserDefaults standardUserDefaults] setValue:dic[@"homeTitleColor"] forKey:HOMETITLECOLOR]; | |
| 209 | + }else | |
| 210 | + { | |
| 211 | + [[NSUserDefaults standardUserDefaults] setValue:nil forKey:HOMETITLECOLOR]; | |
| 212 | + } | |
| 213 | + NSString * mode = dic[@"grayMode"]; | |
| 214 | + if (mode&&mode.intValue == 1 && ![[NSUserDefaults standardUserDefaults] boolForKey:ISGRAYMODE]) { | |
| 215 | + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:ISGRAYMODE]; | |
| 216 | + [self addRootViewController]; | |
| 217 | + }else if (mode&&mode.intValue == 0 && [[NSUserDefaults standardUserDefaults] boolForKey:ISGRAYMODE]){ | |
| 218 | + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:ISGRAYMODE]; | |
| 219 | + [self addRootViewController]; | |
| 220 | + } | |
| 221 | + | |
| 222 | + } failure:^(NSError *error) { | |
| 223 | + | |
| 224 | + }]; | |
| 205 | 225 | } |
| 206 | 226 | |
| 207 | 227 | ... | ... |