1
This commit is contained in:
@@ -10,10 +10,13 @@
|
||||
#import "KBPanModalView.h"
|
||||
#import "KBGuideVC.h" // 首次安装指引页
|
||||
#import "WMDragView.h"
|
||||
#import "KBMyVM.h"
|
||||
#import "KBUserSessionManager.h"
|
||||
|
||||
@interface HomeMainVC ()
|
||||
@property (nonatomic, strong) HomeHeadView *headView;
|
||||
@property (nonatomic, strong) KBPanModalView *simplePanModalView;
|
||||
@property (nonatomic, strong) KBMyVM *viewModel;
|
||||
|
||||
/// 权限按钮
|
||||
@property (nonatomic, strong) WMDragView *keyPermissButton;
|
||||
@@ -65,6 +68,17 @@
|
||||
// NSLog(@"[MainApp] 写入完成");
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
if (![KBUserSessionManager shared].isLoggedIn) {
|
||||
return;
|
||||
}
|
||||
if (!self.viewModel) {
|
||||
self.viewModel = [[KBMyVM alloc] init];
|
||||
}
|
||||
[self.viewModel fetchUserDetailWithCompletion:nil];
|
||||
}
|
||||
|
||||
// 在界面可见后做“首次安装”检查,避免在 viewDidLoad 期间 push 引起的转场警告
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
Reference in New Issue
Block a user