File tree 3 files changed +16
-4
lines changed 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
285
285
UIActionSheet *actionSheet = [UIActionSheet bk_actionSheetCustomWithTitle: @" 重新发送" buttonTitles: @[@" 发送" ] destructiveTitle: nil cancelTitle: @" 取消" andDidDismissBlock: ^(UIActionSheet *sheet, NSInteger index ) {
286
286
if (index == 0 && _self.messageToResendOrDelete ) {
287
287
[_self sendPrivateMessageWithMsg: _messageToResendOrDelete];
288
-
289
288
}
290
289
}];
291
290
[actionSheet showInView: self .view];
@@ -423,7 +422,12 @@ - (void)sendPrivateMessageWithMsg:(PrivateMessage *)nextMsg{
423
422
NSDictionary *params = @{@" type" : @2 ,
424
423
@" receiver_global_key" : nextMsg.friend .global_key ?: @" " ,
425
424
};
426
- [NSObject showCaptchaViewParams: params.mutableCopy];
425
+ [NSObject showCaptchaViewParams: params.mutableCopy success: ^{
426
+ [NSObject showHudTipStr: @" 验证码正确" ];
427
+ weakSelf.messageToResendOrDelete = nextMsg;
428
+ [weakSelf.myMsgInputView isAndResignFirstResponder ];
429
+ [weakSelf sendPrivateMessageWithMsg: weakSelf.messageToResendOrDelete];
430
+ }];
427
431
}
428
432
[weakSelf dataChangedWithError: NO scrollToBottom: YES animated: YES ];
429
433
} progerssBlock: ^(CGFloat progressValue) {
Original file line number Diff line number Diff line change 23
23
+ (void )showStatusBarErrorStr : (NSString *)errorStr ;
24
24
+ (void )showStatusBarError : (NSError *)error ;
25
25
+ (void )showCaptchaViewParams : (NSMutableDictionary *)params ;
26
+ + (void )showCaptchaViewParams : (NSMutableDictionary *)params success : (void (^)())block ;
26
27
27
28
#pragma mark BaseURL
28
29
+ (NSString *)baseURLStr ;
Original file line number Diff line number Diff line change @@ -451,8 +451,11 @@ -(id)handleResponse:(id)responseJSON autoShowError:(BOOL)autoShowError{
451
451
return error;
452
452
}
453
453
454
-
455
454
+ (void )showCaptchaViewParams : (NSMutableDictionary *)params {
455
+ [self showCaptchaViewParams: params success: nil ];
456
+ }
457
+
458
+ + (void )showCaptchaViewParams : (NSMutableDictionary *)params success : (void (^)())block {
456
459
// Data
457
460
if (!params) {
458
461
params = @{}.mutableCopy ;
@@ -505,7 +508,11 @@ + (void)showCaptchaViewParams:(NSMutableDictionary *)params{
505
508
[[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: path withParams: params withMethodType: Post andBlock: ^(id data, NSError *error) {
506
509
if (data) {
507
510
[weakAlertV dismissWithCompletion: ^{
508
- [NSObject showHudTipStr: @" 验证码正确" ];
511
+ if (block) {
512
+ block ();
513
+ }else {
514
+ [NSObject showHudTipStr: @" 验证码正确" ];
515
+ }
509
516
}];
510
517
}else {
511
518
[weakImageV sd_setImageWithURL: imageURL placeholderImage: nil options: (SDWebImageRetryFailed | SDWebImageRefreshCached | SDWebImageHandleCookies)];
You can’t perform that action at this time.
0 commit comments