From 1d39caf7235522ae121db7a188ba41a706217407 Mon Sep 17 00:00:00 2001 From: 单军华 <WindShan@danjunhuas-MacBook-Pro.local> Date: Sat, 28 Apr 2018 09:39:49 +0800 Subject: [PATCH] 清理多余代码,优化 --- pregnancy_guard/BaseProject/Controller/Login/FogetPwdPage.m | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pregnancy_guard/BaseProject/Controller/Login/FogetPwdPage.m b/pregnancy_guard/BaseProject/Controller/Login/FogetPwdPage.m index a57a34e..6d663c9 100644 --- a/pregnancy_guard/BaseProject/Controller/Login/FogetPwdPage.m +++ b/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; } -- Gitblit v1.8.0