Commit ab24e86dbd39941d6d7cac87cffd233e4f75deb2

Authored by zhangxiaowen
1 parent 33d7b9fe

no message

CNLiveIntegralModule/Classes/Controller/CNLiveTaskListController.m
... ... @@ -124,14 +124,18 @@
124 124 [QMUITips showLoadingInView:self.view];
125 125 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNIntegralGetTasksUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
126 126 [QMUITips hideAllTipsInView:self.view];
127   - [self hideEmptyView];
128   - if (error) {
129   - if (self.data.count == 0) {
130   - if (error.code == -1001) {
131   - [self showEmptyViewWithImage:[UIImage imageNamed:@"dd_wlcw"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)];
132   - [self setCNAPIErrorEmptyView];
133   - }
134   - }
  127 +
  128 + if (error) {
  129 + if (error.code == -1001||error.code == -1003||error.code == -1009) {
  130 + [self.tableView showEmptyViewWithType:CNLiveCustomTipsTypeNoNet noData:self.data.count == 0 block:^{
  131 + [self loadData];
  132 + }];
  133 + }else{
  134 + [self.tableView showEmptyViewWithType:CNLiveCustomTipsTypeLoadFail noData:self.data.count == 0 block:^{
  135 + [self loadData];
  136 + }];
  137 + }
  138 + self.tableView.emptyView.backgroundColor = [UIColor whiteColor];
135 139 return;
136 140 }
137 141 if(responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]){
... ... @@ -139,6 +143,9 @@
139 143 [self.data addObject:model];
140 144 self.headView.score = model.integral;
141 145 [self.tableView reloadData];
  146 + [self.tableView showEmptyViewWithType:CNLiveCustomTipsTypeNoData noData:self.data.count == 0 block:nil];
  147 + self.tableView.emptyView.backgroundColor = [UIColor whiteColor];
  148 +
142 149 if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
143 150 if([responseObject isKindOfClass:[NSDictionary class]]){
144 151 //存入任务列表
... ...
CNLiveIntegralModule/Classes/View/CNLiveTaskListHeaderView.m
... ... @@ -126,7 +126,8 @@ static const NSInteger margin = 15;
126 126 _getScore.textColor = [UIColor whiteColor];
127 127 _getScore.font = UIFontMake(32);
128 128 _getScore.userInteractionEnabled = YES;
129   -
  129 + _getScore.text = @"0.00";
  130 +
130 131 }
131 132 return _getScore;
132 133  
... ...