Files
peko-ios/YuMi/Modules/YMMine/Presenter/XPMineVerifIdentityPresenter.m

48 lines
1.5 KiB
Mathematica
Raw Normal View History

2023-07-14 18:50:55 +08:00
//
// YMMineVerifIdentityPresenter.m
// YUMI
//
// Created by YUMI on 2021/9/18.
//
#import "XPMineVerifIdentityPresenter.h"
///Api
#import "Api.h"
///P
#import "XPMineVerifIdentityProtocol.h"
///Tool
#import "AccountInfoStorage.h"
#import "DESEncrypt.h"
#import "YUMIConstant.h"
@implementation XPMineVerifIdentityPresenter
///
/// @param phone
/// @param type
- (void)phoneSmsCode:(NSString *)phone type:(GetSmsType)type phoneAreaCode:(NSString *)phoneAreaCode{
NSString * typeStr = [NSString stringWithFormat:@"%lu", (unsigned long)type];
NSString * desPhone = [DESEncrypt encryptUseDES:phone key:KeyWithType(KeyType_PasswordEncode)];
[Api phoneSmsCode:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] phoneSmsCodeSuccess];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] mobile:desPhone type:typeStr phoneAreaCode:phoneAreaCode];
}
///
/// @param moblieNum
/// @param code
2023-07-18 18:26:10 +08:00
- (void)checkMoblieCodeWithMoblie:(NSString *)moblieNum code:(NSString *)code phoneAreaCode:(NSString *)phoneAreaCode{
2023-07-14 18:50:55 +08:00
NSString * uid = [[AccountInfoStorage instance] getUid];
NSString * ticket = [[AccountInfoStorage instance] getTicket];
NSString * desPhone = [DESEncrypt encryptUseDES:moblieNum key:KeyWithType(KeyType_PasswordEncode)];
[Api checkMoblieCode:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] checkMoblieCodeWithMoblieSuccess];
2023-07-18 18:26:10 +08:00
}] mobile:desPhone code:code uid:uid ticket:ticket phoneAreaCode:phoneAreaCode];
2023-07-14 18:50:55 +08:00
}
@end