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

43 lines
1.3 KiB
Mathematica
Raw Normal View History

2023-07-14 18:50:55 +08:00
//
// YMMinePayPwdPresenter.m
// YUMI
//
// Created by YUMI on 2021/9/18.
//
#import "XPMinePayPwdPresenter.h"
///Api
#import "Api+Mine.h"
///P
#import "XPMinePayPwdProtocol.h"
///Tool
#import "DESEncrypt.h"
#import "YUMIConstant.h"
#import "AccountInfoStorage.h"
@implementation XPMinePayPwdPresenter
///
/// @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];
}] mobile:desPhone type:typeStr phoneAreaCode:phoneAreaCode];
}
///
/// @param password
- (void)setPayPassword:(NSString *)password {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
NSString * newpasswordDes = [DESEncrypt encryptUseDES:password key:KeyWithType(KeyType_PasswordEncode)];
[Api setPayPassword:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] setPayPasswordSuccess];
}] newPasswd:newpasswordDes uid:uid ticket:ticket];
}
@end