Commit c1f2c955 authored by freecui's avatar freecui

登录页界面优化

输入框默认显示:
请输入公司认证码
请输入用户名
请输入密码
错误处理:
如果填写错误,接到后台反馈报错后,要将错误信息弹出反馈给用户。
parent da4f8c34
...@@ -64,4 +64,4 @@ SPEC CHECKSUMS: ...@@ -64,4 +64,4 @@ SPEC CHECKSUMS:
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.38.2 COCOAPODS: 0.39.0
...@@ -2568,6 +2568,7 @@ ...@@ -2568,6 +2568,7 @@
C1F696001AB870B400F9F5DD /* Frameworks */, C1F696001AB870B400F9F5DD /* Frameworks */,
C1F696011AB870B400F9F5DD /* Resources */, C1F696011AB870B400F9F5DD /* Resources */,
1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */, 1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */,
C30B9D53F34B4631A53EB1DA /* Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
...@@ -2707,6 +2708,21 @@ ...@@ -2707,6 +2708,21 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
C30B9D53F34B4631A53EB1DA /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
......
...@@ -520,7 +520,7 @@ acceptTypeJson:(BOOL)bAcceptJson ...@@ -520,7 +520,7 @@ acceptTypeJson:(BOOL)bAcceptJson
} }
else { else {
if (fail) { if (fail) {
fail( nil ); fail( responseObject[@"message"] );
} }
} }
}; };
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
} }
+ (UIView *)p_textFWithLeftImgView:(NSString *)nsLeftImgName + (UIView *)p_textFWithLeftImgView:(NSString *)nsLeftImgName
palceHodler: (NSString *)placeHodler
textF:(UITextField * __autoreleasing *)textFPointer textF:(UITextField * __autoreleasing *)textFPointer
{ {
UIView *v = [[UIView alloc] init]; UIView *v = [[UIView alloc] init];
...@@ -112,6 +113,7 @@ ...@@ -112,6 +113,7 @@
UITextField *txtF = [[UITextField alloc] initWithFrame:txtFBG.bounds]; UITextField *txtF = [[UITextField alloc] initWithFrame:txtFBG.bounds];
txtF.leftViewMode = UITextFieldViewModeAlways; txtF.leftViewMode = UITextFieldViewModeAlways;
txtF.leftView = labelContainer; txtF.leftView = labelContainer;
txtF.placeholder = placeHodler;
[txtF autoresizingWithStrechFullSize]; [txtF autoresizingWithStrechFullSize];
[v addSubview:txtF]; [v addSubview:txtF];
...@@ -233,7 +235,7 @@ ...@@ -233,7 +235,7 @@
// [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"CompanyCode"] stringByAppendingString:@":"] // [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"CompanyCode"] stringByAppendingString:@":"]
// textF:&txtF]; // textF:&txtF];
self.m_cCodeView = self.m_cCodeView =
[[self class] p_textFWithLeftImgView:@"公司识别码" textF:&txtF]; [[self class] p_textFWithLeftImgView:@"公司识别码" palceHodler:@"请输入公司认证码" textF:&txtF];
self.m_cCodeTextF = txtF; self.m_cCodeTextF = txtF;
[self addSubview:_m_cCodeView]; [self addSubview:_m_cCodeView];
...@@ -241,7 +243,7 @@ ...@@ -241,7 +243,7 @@
// [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"User"] stringByAppendingString:@":"] // [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"User"] stringByAppendingString:@":"]
// textF:&txtF]; // textF:&txtF];
self.m_userNameView = self.m_userNameView =
[[self class] p_textFWithLeftImgView:@"profile" textF:&txtF]; [[self class] p_textFWithLeftImgView:@"profile" palceHodler:@"请输入用户名"textF:&txtF];
self.m_userNameTextF = txtF; self.m_userNameTextF = txtF;
[self addSubview:_m_userNameView]; [self addSubview:_m_userNameView];
...@@ -250,7 +252,7 @@ ...@@ -250,7 +252,7 @@
// [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"Password"] stringByAppendingString:@":"] // [[self class] TextFWithLeftLabel:[[IBTCommon localizableString:@"Password"] stringByAppendingString:@":"]
// textF:&txtF]; // textF:&txtF];
self.m_passwordView = self.m_passwordView =
[[self class] p_textFWithLeftImgView:@"password" textF:&txtF]; [[self class] p_textFWithLeftImgView:@"password" palceHodler:@"请输入密码"textF:&txtF];
self.m_passwordTextF = txtF; self.m_passwordTextF = txtF;
_m_passwordTextF.secureTextEntry = YES; _m_passwordTextF.secureTextEntry = YES;
......
...@@ -186,7 +186,9 @@ ...@@ -186,7 +186,9 @@
}; };
void(^fail)(id) = ^(id data) { void(^fail)(id) = ^(id data) {
[IBTLoadingView showTips:data]; CLog(@"error =%@",data);
// [IBTLoadingView showTips:data];//@"输入的信息不正确,请重新输入"
[IBTLoadingView showTextOnly: data inView:self.view];
}; };
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController]; ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
[httpCtrl doLoginWithUserName:nsUserName [httpCtrl doLoginWithUserName:nsUserName
......
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