@@ -87,7 +87,7 @@ - (void)refreshMore{
8787}
8888
8989- (void )sendRequest {
90- if (_curRecords.list .count <= 0 ) {
90+ if (_curRecords.list .count <= 0 && !_curRecords. points_left ) {
9191 [self .view beginLoading ];
9292 }
9393 __weak typeof (self) weakSelf = self;
@@ -100,15 +100,15 @@ - (void)sendRequest{
100100 [weakSelf.myTableView reloadData ];
101101 weakSelf.myTableView .showsInfiniteScrolling = weakSelf.curRecords .canLoadMore ;
102102 }
103- [weakSelf.view configBlankPage: EaseBlankPageTypeView hasData: (weakSelf.curRecords.list.count > 0 ) hasError: (error != nil ) reloadButtonBlock: ^(id sender) {
103+ [weakSelf.view configBlankPage: EaseBlankPageTypeView hasData: (weakSelf.curRecords.list.count > 0 || weakSelf.curRecords.points_left ) hasError: (error != nil ) reloadButtonBlock: ^(id sender) {
104104 [weakSelf refresh ];
105105 }];
106106 }];
107107}
108108
109109#pragma mark Table M
110110- (NSInteger )numberOfSectionsInTableView : (UITableView *)tableView {
111- return _curRecords.list .count <= 0 ? 0 :2 ;
111+ return _curRecords.list .count <= 0 ? 1 :2 ;
112112}
113113- (NSInteger )tableView : (UITableView *)tableView numberOfRowsInSection : (NSInteger )section {
114114 return section == 0 ? 2 : self.curRecords .list .count ;
@@ -117,9 +117,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
117117
118118 if (indexPath.section == 0 ) {
119119 if (indexPath.row == 0 ) {
120- PointRecord *record = [_curRecords.list firstObject ];
121120 PointTopCell *cell = [tableView dequeueReusableCellWithIdentifier: kCellIdentifier_PointTopCell forIndexPath: indexPath];
122- cell.pointLeftStr = [NSString stringWithFormat: @" %.2f " , record .points_left.floatValue];
121+ cell.pointLeftStr = _curRecords. points_left ? [NSString stringWithFormat: @" %.2f " , _curRecords .points_left.floatValue]: @" -- " ;
123122 [tableView addLineforPlainCell: cell forRowAtIndexPath: indexPath withLeftSpace: 0 hasSectionLine: NO ];
124123 return cell;
125124 }else {
0 commit comments