单军华
2018-04-28 1d39caf7235522ae121db7a188ba41a706217407
pregnancy_guard/BaseProject/Controller/Login/FogetPwdPage.m
@@ -56,7 +56,7 @@
    
    self.title = @"忘记密码";
    [self setNavigationLeft:@"返回" sel:@selector(backAction)];
    self.view.backgroundColor = kUIColorFromRGB(0xf0fbf5);
    //self.view.backgroundColor = kUIColorFromRGB(0xf0fbf5);
    //[self.navigationController.navigationBar setBarTintColor:[UIColor redColor]];
    
    // 初始化 pagecontrol
@@ -89,9 +89,9 @@
    userPhoneTextField.placeholder = @"请输入注册手机号";
    userPhoneTextField.font = [UIFont fontWithName:@"Arial" size:16];
    userPhoneTextField.delegate = self;
    [userPhoneTextField setValue:RgbColor(40, 41, 42) forKeyPath:@"_placeholderLabel.textColor"];
    [userPhoneTextField setValue:RgbColor(149, 149, 150) forKeyPath:@"_placeholderLabel.textColor"];
    //userPhoneTextField.layer.borderColor = [RgbColor(213, 213, 213) CGColor];
    userPhoneTextField.textColor = RgbColor(40, 41, 42);
    userPhoneTextField.textColor = RgbColor(149, 149, 150);
    userPhoneTextField.keyboardType = UIKeyboardTypeNumberPad;
    userPhoneTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    // 设置一个空白blankView,15.0就是这块View的宽度width,也是光标的位置,根据你自己的需要设定大小
@@ -110,9 +110,9 @@
    checkCodeTextField.keyboardType = UIKeyboardTypeNumberPad;
    checkCodeTextField.font = [UIFont fontWithName:@"Arial" size:16];
    checkCodeTextField.delegate = self;
    [checkCodeTextField setValue:RgbColor(40, 41, 42) forKeyPath:@"_placeholderLabel.textColor"];
    [checkCodeTextField setValue:RgbColor(149, 149, 150) forKeyPath:@"_placeholderLabel.textColor"];
    //userPhoneTextField.layer.borderColor = [RgbColor(213, 213, 213) CGColor];
    checkCodeTextField.textColor = RgbColor(40, 41, 42);
    checkCodeTextField.textColor = RgbColor(149, 149, 150);
    checkCodeTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    // 设置一个空白blankView,15.0就是这块View的宽度width,也是光标的位置,根据你自己的需要设定大小
    checkCodeTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(checkCodeTextField.frame.origin.x,checkCodeTextField.frame.origin.y,10.0, checkCodeTextField.frame.size.height)];
@@ -133,9 +133,9 @@
    userNewPwdTextField.placeholder = @"请输入您的新的密码";
    userNewPwdTextField.font = [UIFont fontWithName:@"Arial" size:16];
    userNewPwdTextField.delegate = self;
    [userNewPwdTextField setValue:RgbColor(40, 41, 42) forKeyPath:@"_placeholderLabel.textColor"];
    [userNewPwdTextField setValue:RgbColor(149, 149, 150) forKeyPath:@"_placeholderLabel.textColor"];
    //userPhoneTextField.layer.borderColor = [RgbColor(213, 213, 213) CGColor];
    userNewPwdTextField.textColor = RgbColor(40, 41, 42);
    userNewPwdTextField.textColor = RgbColor(149, 149, 150);
    userNewPwdTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    // 设置一个空白blankView,15.0就是这块View的宽度width,也是光标的位置,根据你自己的需要设定大小
    userNewPwdTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(userNewPwdTextField.frame.origin.x,userNewPwdTextField.frame.origin.y,10.0, userNewPwdTextField.frame.size.height)];
@@ -157,9 +157,9 @@
    userSurePwdTextField.placeholder = @"请确认您的新的密码";
    userSurePwdTextField.font = [UIFont fontWithName:@"Arial" size:16];
    userSurePwdTextField.delegate = self;
    [userSurePwdTextField setValue:RgbColor(40, 41, 42) forKeyPath:@"_placeholderLabel.textColor"];
    [userSurePwdTextField setValue:RgbColor(149, 149, 150) forKeyPath:@"_placeholderLabel.textColor"];
    //userSurePwdTextField = [RgbColor(213, 213, 213) CGColor];
    userSurePwdTextField.textColor = RgbColor(40, 41, 42);
    userSurePwdTextField.textColor = RgbColor(149, 149, 150);
    userSurePwdTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    // 设置一个空白blankView,15.0就是这块View的宽度width,也是光标的位置,根据你自己的需要设定大小
    userSurePwdTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(userNewPwdTextField.frame.origin.x,userNewPwdTextField.frame.origin.y,10.0, userSurePwdTextField.frame.size.height)];
