|
@@ -26,6 +26,8 @@
|
|
|
|
|
|
@property (nonatomic, strong) UIView *mountView;
|
|
|
|
|
|
+@property (nonatomic, copy) CheckCancelCallback cancelCallback;
|
|
|
+
|
|
|
@end
|
|
|
|
|
|
@implementation VeriCheckView
|
|
@@ -106,7 +108,7 @@
|
|
|
|
|
|
- (void)disPlayImageWithPhone:(NSString *)phoneNo {
|
|
|
self.phoneNo = phoneNo;
|
|
|
- NSString *url = [NSString stringWithFormat:@"%@%@?phone=%@",hostURL, @"/api-student/code/getImageCode",phoneNo];
|
|
|
+ NSString *url = [NSString stringWithFormat:@"%@%@?phone=%@",hostURL, @"/api-teacher/code/getImageCode",phoneNo];
|
|
|
[[SDImageCache sharedImageCache] removeImageForKey:url withCompletion:^{
|
|
|
[self.checkImage sd_setImageWithURL:[NSURL URLWithString:[url getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"image_placeholder"] options:SDWebImageRefreshCached];
|
|
|
}];
|
|
@@ -123,6 +125,11 @@
|
|
|
[self.mountView addSubview:self];
|
|
|
}
|
|
|
|
|
|
+- (void)cancelCheck:(CheckCancelCallback)callback {
|
|
|
+ if (callback) {
|
|
|
+ self.cancelCallback = callback;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
- (void)tapAction:(UITapGestureRecognizer *)g {
|
|
|
[self endEditing:YES];
|
|
@@ -132,6 +139,9 @@
|
|
|
- (void)hiddView {
|
|
|
[self endEditing:YES];
|
|
|
[self removeFromSuperview];
|
|
|
+ if (self.cancelCallback) {
|
|
|
+ self.cancelCallback();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|