Commit 2a5af8b55cfaa9f7c228cbc59145d9a13bd7ae02

Authored by yanglingyu
1 parent 80857aeb

loading细节修改

CNLiveScioLive/Pages/Home/外宣要闻/Controller/CNLiveHeraldedNewsViewController.m
... ... @@ -88,13 +88,17 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
88 88  
89 89  
90 90 } failure:^(NSError *error) {
  91 + [AlertViewTool hideHUDView];
  92 + [self.tableView.mj_header endRefreshing];
  93 + [self.tableView.mj_footer endRefreshing];
  94 + [AlertViewTool showHUDViewText:CustomStr(@"ServerBusy")];
  95 + self->_isRefreshing = NO;
  96 +
91 97 NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:self.cid];
92 98 if (data &&self.pageNo == 1) {
93 99 [self dealDictionaryData:data];
94 100 }
95   - [AlertViewTool showHUDViewText:CustomStr(@"ServerBusy")];
96   - self->_isRefreshing = NO;
97   - [AlertViewTool hideHUDView];
  101 +
98 102  
99 103 }];
100 104 }
... ...
CNLiveScioLive/Pages/Home/答记者问/Controller/CNLiveReporterAskedViewController.m
... ... @@ -82,13 +82,16 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
82 82  
83 83  
84 84 } failure:^(NSError *error) {
  85 + [AlertViewTool hideHUDView];
  86 + [AlertViewTool showHUDViewText:CustomStr(@"ServerBusy")];
  87 + self->_isRefreshing = NO;
  88 + [self.tableView.mj_header endRefreshing];
  89 + [self.tableView.mj_footer endRefreshing];
85 90 NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:self.cid];
86 91 if (data &&self.pageNo == 1) {
87 92 [self dealDictionaryData:data];
88 93 }
89   - [AlertViewTool showHUDViewText:CustomStr(@"ServerBusy")];
90   - self->_isRefreshing = NO;
91   - [AlertViewTool hideHUDView];
  94 +
92 95  
93 96 }];
94 97 }
... ...
CNLiveScioLive/Pages/Live/Controller/CNLiveViewController.m
... ... @@ -145,6 +145,8 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell";
145 145 self->_isRefreshing = NO;
146 146 [AlertViewTool hideHUDView];
147 147 [AlertViewTool showHUDViewText:CustomStr(@"ServerBusy")];
  148 + [self.tableView.mj_header endRefreshing];
  149 + [self.tableView.mj_footer endRefreshing];
148 150  
149 151 }];
150 152 }
... ...
CNLiveScioLive/Pages/Newsound/OldController/VoiceViewController.m
... ... @@ -173,11 +173,9 @@ static const NSInteger margin = 34;
173 173  
174 174 }
175 175 failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
176   - // 请求失败
177   - [self.tableView.mj_header endRefreshing];
178   - NSLog(@"%@", [error localizedDescription]);
179   - [AlertViewTool hideHUDView];
180   - [AlertViewTool showHUDViewText:CustomStr(@"ServerBusy")];
  176 + [self.tableView.mj_header endRefreshing];
  177 + [AlertViewTool hideHUDView];
  178 + [self.tableView.mj_footer setState:MJRefreshStateIdle];
181 179  
182 180 }];
183 181  
... ...