<span style="white-space:pre"> </span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color:#ff0000;">@weakify(self);</span></span>
[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:^{
<span style="color:#ff0000;">@strongify(self);</span>
<span style="color:#ff0000;"><strong>__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];
<span style="color:#ff0000;"><strong>point = nil;//对指针release一次,保持前后retainCount守恒</strong></span>
}];
} CreateGesturePasswordBlock:^{
[CLLockVC showSettingLockVCInVC:self successBlock:^(CLLockVC *lockVC, NSString *pwd) {
@strongify(self);
//保存手势密码到服务器
GesturePasswordBlock block = [self.customerViewModel saveGesturePasswordCallback];
block(mobile, pwd);
//密码保存成功之后,退出手势密码界面
[CLLockVC dismiss:.3f Completion:nil];
}];
}];
}