Commit 6274dd9fc071495d07b3a12591e367e956379ca8
1 parent
7ca75e9f
左滑打开,网络请求处理
Showing
8 changed files
with
16 additions
and
9 deletions
CNLiveScioLive/Pages/Base/CNLiveBaseViewController.m
| ... | ... | @@ -88,7 +88,11 @@ |
| 88 | 88 | |
| 89 | 89 | self.navigationItem.rightBarButtonItem = item2; |
| 90 | 90 | } |
| 91 | - | |
| 91 | +-(BOOL)forceEnableInteractivePopGestureRecognizer | |
| 92 | +{ | |
| 93 | + return YES; | |
| 94 | + | |
| 95 | +} | |
| 92 | 96 | - (void)didReceiveMemoryWarning { |
| 93 | 97 | [super didReceiveMemoryWarning]; |
| 94 | 98 | // Dispose of any resources that can be recreated. | ... | ... |
CNLiveScioLive/Pages/Header/UrlMacro.h
| ... | ... | @@ -48,7 +48,6 @@ |
| 48 | 48 | //#define tuwen(id) [NSString stringWithFormat:@"http://www.scio.gov.cn:9095/video/JsonDataFromGXW.aspx/JsonDataFromGXW.aspx?type=Doc&DocID=%d",id] |
| 49 | 49 | #define tuwen(id) [NSString stringWithFormat:@"http://www.scio.gov.cn:9095/video/JsonDataFromGXW.aspx?type=Doc&DocID=%d",id] |
| 50 | 50 | |
| 51 | -#define FORECAST REQUESTURL(@"gxb/api/") | |
| 52 | 51 | #define yugaoliebiao @"http://www.scio.gov.cn:9095/video/JsonDataFromGXW.aspx?type=DocList&ChannelID=20490" |
| 53 | 52 | //#define newsdetail(id) [NSString stringWithFormat:@"http://www.scio.gov.cn:9095/video/JsonDataFromGXW.aspx/JsonDataFromGXW.aspx?type=Doc&DocID=%d",id] |
| 54 | 53 | ... | ... |
CNLiveScioLive/Pages/Home/CNHomeBaseViewController.m
| ... | ... | @@ -188,7 +188,7 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; |
| 188 | 188 | |
| 189 | 189 | } |
| 190 | 190 | else { |
| 191 | - if(model.img){ | |
| 191 | + if(model.img&&![model.img isEqualToString:@""]){ | |
| 192 | 192 | //一张图 左边 |
| 193 | 193 | CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell]; |
| 194 | 194 | if (!cell) { | ... | ... |
CNLiveScioLive/Pages/Home/CNHomeENViewController.m
| ... | ... | @@ -227,7 +227,7 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; |
| 227 | 227 | |
| 228 | 228 | } |
| 229 | 229 | else{ |
| 230 | - if(model.img){ | |
| 230 | + if(model.img&&![model.img isEqualToString:@""]){ | |
| 231 | 231 | //一张图 左边 |
| 232 | 232 | CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell]; |
| 233 | 233 | if (!cell) { | ... | ... |
CNLiveScioLive/Pages/Home/外宣要闻/Controller/CNLiveHeraldedNewsViewController.m
| ... | ... | @@ -224,7 +224,7 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; |
| 224 | 224 | |
| 225 | 225 | }else{ |
| 226 | 226 | |
| 227 | - if(model.img){ | |
| 227 | + if(model.img&&![model.img isEqualToString:@""]){ | |
| 228 | 228 | CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell]; |
| 229 | 229 | if (!cell) { |
| 230 | 230 | cell = [[CNLiveNewsLeftPicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:newsLeftPicTableViewCell]; | ... | ... |
CNLiveScioLive/Pages/Home/新闻详情/OldController/BaseViewController.m
| ... | ... | @@ -16,7 +16,11 @@ |
| 16 | 16 | |
| 17 | 17 | // [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]; |
| 18 | 18 | } |
| 19 | - | |
| 19 | +-(BOOL)forceEnableInteractivePopGestureRecognizer | |
| 20 | +{ | |
| 21 | + return YES; | |
| 22 | + | |
| 23 | +} | |
| 20 | 24 | - (BOOL)shouldAutorotate { |
| 21 | 25 | return NO; |
| 22 | 26 | } | ... | ... |
CNLiveScioLive/Pages/Home/答记者问/Controller/CNLiveReporterAskedViewController.m
| ... | ... | @@ -193,7 +193,7 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; |
| 193 | 193 | |
| 194 | 194 | } |
| 195 | 195 | else{ |
| 196 | - if(model.img){ | |
| 196 | + if(model.img&&![model.img isEqualToString:@""]){ | |
| 197 | 197 | //一张图 左边 |
| 198 | 198 | CNLiveNewsLeftPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:newsLeftPicTableViewCell]; |
| 199 | 199 | if (!cell) { | ... | ... |
CNLiveScioLive/Pages/Live/Controller/TopNoticeViewController.m
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | NSLog(@"%@",josnParameters); |
| 36 | 36 | NSDictionary *parameters = @{@"params":josnParameters |
| 37 | 37 | }; |
| 38 | - NSString *urlStr = [NSString stringWithFormat:@"%@%@",FORECAST,@"programByContentId"]; | |
| 38 | + NSString *urlStr = REQUESTURL(@"gxb/api/programByContentId"); | |
| 39 | 39 | [manager POST:urlStr parameters:parameters headers:nil progress:^(NSProgress * _Nonnull uploadProgress) {} success:^(NSURLSessionDataTask * _Nonnull task, id responseObject) { |
| 40 | 40 | [AlertViewTool hideHUDView]; |
| 41 | 41 | // 请求成功,解析数据 |
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | NSLog(@"%@",josnParameters); |
| 68 | 68 | NSDictionary *parameters = @{@"params":josnParameters |
| 69 | 69 | }; |
| 70 | - NSString *urlStr = [NSString stringWithFormat:@"%@%@",FORECAST,@"programDetail"]; | |
| 70 | + NSString *urlStr = REQUESTURL(@"gxb/api/programDetail"); | |
| 71 | 71 | [manager POST:urlStr parameters:parameters headers:nil progress:^(NSProgress * _Nonnull uploadProgress) {} success:^(NSURLSessionDataTask * _Nonnull task, id responseObject) { |
| 72 | 72 | [AlertViewTool hideHUDView]; |
| 73 | 73 | // 请求成功,解析数据 | ... | ... |