Przeglądaj źródła

1.修改iOS Apex Mobile User以小写保存和取值。

Pen Li 8 lat temu
rodzic
commit
57d0033953

+ 6 - 0
Apex Mobile/Apex Mobile/AppDelegate.m

@@ -281,4 +281,10 @@ void UncaughtExceptionHandler(NSException *exception) {
 //    [[UIActivityIndicatorView appearance] setBackgroundColor:[UIColor colorWithRed:255 / 255.0 green:255 / 255.0 blue:255 / 255.0 alpha:0.9]];
 //    [[UIActivityIndicatorView appearance] setBackgroundColor:[UIColor colorWithRed:255 / 255.0 green:255 / 255.0 blue:255 / 255.0 alpha:0.9]];
     
     
 }
 }
+
+- (void)setUser:(NSString *)user {
+    _user = user.lowercaseString;
+}
+
+
 @end
 @end

+ 1 - 1
Apex Mobile/Apex Mobile/LoginViewController.m

@@ -69,7 +69,7 @@
                 {
                 {
                     
                     
                     
                     
-                    [defaults setValue:[AESCrypt encrypt:self.editUser.text password:@"usai"] forKey:@"user"];
+                    [defaults setValue:[AESCrypt encrypt:self.editUser.text.lowercaseString password:@"usai"] forKey:@"user"];
                     [defaults setValue:[AESCrypt encrypt:self.editPassword.text password:@"usai"] forKey:@"password"];
                     [defaults setValue:[AESCrypt encrypt:self.editPassword.text password:@"usai"] forKey:@"password"];
                     [defaults setBool:TRUE forKey:@"autologin"];
                     [defaults setBool:TRUE forKey:@"autologin"];
                 }
                 }