
- Removed YuMi/Library/ (138 MB, not tracked) - Removed YuMi/Resources/ (23 MB, not tracked) - Removed old version assets (566 files, not tracked) - Excluded Pods/, xcuserdata/ and other build artifacts - Clean repository optimized for company server deployment
43 lines
1.3 KiB
Objective-C
43 lines
1.3 KiB
Objective-C
//
|
|
// LoginPasswordPresent.m
|
|
// YUMI
|
|
//
|
|
// Created by YUMI on 2021/9/9.
|
|
//
|
|
|
|
#import "LoginPasswordPresent.h"
|
|
///Http
|
|
#import "Api+Login.h"
|
|
///Tool
|
|
#import "AccountInfoStorage.h"
|
|
#import "DESEncrypt.h"
|
|
#import "YUMIConstant.h"
|
|
///Model
|
|
#import "AccountModel.h"
|
|
///Protocol
|
|
#import "LoginPasswordProtocol.h"
|
|
|
|
|
|
@implementation LoginPasswordPresent
|
|
|
|
- (id<LoginPasswordProtocol>)getView {
|
|
return ((id<LoginPasswordProtocol>) [super getView]);
|
|
}
|
|
|
|
/// 使用手机号和密码登录
|
|
/// @param phone 手机号
|
|
/// @param password 验证码
|
|
- (void)loginWithPhone:(NSString *)phone password:(NSString *)password {
|
|
NSString * desPassword = [DESEncrypt encryptUseDES:password key:KeyWithType(KeyType_PasswordEncode)];
|
|
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
|
[Api loginWithPassword:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
AccountModel * accountModel = [AccountModel modelWithDictionary:data.data];
|
|
if (accountModel && accountModel.access_token.length > 0) {
|
|
[[AccountInfoStorage instance] saveAccountInfo:accountModel];
|
|
}
|
|
[[self getView] phoneAndPasswordLoginSuccess];
|
|
} showLoading:YES errorToast:YES] phone:desPhone password:desPassword client_secret:@"uyzjdhds" version:@"1" client_id:@"erban-client" grant_type:@"password"];
|
|
}
|
|
|
|
@end
|