Commit dd85215e authored by 邢超's avatar 邢超

代码梳理

parent 919dfcdb
...@@ -179,6 +179,7 @@ ...@@ -179,6 +179,7 @@
//短信验证码 //短信验证码
NSMutableDictionary *paraDictM = [[NSMutableDictionary alloc] initWithCapacity:6]; NSMutableDictionary *paraDictM = [[NSMutableDictionary alloc] initWithCapacity:6];
[paraDictM setValue:self.phoneString forKey:@"phoneNo"]; [paraDictM setValue:self.phoneString forKey:@"phoneNo"];
[paraDictM setValue:@"VCC" forKey:@"smsMerchant"];
[paraDictM setValue:[NSNumber numberWithInteger:registerFrom.integerValue] forKey:@"registerFrom"]; [paraDictM setValue:[NSNumber numberWithInteger:registerFrom.integerValue] forKey:@"registerFrom"];
//量化派图形验证码验证 //量化派图形验证码验证
......
...@@ -7,12 +7,14 @@ ...@@ -7,12 +7,14 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "QGInputGroupView.h"
/** /**
手机号输入cell高度63 手机号输入cell高度63
*/ */
@interface QGLoginTableViewCell : UITableViewCell @interface QGLoginTableViewCell : UITableViewCell
///手机号输入框
@property (nonatomic, strong)QGInputGroupView *phoneNumberinput;
@property (nonatomic, copy)void(^cellBlock)(NSString *phoneNumber); @property (nonatomic, copy)void(^cellBlock)(NSString *phoneNumber);
......
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
// //
#import "QGLoginTableViewCell.h" #import "QGLoginTableViewCell.h"
#import "QGInputGroupView.h"
#import "QGBasicUITool.h" #import "QGBasicUITool.h"
@interface QGLoginTableViewCell() @interface QGLoginTableViewCell()
///手机号输入框
@property (nonatomic, strong)QGInputGroupView *phoneNumberinput;
///分割线 ///分割线
@property (nonatomic, strong)UIView *phoneUnderLine; @property (nonatomic, strong)UIView *phoneUnderLine;
......
...@@ -71,7 +71,17 @@ ...@@ -71,7 +71,17 @@
//设置导航栏左右按钮 //设置导航栏左右按钮
[self customLeftBarButtonItemWithImgName:@"vc_close" action:nil]; [self customLeftBarButtonItemWithImgName:@"vc_close" action:nil];
[self custemRightBarButtonItemWithTitle:@"注册" imageName:nil action:^(UIButton * _Nonnull button) { [self custemRightBarButtonItemWithTitle:@"注册" imageName:nil action:^(UIButton * _Nonnull button) {
[Mediator performTarget:[QGMediatorClassTools QGClassNameWithHeaderType:QGHeaderTypeQGRegisterViewController] parameters:nil handlerBlock:self.callBackBlock]; [Mediator performTarget:[QGMediatorClassTools QGClassNameWithHeaderType:QGHeaderTypeQGRegisterViewController] parameters:@{@"phone":self.phoneString} handlerBlock:^(NSString *tag, NSDictionary *parameters) {
if (parameters) {
self.phoneString = [parameters valueForKey:@"phone"];
[self.tableView reloadData];
}
if (self.callBackBlock) {
self.callBackBlock(tag, parameters);
}
}];
}]; }];
...@@ -398,6 +408,9 @@ ...@@ -398,6 +408,9 @@
QGLoginTableViewCell *cell = (QGLoginTableViewCell *)[self getCellFromClassName:NSStringFromClass([QGLoginTableViewCell class]) dequeueTableView:tableView]; QGLoginTableViewCell *cell = (QGLoginTableViewCell *)[self getCellFromClassName:NSStringFromClass([QGLoginTableViewCell class]) dequeueTableView:tableView];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
@weakify(self) @weakify(self)
cell.phoneNumberinput.textField.text = self.phoneString;
cell.cellBlock = ^(NSString *phoneNumber) { cell.cellBlock = ^(NSString *phoneNumber) {
@strongify(self) @strongify(self)
self.phoneString = phoneNumber; self.phoneString = phoneNumber;
...@@ -469,9 +482,20 @@ ...@@ -469,9 +482,20 @@
cell.cellBlock = ^(LittleBtnType btnType) {//处理按钮点击逻辑 cell.cellBlock = ^(LittleBtnType btnType) {//处理按钮点击逻辑
switch (btnType) { switch (btnType) {
case LittleBtnVerifyCode: case LittleBtnVerifyCode:{
//验证码登录页面跳转 //验证码登录页面跳转
[Mediator performTarget:[QGMediatorClassTools QGClassNameWithHeaderType:QGHeaderTypeQGRegisterViewController] parameters:nil handlerBlock:self.callBackBlock]; [Mediator performTarget:[QGMediatorClassTools QGClassNameWithHeaderType:QGHeaderTypeQGRegisterViewController] parameters:@{@"phone":self.phoneString} handlerBlock:^(NSString *tag, NSDictionary *parameters) {
if (parameters) {
self.phoneString = [parameters valueForKey:@"phone"];
[self.tableView reloadData];
}
if (self.callBackBlock) {
self.callBackBlock(tag, parameters);
}
}];
}
break; break;
case LittleBtnForgetPassword: case LittleBtnForgetPassword:
{ {
......
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
return YES; return YES;
} }
-(void)transferParameters:(NSDictionary *)param
{
self.phoneString = [param objectForKey:@"phone"];
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
...@@ -149,12 +154,15 @@ ...@@ -149,12 +154,15 @@
cell = [[QGPhoneInputWithTitleCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"phonecell" cellTitle:@"手机号码" placeHolder:@"请输入手机号码"]; cell = [[QGPhoneInputWithTitleCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"phonecell" cellTitle:@"手机号码" placeHolder:@"请输入手机号码"];
} }
cell.phoneNumberinput.textField.text = self.phoneString;
cell.padding = 40.f; cell.padding = 40.f;
@weakify(self) @weakify(self)
cell.cellBlock = ^(NSString *phoneNumber) { cell.cellBlock = ^(NSString *phoneNumber) {
@strongify(self) @strongify(self)
self.phoneString = phoneNumber; self.phoneString = phoneNumber;
self.callBackBlock(nil, @{@"phone":self.phoneString});
if (self.phoneString.isNumber && self.phoneString.length == 11 && self.isSelect) { if (self.phoneString.isNumber && self.phoneString.length == 11 && self.isSelect) {
self.changeButtonStatus(YES); self.changeButtonStatus(YES);
}else{ }else{
...@@ -186,6 +194,10 @@ ...@@ -186,6 +194,10 @@
[cell.loginButton setGradientButtonIsClickEnabled:ableClick]; [cell.loginButton setGradientButtonIsClickEnabled:ableClick];
}; };
if (self.phoneString.isNumber && self.phoneString.length == 11 && self.isSelect) {
[cell.loginButton setGradientButtonIsClickEnabled:YES];
}
return cell; return cell;
} }
case 2: case 2:
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
- (NSString *)baseUrlString - (NSString *)baseUrlString
{ {
//正式环境 // 正式环境
// return @"https://auth.quantgroup.cn/"; // return @"https://auth.quantgroup.cn/";
//测试环境 //测试环境
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment