diff --git a/Coding_iOS.xcodeproj/project.pbxproj b/Coding_iOS.xcodeproj/project.pbxproj
index 79a2d1a25..2670133d7 100644
--- a/Coding_iOS.xcodeproj/project.pbxproj
+++ b/Coding_iOS.xcodeproj/project.pbxproj
@@ -11264,7 +11264,7 @@
files = (
);
inputPaths = (
- "${SRCROOT}/Pods/Target Support Files/Pods-Coding_iOS-Coding_Enterprise_iOS/Pods-Coding_iOS-Coding_Enterprise_iOS-resources.sh",
+ "${PODS_ROOT}/Target Support Files/Pods-Coding_iOS-Coding_Enterprise_iOS/Pods-Coding_iOS-Coding_Enterprise_iOS-resources.sh",
"${PODS_ROOT}/FontAwesome+iOS/Resources/FontAwesome.ttf",
"${PODS_ROOT}/UMengUShare/UShareSDK/UMSocialSDK/UMSocialSDKPromptResources.bundle",
"${PODS_ROOT}/UMengUShare/UShareSDK/SocialLibraries/QQ/QQSDK/TencentOpenApi_IOS_Bundle.bundle",
@@ -11281,7 +11281,7 @@
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Coding_iOS-Coding_Enterprise_iOS/Pods-Coding_iOS-Coding_Enterprise_iOS-resources.sh\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Coding_iOS-Coding_Enterprise_iOS/Pods-Coding_iOS-Coding_Enterprise_iOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B1D5F1FE20BC06CB00983FB6 /* ShellScript */ = {
@@ -11305,7 +11305,7 @@
files = (
);
inputPaths = (
- "${SRCROOT}/Pods/Target Support Files/Pods-Coding_iOS/Pods-Coding_iOS-resources.sh",
+ "${PODS_ROOT}/Target Support Files/Pods-Coding_iOS/Pods-Coding_iOS-resources.sh",
"${PODS_ROOT}/FontAwesome+iOS/Resources/FontAwesome.ttf",
"${PODS_ROOT}/UMengUShare/UShareSDK/UMSocialSDK/UMSocialSDKPromptResources.bundle",
"${PODS_ROOT}/UMengUShare/UShareSDK/SocialLibraries/QQ/QQSDK/TencentOpenApi_IOS_Bundle.bundle",
@@ -11322,7 +11322,7 @@
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Coding_iOS/Pods-Coding_iOS-resources.sh\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Coding_iOS/Pods-Coding_iOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
B7F20F3BC924F718A926E931 /* [CP] Check Pods Manifest.lock */ = {
diff --git a/Coding_iOS/Coding_Enterprise_iOS-Info.plist b/Coding_iOS/Coding_Enterprise_iOS-Info.plist
index beea38d8b..d652e9f7b 100644
--- a/Coding_iOS/Coding_Enterprise_iOS-Info.plist
+++ b/Coding_iOS/Coding_Enterprise_iOS-Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.9.10
+ 2.10
CFBundleSignature
????
CFBundleURLTypes
@@ -28,7 +28,7 @@
CFBundleVersion
- 2.9.10.20190219.1
+ 2.10.20190523.1
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/Coding_iOS/Coding_iOS-Prefix.pch.example b/Coding_iOS/Coding_iOS-Prefix.pch.example
index a48e2391e..25cc487e5 100644
--- a/Coding_iOS/Coding_iOS-Prefix.pch.example
+++ b/Coding_iOS/Coding_iOS-Prefix.pch.example
@@ -26,7 +26,6 @@
#import "UILabel+Common.h"
#import "NSDate+Common.h"
#import "UIBarButtonItem+Common.h"
-#import "UIActionSheet+Common.h"
#import "NSURL+Common.h"
#import "UISearchBar+Common.h"
#import "UITTTAttributedLabel.h"
diff --git a/Coding_iOS/Controllers/Login/IntroductionViewController.m b/Coding_iOS/Controllers/Login/IntroductionViewController.m
index 594d0c176..853dbe09c 100644
--- a/Coding_iOS/Controllers/Login/IntroductionViewController.m
+++ b/Coding_iOS/Controllers/Login/IntroductionViewController.m
@@ -109,6 +109,7 @@ - (void)configureButtonsAndPageControl{
[button setTitle:@"企业账号登录" forState:UIControlStateNormal];
button.layer.masksToBounds = YES;
button.layer.cornerRadius = 2.0;
+ button.hidden = true;
button;
});
[self.view addSubview:self.loginEnterpriseBtn];
diff --git a/Coding_iOS/Controllers/Login/LoginViewController.m b/Coding_iOS/Controllers/Login/LoginViewController.m
index 57a385752..27ad9aaa6 100644
--- a/Coding_iOS/Controllers/Login/LoginViewController.m
+++ b/Coding_iOS/Controllers/Login/LoginViewController.m
@@ -390,6 +390,12 @@ - (void)loginBtnClicked{
[NSObject showError:error];
}
}else{
+ NSDictionary *dataBody = [data objectForKey:@"data"];
+ NSDictionary *settings = [dataBody objectForKey:@"settings"];
+ BOOL ssoEnabled = [[settings objectForKey:@"ssoEnabled"] boolValue];
+ NSString *ssoType = [settings objectForKey:@"ssoType"];
+ self.myLogin.ssoType = ssoType;
+ self.myLogin.ssoEnabled = ssoEnabled;
[weakSelf goToNextStep];
}
}];
diff --git a/Coding_iOS/Models/Login.h b/Coding_iOS/Models/Login.h
index 93eee442c..6ab81c7d4 100755
--- a/Coding_iOS/Models/Login.h
+++ b/Coding_iOS/Models/Login.h
@@ -13,8 +13,9 @@
@interface Login : NSObject
//请求
-@property (readwrite, nonatomic, strong) NSString *email, *password, *j_captcha, *company;
+@property (readwrite, nonatomic, strong) NSString *email, *password, *j_captcha, *company, *ssoType;
@property (readwrite, nonatomic, strong) NSNumber *remember_me;
+@property (readwrite, nonatomic) BOOL ssoEnabled;
- (NSString *)goToLoginTipWithCaptcha:(BOOL)needCaptcha;
- (NSString *)toPath;
diff --git a/Coding_iOS/Models/Login.m b/Coding_iOS/Models/Login.m
index ed7576181..8d3c5d05f 100644
--- a/Coding_iOS/Models/Login.m
+++ b/Coding_iOS/Models/Login.m
@@ -29,6 +29,8 @@ - (instancetype)init
self.remember_me = [NSNumber numberWithBool:YES];
self.email = @"";
self.password = @"";
+ self.ssoType = @"default";
+ self.ssoEnabled = NO;
}
return self;
}
@@ -37,8 +39,12 @@ - (NSString *)toPath{
return @"api/v2/account/login";
}
- (NSDictionary *)toParams{
+ NSString *password = [self.password sha1Str];
+ if (self.ssoEnabled && [self.ssoType isEqualToString:@"ldap"]) {
+ password = self.password;
+ }
NSMutableDictionary *params = @{@"account": self.email,
- @"password" : [self.password sha1Str],
+ @"password" : password,
@"remember_me" : self.remember_me? @"true" : @"false",}.mutableCopy;
if (self.j_captcha.length > 0) {
params[@"j_captcha"] = self.j_captcha;
diff --git a/Podfile.lock b/Podfile.lock
index 3b38f29c4..946ff0a77 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -189,4 +189,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 8c4d664f01f05a5ddc0837b2a06d36650c4edeeb
-COCOAPODS: 1.5.3
+COCOAPODS: 1.6.2