Skip to content

Commit 97e671f

Browse files
committed
两步验证码需要自动填充
1 parent 0d1747d commit 97e671f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Coding_iOS/Controllers/MeSetting/SettingEmailViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#import "TPKeyboardAvoidingTableView.h"
1212
#import "Coding_NetAPIManager.h"
1313
#import "Login.h"
14+
#import "Ease_2FA.h"
1415

1516
@interface SettingEmailViewController ()<UITableViewDataSource, UITableViewDelegate>
1617
@property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView;
@@ -55,6 +56,7 @@ - (void)refresh2FA{
5556
[[Coding_NetAPIManager sharedManager] get_is2FAOpenBlock:^(BOOL data, NSError *error) {
5657
if (!error) {
5758
weakSelf.is2FAOpen = data;
59+
weakSelf.two_factor_code = data? [OTPListViewController otpCodeWithGK:[Login curLoginUser].global_key]: @"";
5860
[weakSelf.myTableView reloadData];
5961
}
6062
}];

Coding_iOS/Controllers/MeSetting/SettingPhoneViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import "Coding_NetAPIManager.h"
1313
#import "Login.h"
1414
#import "CountryCodeListViewController.h"
15+
#import "Ease_2FA.h"
1516

1617
@interface SettingPhoneViewController ()<UITableViewDataSource, UITableViewDelegate>
1718
@property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView;
@@ -53,6 +54,7 @@ - (void)viewDidLoad {
5354
[[Coding_NetAPIManager sharedManager] request_VerifyTypeWithBlock:^(VerifyType type, NSError *error) {
5455
if (!error) {
5556
self.verifyType = type;
57+
self.verifyStr = type == VerifyTypeTotp? [OTPListViewController otpCodeWithGK:[Login curLoginUser].global_key]: @"";
5658
[self.myTableView reloadData];
5759
}
5860
}];

0 commit comments

Comments
 (0)