al
liurenjie
2021-07-03 1b73d5d0b495f2d643c2523e1b8399f925b4f702
BuWanVideo2.0/Recommend/MainBaseController.m
@@ -29,23 +29,20 @@
- (void)getHotSearch {
    if (![YTHsharedManger startManger].searchTitle || [[YTHsharedManger startManger].searchTitle isEqualToString:@""]) {
        [[YTHNetInterface startInterface] getHotSerachWithUid:[YTHsharedManger startManger].Uid withSystem:@"1" withblock:^(BOOL isSuccessful, id result, NSString *error) {
        [[YTHNetInterface startInterface] fetchHotSerchListWithUid:^(BOOL isSuccessful, id result, NSString *error) {
            if (isSuccessful) {
                NSDictionary *dic = (NSDictionary *)result;
                if (!_dataHot) {
                    self.dataHot = [[NSMutableArray alloc] initWithCapacity:0];
                }
                [self.dataHot removeAllObjects];
                NSArray *ar = [[dic objectForKey:@"Data"] objectForKey:@"data"];
                NSArray *ar = [[dic objectForKey:@"Data"] objectForKey:@"data"][@"热搜榜"];
                for (int i =0; i<ar.count; i++) {
                    [self.dataHot addObject:[ar objectAtIndex:i]];
                }
                NSInteger rand = arc4random()%self.dataHot.count ;
                self.viewRecommendNav.title = self.dataHot[rand];
                [YTHsharedManger startManger].searchTitle = self.viewRecommendNav.title;
            } else {
            }
        }];