@weakify(self); [self.customerViewModel loginCustomerLogicWithMobile:mobile Password:password NormalLoginBlock:^{ @strongify(self); if ([self.customerViewModel getResponseStatus] == ZSYResponseSuccess) { if (self.navigationController.presentingViewController != nil) { [self.navigationController dismissViewControllerAnimated:YES completion:nil]; } else { [self.navigationController popViewControllerAnimated:YES]; } } else{ //设置手势密码失败、注册失败,停留在手势密码界面 self.buttonNext.enabled = YES; [self.txtLoginPwd becomeFirstResponder]; } } ForgetGesturePasswordBlock:^{ @strongify(self); __block ZSYCustomerLoginViewController *point = self;//对指针retain一次</strong></span> [CLLockVC showSettingLockVCInVC:self successBlock:^(CLLockVC *lockVC, NSString *pwd) { //保存手势密码到服务器 GesturePasswordBlock block = [point.customerViewModel saveGesturePasswordCallback]; block(mobile, pwd); //密码保存成功之后,退出手势密码界面 [CLLockVC dismiss:.3f Completion:nil]; point = nil;//对指针release一次,保持前后retainCount守恒 }]; } CreateGesturePasswordBlock:^{ [CLLockVC showSettingLockVCInVC:self successBlock:^(CLLockVC *lockVC, NSString *pwd) { @strongify(self); //保存手势密码到服务器 GesturePasswordBlock block = [self.customerViewModel saveGesturePasswordCallback]; block(mobile, pwd); //密码保存成功之后,退出手势密码界面 [CLLockVC dismiss:.3f Completion:nil]; }]; }];
时间: 2024-12-07 14:29:56