Commit 697128a9f98a2544b555c4004ab1df923321e76d
1 parent
bd81a42b
添加loading,修改偏移,解决释放问题
Showing
1 changed file
with
29 additions
and
22 deletions
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/ApplyForShootController.m
| @@ -72,11 +72,11 @@ | @@ -72,11 +72,11 @@ | ||
| 72 | [[AipOcrService shardService] authWithAK:BDAppKey andSK:BDSecret]; | 72 | [[AipOcrService shardService] authWithAK:BDAppKey andSK:BDSecret]; |
| 73 | [self loadData]; | 73 | [self loadData]; |
| 74 | [self.view addSubview:self.tableView]; | 74 | [self.view addSubview:self.tableView]; |
| 75 | - if (@available(iOS 11.0, *)) { | ||
| 76 | - self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; | ||
| 77 | - }else{ | ||
| 78 | - self.automaticallyAdjustsScrollViewInsets = NO; | ||
| 79 | - } | 75 | +// if (@available(iOS 11.0, *)) { |
| 76 | +// self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; | ||
| 77 | +// }else{ | ||
| 78 | +// self.automaticallyAdjustsScrollViewInsets = NO; | ||
| 79 | +// } | ||
| 80 | [self configCallback]; | 80 | [self configCallback]; |
| 81 | 81 | ||
| 82 | } | 82 | } |
| @@ -137,7 +137,7 @@ | @@ -137,7 +137,7 @@ | ||
| 137 | weakSelf.isFontSucc = NO; | 137 | weakSelf.isFontSucc = NO; |
| 138 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 138 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 139 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 139 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 140 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 140 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 141 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 141 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 142 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 142 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 143 | }]; | 143 | }]; |
| @@ -151,7 +151,7 @@ | @@ -151,7 +151,7 @@ | ||
| 151 | weakSelf.isBackSucc = NO; | 151 | weakSelf.isBackSucc = NO; |
| 152 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 152 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 153 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 153 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 154 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 154 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 155 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 155 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 156 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 156 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 157 | }]; | 157 | }]; |
| @@ -163,7 +163,7 @@ | @@ -163,7 +163,7 @@ | ||
| 163 | weakSelf.isBackSucc = NO; | 163 | weakSelf.isBackSucc = NO; |
| 164 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 164 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 165 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 165 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 166 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 166 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 167 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 167 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 168 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 168 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 169 | }]; | 169 | }]; |
| @@ -193,14 +193,14 @@ | @@ -193,14 +193,14 @@ | ||
| 193 | weakSelf.isFontSucc = NO; | 193 | weakSelf.isFontSucc = NO; |
| 194 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 194 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 195 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 195 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 196 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 196 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 197 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 197 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 198 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 198 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 199 | } else { | 199 | } else { |
| 200 | weakSelf.isBackSucc = NO; | 200 | weakSelf.isBackSucc = NO; |
| 201 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 201 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 202 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 202 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 203 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 203 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 204 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 204 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 205 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 205 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 206 | } | 206 | } |
| @@ -261,7 +261,7 @@ | @@ -261,7 +261,7 @@ | ||
| 261 | weakSelf.isFontSucc = NO; | 261 | weakSelf.isFontSucc = NO; |
| 262 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 262 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 263 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 263 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 264 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 264 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 265 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 265 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 266 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 266 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 267 | }]; | 267 | }]; |
| @@ -275,7 +275,7 @@ | @@ -275,7 +275,7 @@ | ||
| 275 | weakSelf.isBackSucc = NO; | 275 | weakSelf.isBackSucc = NO; |
| 276 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 276 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 277 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 277 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 278 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 278 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 279 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 279 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 280 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 280 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 281 | }]; | 281 | }]; |
| @@ -296,14 +296,14 @@ | @@ -296,14 +296,14 @@ | ||
| 296 | weakSelf.isFontSucc = NO; | 296 | weakSelf.isFontSucc = NO; |
| 297 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 297 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 298 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 298 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 299 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 299 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 300 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 300 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 301 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 301 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 302 | } else { | 302 | } else { |
| 303 | weakSelf.isBackSucc = NO; | 303 | weakSelf.isBackSucc = NO; |
| 304 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 304 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 305 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 305 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 306 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 306 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 307 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 307 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 308 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 308 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 309 | } | 309 | } |
| @@ -361,14 +361,14 @@ | @@ -361,14 +361,14 @@ | ||
| 361 | weakSelf.isFontSucc = NO; | 361 | weakSelf.isFontSucc = NO; |
| 362 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 362 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 363 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 363 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 364 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 364 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 365 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 365 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 366 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 366 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 367 | } else { | 367 | } else { |
| 368 | weakSelf.isBackSucc = NO; | 368 | weakSelf.isBackSucc = NO; |
| 369 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 369 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 370 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 370 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 371 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 371 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 372 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 372 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 373 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 373 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 374 | } | 374 | } |
| @@ -396,14 +396,14 @@ | @@ -396,14 +396,14 @@ | ||
| 396 | weakSelf.isFontSucc = NO; | 396 | weakSelf.isFontSucc = NO; |
| 397 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 397 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 398 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 398 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 399 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 399 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 400 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 400 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 401 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 401 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 402 | } else { | 402 | } else { |
| 403 | weakSelf.isBackSucc = NO; | 403 | weakSelf.isBackSucc = NO; |
| 404 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 404 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 405 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 405 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 406 | - cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 406 | + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[ApplyForShootController class]]; |
| 407 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); | 407 | weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); |
| 408 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; | 408 | [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; |
| 409 | } | 409 | } |
| @@ -503,7 +503,7 @@ | @@ -503,7 +503,7 @@ | ||
| 503 | } | 503 | } |
| 504 | 504 | ||
| 505 | NSMutableDictionary *params = [@{ | 505 | NSMutableDictionary *params = [@{ |
| 506 | - @"sid" : CNUserShareModel.uid?CNUserShareModel.uid:@"", | 506 | + @"sid" : @"10505015",//CNUserShareModel.uid?CNUserShareModel.uid:@"", |
| 507 | @"realName" : self.realName?self.realName:@"", | 507 | @"realName" : self.realName?self.realName:@"", |
| 508 | @"idCardNo" : self.idCardNo?self.idCardNo:@"", | 508 | @"idCardNo" : self.idCardNo?self.idCardNo:@"", |
| 509 | @"address" : self.address?self.address:@"", | 509 | @"address" : self.address?self.address:@"", |
| @@ -513,6 +513,7 @@ | @@ -513,6 +513,7 @@ | ||
| 513 | 513 | ||
| 514 | __weak typeof(self) weakSelf = self; | 514 | __weak typeof(self) weakSelf = self; |
| 515 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; | 515 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; |
| 516 | + [QMUITips showLoadingInView:self.view]; | ||
| 516 | [manager POST:@"https://apiwjjtest.cnlive.com/Daren/buser/saveIdentity.action" parameters:para headers:nil constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) { | 517 | [manager POST:@"https://apiwjjtest.cnlive.com/Daren/buser/saveIdentity.action" parameters:para headers:nil constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) { |
| 517 | 518 | ||
| 518 | NSData *fontData = [weakSelf imageDatasWithImage:self.fontImage]; | 519 | NSData *fontData = [weakSelf imageDatasWithImage:self.fontImage]; |
| @@ -539,8 +540,13 @@ | @@ -539,8 +540,13 @@ | ||
| 539 | 540 | ||
| 540 | } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { | 541 | } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { |
| 541 | 542 | ||
| 542 | - NSLog(@"%@-提示信息:%@",responseObject,responseObject[@"errorMessage"]); | ||
| 543 | - | 543 | + [QMUITips hideAllTipsInView:self.view]; |
| 544 | + if (!responseObject) { | ||
| 545 | + sender.selected = !sender.selected; | ||
| 546 | + sender.userInteractionEnabled = YES; | ||
| 547 | + [QMUITips showError:@"接口错误,请稍后重试!" inView:self.view hideAfterDelay:1.5]; | ||
| 548 | + return ; | ||
| 549 | + } | ||
| 544 | if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { | 550 | if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { |
| 545 | 551 | ||
| 546 | //成功 | 552 | //成功 |
| @@ -559,6 +565,7 @@ | @@ -559,6 +565,7 @@ | ||
| 559 | 565 | ||
| 560 | } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { | 566 | } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { |
| 561 | 567 | ||
| 568 | + [QMUITips hideAllTipsInView:self.view]; | ||
| 562 | sender.selected = !sender.selected; | 569 | sender.selected = !sender.selected; |
| 563 | sender.userInteractionEnabled = YES; | 570 | sender.userInteractionEnabled = YES; |
| 564 | [QMUITips showError:error.localizedDescription inView:self.view hideAfterDelay:1.5]; | 571 | [QMUITips showError:error.localizedDescription inView:self.view hideAfterDelay:1.5]; |
| @@ -859,7 +866,7 @@ | @@ -859,7 +866,7 @@ | ||
| 859 | #pragma mark - SubViews | 866 | #pragma mark - SubViews |
| 860 | -(UITableView *)tableView { | 867 | -(UITableView *)tableView { |
| 861 | if (!_tableView) { | 868 | if (!_tableView) { |
| 862 | - _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight-kNavigationBarHeight) style:UITableViewStylePlain]; | 869 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) style:UITableViewStylePlain]; |
| 863 | _tableView.backgroundColor = RGB(242, 242, 242); | 870 | _tableView.backgroundColor = RGB(242, 242, 242); |
| 864 | _tableView.delegate = self; | 871 | _tableView.delegate = self; |
| 865 | _tableView.dataSource = self; | 872 | _tableView.dataSource = self; |