This commit is contained in:
lianxiang
2018-10-18 17:02:29 +08:00
parent 94ce6d3e14
commit 52222aa995
16 changed files with 103 additions and 75 deletions
@@ -18,8 +18,8 @@
@interface GiMaskTimeHistoryVC ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong) NSMutableArray *dataArr;
@property(nonatomic) NSUInteger currentPage;
@property(nonatomic,assign) NSInteger totalMinute;
@property(nonatomic) int currentPage;
@property(nonatomic,copy) NSString *totalMinute;
@property(nonatomic,assign) NSInteger ranking;
@property(nonatomic,assign) NSUInteger totalPage;
//@property(nonatomic,strong) MaskHistryRecordlist *record;
@@ -35,7 +35,7 @@
[super viewDidLoad];
self.dataArr = [[NSMutableArray alloc] init];
_currentPage = 1;
_totalMinute = 0;
_totalMinute = @"0.0";
_ranking = 0;
_isFreshing = NO;
[self addNavTitile:@"历史记录"];
@@ -53,7 +53,7 @@
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self creatRefreshView];
[self loadDataWtih:[NSString stringWithFormat:@"%ld",_currentPage] isFresh:YES];
[self loadDataWtih:[NSString stringWithFormat:@"%d",_currentPage] isFresh:YES];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
@@ -84,7 +84,7 @@
}
cell.timeLabe.text = [NSString stringWithFormat:@"%ld",(long)self.totalMinute];
cell.timeLabe.text = [NSString stringWithFormat:@"%@",self.totalMinute];
if (self.exquisitePercent) {
NSString *text = [NSString stringWithFormat:@"本月超过%@用户",self.exquisitePercent];
@@ -111,7 +111,6 @@
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (section == 0) {
return 1;
@@ -154,7 +153,7 @@
NSDictionary *reDic =result.dic;
self.ranking = [[reDic valueForKey:@"ranking"] integerValue];
self.totalMinute = [[reDic valueForKey:@"totalMinute"] integerValue] ;
self.totalMinute = [reDic valueForKey:@"totalMinute"];
self.exquisitePercent = [reDic valueForKey:@"exquisitePercent"];
self.guizeUrl = [reDic valueForKey:@"ruleUrl"];
@@ -220,10 +219,9 @@
return;
}
if (_currentPage < _totalPage) {
_currentPage ++;
[self loadDataWtih:[NSString stringWithFormat:@"%ld",self.currentPage] isFresh:NO];
[self loadDataWtih:[NSString stringWithFormat:@"%d",self.currentPage] isFresh:NO];
}
}