29 lines
772 B
Objective-C
29 lines
772 B
Objective-C
//
|
|
// LoginPresenter.m
|
|
// xplan-ios
|
|
//
|
|
// Created by zu on 2021/9/1.
|
|
//
|
|
|
|
#import "LoginPresenter.h"
|
|
#import "LoginProtocol.h"
|
|
#import "Api+Login.h"
|
|
#import "AccountInfoStorage.h"
|
|
|
|
@implementation LoginPresenter
|
|
|
|
- (id<LoginProtocol>)getView {
|
|
return ((id<LoginProtocol>) [super getView]);
|
|
}
|
|
|
|
- (void)phoneQuickLogin:(NSString *)accessToken token:(NSString *)token {
|
|
[Api phoneQuickLogin:[self createHttpCompletion:^(BaseModel *data) {
|
|
[[AccountInfoStorage instance] saveAccountInfo:[AccountModel yy_modelWithDictionary:data.data]];
|
|
[[self getView] phoneQuickLoginSuccess];
|
|
} fail:^(NSNumber * _Nonnull code, NSString * _Nullable msg) {
|
|
// todo fail
|
|
} showLoading:YES errorToast:YES] accessToken:accessToken token:token];
|
|
}
|
|
|
|
@end
|