|
@@ -10,6 +10,7 @@
|
|
|
#import "FirstSettingViewController.h"
|
|
|
#import "AppDelegate.h"
|
|
|
#import "UserInfoManager.h"
|
|
|
+#import "VeriCheckView.h"
|
|
|
|
|
|
@interface VefiCodeLoginController ()
|
|
|
{
|
|
@@ -35,7 +36,6 @@
|
|
|
if (![NSString isEmptyString:self.phoneNo]) {
|
|
|
[self queryVefiCode];
|
|
|
}
|
|
|
- [_bodyView showKeyboard];
|
|
|
}
|
|
|
|
|
|
- (void)configUI {
|
|
@@ -71,7 +71,6 @@
|
|
|
case VEFIACTION_VEFIACTION: // 发送验证码
|
|
|
{
|
|
|
[self queryVefiCode];
|
|
|
- [self.bodyView showKeyboard];
|
|
|
}
|
|
|
break;
|
|
|
case VEFIACTION_LOGIN: // 登录
|
|
@@ -84,11 +83,26 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
- (void)queryVefiCode {
|
|
|
+ NSString *phoneNo = self.phoneNo;
|
|
|
+ // 图形化验证
|
|
|
+ VeriCheckView *view = [VeriCheckView shareInstanceShowInView:[NSObject getKeyWindow]];
|
|
|
+ __weak typeof(view) weakView = view;
|
|
|
+ [view showViewCallback:^(NSDictionary * _Nonnull parm) {
|
|
|
+ [self veriImageCodeWithParm:parm checkView:weakView];
|
|
|
+ }];
|
|
|
+ [view disPlayImageWithPhone:phoneNo];
|
|
|
+}
|
|
|
+
|
|
|
+// 发送短信 校验图形验证码
|
|
|
+- (void)veriImageCodeWithParm:(NSDictionary *)parm checkView:(VeriCheckView *)checkView {
|
|
|
[LOADING_MANAGER showHUD];
|
|
|
- [KSNetworkingManager sendSmsRequest:KS_POST mobile:self.phoneNo type:@"LOGIN" success:^(NSDictionary * _Nonnull dic) {
|
|
|
+ [KSNetworkingManager sendSmsRequest:KS_POST mobile:[parm ks_stringValueForKey:@"phone"] type:@"LOGIN" code:[parm ks_stringValueForKey:@"code"] success:^(NSDictionary * _Nonnull dic) {
|
|
|
[LOADING_MANAGER removeHUD];
|
|
|
if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
|
|
|
+ [checkView hiddView];
|
|
|
[LOADING_MANAGER MBShowAUTOHidingInWindow:@"验证码已发送"];
|
|
|
[self codeButtonCountDown];
|
|
|
}
|
|
@@ -100,6 +114,7 @@
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
- (void)codeButtonCountDown {
|
|
|
_bodyView.vefiButton.userInteractionEnabled = NO;
|
|
|
[_bodyView.vefiButton setBackgroundColor:HexRGB(0xd5d5d5)];
|