
- 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
50 lines
1.7 KiB
Objective-C
50 lines
1.7 KiB
Objective-C
//
|
|
// LoginForgetPasswordPresent.m
|
|
// YUMI
|
|
//
|
|
// Created by YUMI on 2021/9/10.
|
|
//
|
|
|
|
#import "LoginForgetPasswordPresent.h"
|
|
///Tool
|
|
#import "AccountInfoStorage.h"
|
|
#import "DESEncrypt.h"
|
|
#import "YUMIConstant.h"
|
|
///Api
|
|
#import "Api+Login.h"
|
|
///Presenter
|
|
#import "LoginForgetPasswordPresent.h"
|
|
///Protocol
|
|
#import "LoginForgetPasswordProtocol.h"
|
|
|
|
@implementation LoginForgetPasswordPresent
|
|
|
|
- (id<LoginForgetPasswordProtocol>)getView {
|
|
return ((id<LoginForgetPasswordProtocol>) [super getView]);
|
|
}
|
|
|
|
/// 获取手机的验证码
|
|
/// @param phone 手机号
|
|
/// @param type 类型
|
|
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type phoneAreaCode:(NSString *)phoneAreaCode{
|
|
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
|
[Api phoneSmsCode:[self createHttpCompletion:^(id _Nonnull data) {
|
|
[[self getView] phoneSmsCodeSuccess];
|
|
}] mobile:desPhone type:[NSString stringWithFormat:@"%lu", (unsigned long)type] phoneAreaCode:phoneAreaCode];
|
|
}
|
|
|
|
|
|
/// 没有登录的时候 重置密码
|
|
/// @param phone 手机号
|
|
/// @param newPwd 新的密码
|
|
/// @param smsCode 验证码
|
|
- (void)resetPassword:(NSString *)phone newPwd:(NSString *)newPwd smsCode:(NSString *)smsCode phoneAreaCode:(NSString *)phoneAreaCode{
|
|
NSString * desPassword = [DESEncrypt encryptUseDES:newPwd key:KeyWithType(KeyType_PasswordEncode)];
|
|
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
|
|
[Api resetPasswordWithPhone:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
[[self getView] resetPasswrodSuccess];
|
|
} showLoading:YES] phone:desPhone newPwd:desPassword smsCode:smsCode phoneAreaCode:phoneAreaCode];
|
|
}
|
|
|
|
@end
|