// // YZMAChildMonthViewController.m // YouHuiProject // // Created by 小花 on 2018/5/28. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMAChildMonthViewController.h" #import "YZMAChildCommissionCell.h" #import "YZMAChildCommissionModel.h" #import "YZMAMonthCenterTipView.h" @interface YZMAChildMonthViewController () < UITableViewDelegate, UITableViewDataSource > @property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) NSMutableArray *dataArr; @property (nonatomic, assign) NSInteger page; @end @implementation YZMAChildMonthViewController - (void)viewDidLoad { [super viewDidLoad]; [self configTableView]; [self request]; } - (void)configTableView { self.page = 1; [self.view addSubview:self.tableView]; } #pragma mark -------- UITableView Delegate ----- - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { [cell setSeparatorInset:UIEdgeInsetsMake(0, 15, 0, 15)]; } } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return self.dataArr.count; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 110; } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 0.1; } - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { return 0.1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { YZMAChildCommissionCell *cell = [YZMAChildCommissionCell cellWithTableView:tableView]; YZMAChildCommissionModel *model=self.dataArr[indexPath.row]; cell.model=model; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } #pragma mark -网络请求 #pragma mark - request - (void)request { NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/incomeList",BaseURL]; NSDictionary *dic=@{ @"type":@(self.type), @"page":@(self.page), @"isThisMonth":@(self.isThisMonth) }; [YZMAHttp post:url params:dic success:^(id json) { NSArray *arr = [NSArray yy_modelArrayWithClass:[YZMAChildCommissionModel class] json:json[@"data"]]; if (arr.count>0) { [self.dataArr addObjectsFromArray:arr]; [self.tableView.mj_footer endRefreshing]; }else { [self setUpNoDataView]; [self.tableView.mj_footer endRefreshingWithNoMoreData]; } [self.tableView reloadData]; } failure:^(NSError *error) { [self.tableView.mj_footer endRefreshing]; }]; } - (void)setUpNoDataView { self.tableView.showNoDataView = YES; self.tableView.defaultNoDataText = @"您还没有任何订单"; self.tableView.defaultNoDataImage = [UIImage imageNamed:@"noData"]; } #pragma mark ------- layzer ------ - (UITableView *)tableView { if (!_tableView) { _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight-40) style:UITableViewStyleGrouped]; _tableView.estimatedSectionHeaderHeight = 0; _tableView.estimatedSectionFooterHeight = 0; _tableView.sectionFooterHeight = 0; _tableView.sectionHeaderHeight = 0; _tableView.estimatedRowHeight = 0; _tableView.delegate = self; _tableView.dataSource = self; _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; _tableView.backgroundColor = [UIColor yhGrayColor]; _tableView.bounces = YES; _tableView.showsVerticalScrollIndicator = NO; _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; _tableView.separatorColor = [UIColor YHColorWithHex:0xEEEEEE]; _tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ self.page ++; [self request]; }]; } return _tableView; } -(NSMutableArray *)dataArr{ if (!_dataArr) { _dataArr=[NSMutableArray array]; } return _dataArr; } -(void)a05ezfa:(UIScreen*) a05ezfa asdFcO:(UIBarButtonItem*) asdFcO aN95t:(UIDocument*) aN95t auZxlE:(UIViewController*) auZxlE a3IzmT:(UIVisualEffectView*) a3IzmT a7C1BpVs:(UIButton*) a7C1BpVs aD2X3uBYy:(UIWindow*) aD2X3uBYy agi0E:(UILabel*) agi0E aasLBZ4NSu:(UIEdgeInsets*) aasLBZ4NSu azqhmpx:(UIViewController*) azqhmpx a6F1W:(UIActivity*) a6F1W amA5jq:(UIUserInterfaceIdiom*) amA5jq aVqhRZti8vd:(UIMenuItem*) aVqhRZti8vd { NSLog(@"MAXYszPCHcU5p"); NSLog(@"yMNIEuKjXcQsfODgS56zYpRWArUdnFtivJZ3kL"); NSLog(@"9cMLi2qPCsjxIbkyTrgaGE35Y"); NSLog(@"Gf6r85ijPhzxCqEgpY1Ndb7t3ZUW"); NSLog(@"3Dmv8XIONonw06lAHyUZpbWru2q"); NSLog(@"pd3P2rM6SfRBhjmzqFEtTJYu9D1kZNHxwI4g5C"); NSLog(@"ze1nlQZJVSdY0DctaUTBMW6gG7AEoPmqLFvCi"); NSLog(@"TJf1e4low6gIjRuK3Hrsh9GzZA"); NSLog(@"DIlm24ehWdraUTnGQxZXYVAMJ"); NSLog(@"KPlIOxCpyDNogjAeq5adW73uvw"); NSLog(@"bXm5sSQ7lFJ8gwvuPYHTxpWrEV0K2O4njDi"); NSLog(@"aP8wt7qr4n26ZL5Af0DlmpRdGxKujckNbWi1vIES"); NSLog(@"HRDnpJz1ABxQjiGT"); NSLog(@"d5Jl4I7urcv"); NSLog(@"MVGgI2oPmhb5T8qCuWdSj"); NSLog(@"AFk3u4b7aymKH6vZYDw"); NSLog(@"2unMd0acjK3PZB7Qt1CYbiWwkzg4eJs5"); } -(void)adYms5fCwn:(UIKeyCommand*) adYms5fCwn aVPyCG:(UICollectionView*) aVPyCG akKRYceX0q:(UIMenuItem*) akKRYceX0q a8wusBYW53:(UIVisualEffectView*) a8wusBYW53 aFr3lcOdsfA:(UIBarButtonItem*) aFr3lcOdsfA ajp5g:(UIFontWeight*) ajp5g aEJhB6n:(UISearchBar*) aEJhB6n ai7tKbpzM:(UITableView*) ai7tKbpzM aP0afYGy8:(UIControl*) aP0afYGy8 aZDxp:(UISwitch*) aZDxp aqiK1:(UIFontWeight*) aqiK1 a5uQMj:(UIViewController*) a5uQMj avwHNLbPqK:(UIBarButtonItem*) avwHNLbPqK aheCZxUqvl2:(UIDevice*) aheCZxUqvl2 { NSLog(@"aiYzfxoeVckwAumZRQdLv1"); NSLog(@"6VH0p8grIeuYM5AGUTE9"); NSLog(@"JQNegujFitWnMhdKvOmBAxqEl45Tb"); NSLog(@"4dmoaI9qvQ5e3uzWnOgpRG0tcrlTS1f2VBX"); NSLog(@"A6yadKEcoCFf43XI0tTs9gxMRJ2Su"); NSLog(@"G5v6yfKmj3rNtxsozb"); NSLog(@"stP85LWCvz7ab"); NSLog(@"Qrc5fmk2RZFqdBDls7L"); NSLog(@"z9lsQD8VKMIpckqhOFfew35moxHZnaY"); NSLog(@"LpFNVH42ZiAolDxkmR5u7MSPUfr9"); NSLog(@"hv1YOmbsuE"); NSLog(@"9wLCWsoMH2VrDidItANmROY1kxh"); NSLog(@"1LtTmsOg3V2D9W4vzfFJySXZp7rKR8EIoiY"); NSLog(@"oM04RdAH1r7clO2ynazuj53"); } -(void)aSzoaG9KFQ:(UIInputView*) aSzoaG9KFQ aabj8:(UIColor*) aabj8 auXOTtKY:(UIDevice*) auXOTtKY agz0Kwfqx:(UIScreen*) agz0Kwfqx a3wBhJ6XTI:(UIRegion*) a3wBhJ6XTI aQ8OaBh:(UIMotionEffect*) aQ8OaBh aXEUy:(UIButton*) aXEUy ar2jME0H:(UIVisualEffectView*) ar2jME0H aAiEcWNe:(UILabel*) aAiEcWNe aDj7wYVFM:(UIInputView*) aDj7wYVFM { NSLog(@"RvQdsiDGEomtbhrOFJxI7kn0zcKpwH"); NSLog(@"SWbLHldC16JpYXDIwA"); NSLog(@"kC18TzDSVWPOHrxydao0sM2N"); NSLog(@"401E6Ymc5DquPH9BhTfA2NnxSbg8MKsi7JtW3yQd"); NSLog(@"yivNIL05ah6V"); NSLog(@"C7ORU58wqhrQToNkE6"); NSLog(@"ilA7RwNZyFuoP9LeY8WJVxk0"); NSLog(@"41785ow0uyMs2JT3"); NSLog(@"7lvGFk4Xi8ymnPgVuJ1TZ96ULwb"); NSLog(@"1fF02AOiIyESke79lV6b"); NSLog(@"3V7Imt0jdovWAOs8wpGDB6S"); NSLog(@"flrW0OhHAzCY9ERv"); } -(void)apNxnXvkTh:(UITableView*) apNxnXvkTh aoDdft3GByc:(UIColor*) aoDdft3GByc aPdfmKkYTZ:(UIWindow*) aPdfmKkYTZ a0oiaVYpxL:(UICollectionView*) a0oiaVYpxL aFosrXm72:(UILabel*) aFosrXm72 adHPXQ:(UIActivity*) adHPXQ asWC0p9w:(UIActivity*) asWC0p9w aakO2o:(UILabel*) aakO2o aNO0b:(UIBezierPath*) aNO0b aU5NuWe1BHf:(UISearchBar*) aU5NuWe1BHf aEqjgJ5FPC:(UISwitch*) aEqjgJ5FPC { NSLog(@"BInvf7gPAsbwdeXmCFM"); NSLog(@"sGJf7eImZhBLDg"); NSLog(@"q6KVBoJ3NHhSEyQCmv2gMfxtlwbcYur9p5kF"); NSLog(@"xaz6me2ivu0T7DhIBCnbqWPX9pFwVfctMglAK"); NSLog(@"T9dAlXLFxQfab7vjZJB2mu4sIKNcqokYC8"); NSLog(@"5Kt2ma9Uq46Heo1sGMwRhkVCZprJvF"); NSLog(@"83l4xiIKghfkbEq9pW0tcJz2NVPAFCwyr5QR"); NSLog(@"DHCZx6y2RbukI8sJvhlOcqQz7YSLBKG9MnorX3"); NSLog(@"0LO9SrCaKJuDhoWA4"); NSLog(@"b4y0YLrz7GIoXPHfSZiFKtl9pMgqhCAsk"); NSLog(@"yBNYgWL7JifxrH9CD1sQPUGdqXEZK3RkTzAv2"); NSLog(@"LctvAW1xMTSpmub"); NSLog(@"jyhUgJvS3wGapuW1Lc"); NSLog(@"Sd4bTe2pvAaoYHG75VqxKUcWJz0hNfrw91IMQyDj"); NSLog(@"98cqUZoHxg6Yvrd2hWQXEz5jRISGtFbsml"); } @end