我的页面加载逻辑优化

This commit is contained in:
chenguilong
2022-08-02 17:06:46 +08:00
parent 63cc733858
commit 16cdb46f80
2 changed files with 7 additions and 7 deletions

View File

@@ -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) {

View File

@@ -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