@@ -181,7 +181,7 @@
    
    getCheckCodeLabel = [[GloriaLabel alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-textFieldW)/2 + 218 + 6, 100, 126, textFieldH)];
    getCheckCodeLabel.font = FONT14;
    getCheckCodeLabel.backgroundColor = RgbColor(251, 50, 81);
    getCheckCodeLabel.backgroundColor = kUIColorFromRGB(0x00a2ff);
    getCheckCodeLabel.textColor = [UIColor whiteColor];
    getCheckCodeLabel.textAlignment = NSTextAlignmentCenter;
    getCheckCodeLabel.text = @"获取验证码";
@@ -191,7 +191,7 @@
    [self.view addSubview:getCheckCodeLabel];
    
    resetUserPwdBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    resetUserPwdBtn.frame = CGRectMake((SCREEN_WIDTH-textFieldW)/2,280, textFieldW, textFieldH);
    resetUserPwdBtn.frame = CGRectMake((SCREEN_WIDTH-textFieldW)/2,280, textFieldW, textFieldH+5);
    [resetUserPwdBtn setTitle:@"重置密码" forState:UIControlStateNormal];
    [resetUserPwdBtn setBackgroundImage:[UIImage imageNamed:@"regist_btn_bk" ] forState:UIControlStateNormal];
    resetUserPwdBtn.titleLabel.font = [UIFont systemFontOfSize: 18.0];
@@ -275,16 +275,16 @@
    }
    else
    {
        NSString *path = [[NSString alloc] initWithFormat:FORGET_PSW];
        NSString *path = [[NSString alloc] initWithFormat:USER_RESETPWD];
        
        CommonReqModel * model = [[CommonReqModel alloc] init];
        
        model.username = userPhoneTextField.text;
        model.phone = userPhoneTextField.text;
        model.password = userNewPwdTextField.text;
        model.code     = checkCodeTextField.text;
        
        MPWeakSelf(self);
        [NetworkSingleton networkingPostMethod:model.toDic urlName:path success:^(id responseBody)
        [NetworkSingleton networkingGetMethod:model.toDic urlName:path success:^(id responseBody)
         {
             BaseResModel * resModel = [Global toBaseModel:responseBody];
             if(resModel.code == 0)
@@ -306,14 +306,14 @@
//获取验证码
-(void)getCheckCodeAction
{
    NSString *path = [[NSString alloc] initWithFormat:REQUEST_CODE];
    NSString *path = [[NSString alloc] initWithFormat:SEND_REGISTER_SMS];
    
    CommonReqModel * model = [[CommonReqModel alloc] init];
    model.tel = userPhoneTextField.text;
    model.type = @"2";
    model.phone = userPhoneTextField.text;
    model.type  = @"resetPwd";
    
    MPWeakSelf(self);
    [NetworkSingleton networkingPostMethod:model.toDic urlName:path success:^(id responseBody)
    [NetworkSingleton networkingGetMethod:model.toDic urlName:path success:^(id responseBody)
     {
         BaseResModel * resModel = [Global toBaseModel:responseBody];
         
@@ -363,13 +363,13 @@
        }
        else if( textLength == 11 && [StringUtil isMobile:[userPhoneTextField.text stringByAppendingString:string]] == YES)
        {
            getCheckCodeLabel.textColor = NAVIGATIONTINTCOLOR;
            getCheckCodeLabel.backgroundColor = [UIColor whiteColor];
            getCheckCodeLabel.textColor = [UIColor whiteColor];
            getCheckCodeLabel.backgroundColor = RgbColor(251, 50, 81);
            sendBtn.userInteractionEnabled = YES;
        }
        else
        {
            getCheckCodeLabel.backgroundColor = RgbColor(251, 50, 81);
            getCheckCodeLabel.backgroundColor = kUIColorFromRGB(0x00a2ff);
            getCheckCodeLabel.textColor = [UIColor whiteColor];
            sendBtn.userInteractionEnabled = NO;
        }