Browse Source

首页刷新逻辑修改

Steven 2 months ago
parent
commit
ce2a87efd8

+ 21 - 20
KulexiuForStudent/KulexiuForStudent/Module/Home/Controller/HomeViewController.m

@@ -455,7 +455,7 @@
         }
     }
     else { // 刷新老师数据
-        [self refreshTalentAndRefresh];
+        [self requestData];
     }
 }
 
@@ -618,25 +618,26 @@
     }];
 }
 
-- (void)refreshTalentAndRefresh {
-    [KSNetworkingManager queryHotTeacherListRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
-        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
-            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
-            NSMutableArray *talentArray = [NSMutableArray array];
-            for (NSDictionary *parm in sourceArray) {
-                TalentTeacherModel *model = [[TalentTeacherModel alloc] initWithDictionary:parm];
-                [talentArray addObject:model];
-            }
-            self.talentArray = [NSMutableArray arrayWithArray:talentArray];
-        }
-        else {
-            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
-        }
-        [self refreshTalentView];
-    } faliure:^(NSError * _Nonnull error) {
-        
-    }];
-}
+//- (void)refreshTalentAndRefresh {
+//    [KSNetworkingManager queryHotTeacherListRequest:KS_GET success:^(NSDictionary * _Nonnull dic) {
+//        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+//            NSArray *sourceArray = [dic ks_arrayValueForKey:@"data"];
+//            NSMutableArray *talentArray = [NSMutableArray array];
+//            for (NSDictionary *parm in sourceArray) {
+//                TalentTeacherModel *model = [[TalentTeacherModel alloc] initWithDictionary:parm];
+//                [talentArray addObject:model];
+//            }
+//            self.talentArray = [NSMutableArray arrayWithArray:talentArray];
+//        }
+//        else {
+//            [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];
+//        }
+//        [self refreshTalentView];
+//        [self refreshHeadHeight];
+//    } faliure:^(NSError * _Nonnull error) {
+//        
+//    }];
+//}
 
 
 - (void)requestLiveList {