我的页面加载逻辑优化
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
/// 获取用户信息
|
||||
- (void)getUserInfo {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
if (uid == nil) {
|
||||
if (!uid.length) {
|
||||
return;
|
||||
}
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -49,7 +49,7 @@
|
||||
- (void)getUserWalletInfo {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
if (uid == nil) {
|
||||
if (!uid.length) {
|
||||
return;
|
||||
}
|
||||
[Api getUserWalletInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -69,7 +69,7 @@
|
||||
/// 获取家族详细的信息
|
||||
- (void)getClanDetailInfo {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
if (uid == nil) {
|
||||
if (!uid.length) {
|
||||
return;
|
||||
}
|
||||
[Api getClanDetailInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -81,7 +81,7 @@
|
||||
///获取个人功能列表
|
||||
- (void)getPersonItemList {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
if (uid == nil) {
|
||||
if (!uid.length) {
|
||||
return;
|
||||
}
|
||||
[Api requestPersonalFunctionItem:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -93,7 +93,7 @@
|
||||
///获取小游戏列表
|
||||
- (void)getLittleGameList {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
if (uid == nil) {
|
||||
if (!uid.length) {
|
||||
return;
|
||||
}
|
||||
[Api getLittleGameList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@@ -105,7 +105,7 @@
|
||||
///获取个人中心banner
|
||||
- (void)getMineBannerList {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
if (uid == nil) {
|
||||
if (!uid.length) {
|
||||
return;
|
||||
}
|
||||
[Api requestMineBannerList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
|
@@ -119,11 +119,11 @@
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[self.presenter getUserInfo];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
[self.presenter getUserInfo];
|
||||
}
|
||||
|
||||
#pragma mark - Response
|
||||
|
Reference in New Issue
Block a user