Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Coding_iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 */ = {
Expand All @@ -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",
Expand All @@ -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 */ = {
Expand Down
1 change: 0 additions & 1 deletion Coding_iOS/Coding_iOS-Prefix.pch.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions Coding_iOS/Controllers/Login/IntroductionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
6 changes: 6 additions & 0 deletions Coding_iOS/Controllers/Login/LoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}];
Expand Down
3 changes: 2 additions & 1 deletion Coding_iOS/Models/Login.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion Coding_iOS/Models/Login.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ - (instancetype)init
self.remember_me = [NSNumber numberWithBool:YES];
self.email = @"";
self.password = @"";
self.ssoType = @"default";
self.ssoEnabled = NO;
}
return self;
}
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 8c4d664f01f05a5ddc0837b2a06d36650c4edeeb

COCOAPODS: 1.5.3
COCOAPODS: 1.6.2