File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 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
285285 UIActionSheet *actionSheet = [UIActionSheet bk_actionSheetCustomWithTitle: @" 重新发送" buttonTitles: @[@" 发送" ] destructiveTitle: nil cancelTitle: @" 取消" andDidDismissBlock: ^(UIActionSheet *sheet, NSInteger index){
286286if (index == 0 && _self.messageToResendOrDelete ){
287287 [_self sendPrivateMessageWithMsg: _messageToResendOrDelete];
288-
289288 }
290289 }];
291290 [actionSheet showInView: self .view];
@@ -423,7 +422,12 @@ - (void)sendPrivateMessageWithMsg:(PrivateMessage *)nextMsg{
423422NSDictionary *params = @{@" type" : @2 ,
424423@" receiver_global_key" : nextMsg.friend .global_key ?: @" " ,
425424 };
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+ }];
427431 }
428432 [weakSelf dataChangedWithError: NO scrollToBottom: YES animated: YES ];
429433 } progerssBlock: ^(CGFloat progressValue){
Original file line number Diff line number Diff line change 2323+ (void )showStatusBarErrorStr : (NSString *)errorStr ;
2424+ (void )showStatusBarError : (NSError *)error ;
2525+ (void )showCaptchaViewParams : (NSMutableDictionary *)params ;
26+ + (void )showCaptchaViewParams : (NSMutableDictionary *)params success : (void (^)())block ;
2627
2728#pragma mark BaseURL
2829+ (NSString *)baseURLStr ;
Original file line number Diff line number Diff line change @@ -451,8 +451,11 @@ -(id)handleResponse:(id)responseJSON autoShowError:(BOOL)autoShowError{
451451return error;
452452}
453453
454-
455454+ (void )showCaptchaViewParams : (NSMutableDictionary *)params {
455+ [self showCaptchaViewParams: params success: nil ];
456+ }
457+
458+ + (void )showCaptchaViewParams : (NSMutableDictionary *)params success : (void (^)())block {
456459// Data
457460if (!params){
458461 params = @{}.mutableCopy ;
@@ -505,7 +508,11 @@ + (void)showCaptchaViewParams:(NSMutableDictionary *)params{
505508 [[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: path withParams: params withMethodType: Post andBlock: ^(id data, NSError *error){
506509if (data){
507510 [weakAlertV dismissWithCompletion: ^{
508- [NSObject showHudTipStr: @" 验证码正确" ];
511+ if (block){
512+ block ();
513+ }else {
514+ [NSObject showHudTipStr: @" 验证码正确" ];
515+ }
509516 }];
510517 }else {
511518 [weakImageV sd_setImageWithURL: imageURL placeholderImage: nil options: (SDWebImageRetryFailed | SDWebImageRefreshCached | SDWebImageHandleCookies)];
You can’t perform that action at this time.
0 commit comments