// // YZMAToMoneyViewController.m // YouHuiProject // // Created by 小花 on 2018/6/11. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMAToMoneyViewController.h" #import "YZMAChildCommissionCell.h" #import "YZMAAccountHeader.h" #import "YZMAChildOrderCell.h" #import "YZMAChildOrderModel.h" @interface YZMAToMoneyViewController () < UITableViewDelegate, UITableViewDataSource > { UIView *_sectionHeader; CGFloat rebate_account;//累计成功提现 } @property (nonatomic, assign) NSInteger page; @property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) NSMutableArray *dataArr; @end @implementation YZMAToMoneyViewController - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; } - (void)viewDidLoad { [super viewDidLoad]; [self configNavigationBar]; [self configTableView]; [self request]; } - (void)configTableView { [self.view addSubview:self.tableView]; } - (void)configNavigationBar { [self.navigationBar setNavTitle:@"提现记录"]; self.navigationBar.backgroundColor = [UIColor changeColor]; self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor]; UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal]; [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; [self.navigationBar setCustomLeftButtons:@[leftBtn]]; } - (void)backAction { [self.navigationController popViewControllerAnimated:YES]; } - (void)request { NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/commissionList",BaseURL]; NSDictionary *dic=@{ @"type":@(2), @"page":@(self.page) }; [YZMAHttp post:url params:dic success:^(id json) { rebate_account = [json[@"rebate_account"] floatValue]; NSArray *arr = [NSArray yy_modelArrayWithClass:[YZMAChildOrderModel class] json:json[@"data"]]; if (arr.count>0) { [self.dataArr addObjectsFromArray:arr]; self.tableView.footRefreshState = MJTableFooterRefreshStateLoadMore; self.tableView.bounces = YES; [self.tableView reloadData]; }else { [self setUpNoDataView]; [self noMoreDataWithArray:arr]; // self.tableView.footRefreshState = MJTableFooterRefreshStateNoMore; if (self.page==1) { [self.tableView reloadData]; } self.tableView.bounces = NO; } [self.tableView.mj_footer endRefreshing]; } failure:^(NSError *error) { [self.tableView.mj_footer endRefreshing]; }]; } - (void)noMoreDataWithArray:(NSArray *)array { if (array==nil || array.count <= 0) { MJRefreshBackNormalFooter *foot = (MJRefreshBackNormalFooter *)self.tableView.mj_footer; [foot setTitle:@"到底啦" forState:MJRefreshStateIdle]; } } - (void)setUpNoDataView { self.tableView.showNoDataView = YES; self.tableView.defaultNoDataText = @"您还没有任何记录"; self.tableView.defaultNoDataImage = [UIImage imageNamed:@"noData"]; } #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 67; } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 37; } - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { return 0.1; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { YZMAChildOrderCell *cell = [YZMAChildOrderCell cellWithTableView:tableView]; YZMAChildOrderModel *model = self.dataArr[indexPath.row]; cell.model=model; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { _sectionHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 37)]; _sectionHeader.backgroundColor = [UIColor YHColorWithHex:0xF4F4F4]; UILabel *priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(25, 0, 200, 37)]; priceLabel.textColor = [UIColor YHColorWithHex:0x141414]; priceLabel.font = [UIFont systemFontOfSize:14]; priceLabel.text = [NSString stringWithFormat:@"累计成功提现:¥%.2f",rebate_account]; [_sectionHeader addSubview:priceLabel]; return _sectionHeader; } #pragma mark ------- layzer ------ - (UITableView *)tableView { if (!_tableView) { _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight) style:UITableViewStylePlain]; _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]; }]; _tableView.footRefreshState = MJTableFooterRefreshStateNormal; } return _tableView; } - (NSMutableArray *)dataArr { if (!_dataArr) { _dataArr = [NSMutableArray array]; } return _dataArr; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ -(void)ap8xsKiRrPg:(UIImage*) ap8xsKiRrPg a6r5ne:(UIImage*) a6r5ne a61KwSvmAI:(UIInputView*) a61KwSvmAI aPmUQ:(UIView*) aPmUQ aPIO6:(UIVisualEffectView*) aPIO6 aw8Mmjas:(UIAlertView*) aw8Mmjas asD3zEgb:(UIInputView*) asD3zEgb a7s8JKDGA:(UIControl*) a7s8JKDGA adjsvq:(UIActivity*) adjsvq asu5SIQ:(UIRegion*) asu5SIQ anmdCUGjo:(UIButton*) anmdCUGjo a8uAkMLlK:(UIColor*) a8uAkMLlK aqIYF3zE:(UIVisualEffectView*) aqIYF3zE aqXfnUiT:(UIButton*) aqXfnUiT aenCW:(UIActivity*) aenCW aQTsWzSO7mw:(UIDocument*) aQTsWzSO7mw a2UHw:(UIKeyCommand*) a2UHw aGSL5Ykpwu:(UIApplication*) aGSL5Ykpwu ahYWT:(UIAlertView*) ahYWT aQoJTAV:(UIColor*) aQoJTAV { NSLog(@"kQs6Sr4DuTJz8GmEovb70UWdpyitYZK"); NSLog(@"L3fB54rU7PFhvxdMwci2KkpoH9GS"); NSLog(@"7mzWJ2KHb1GrFncMIY4Phx380VqZgdAO9EC"); NSLog(@"TMRiKIH60G27EQVz5d4PaJpZrgmkwNqo3yU1"); NSLog(@"pIxOecCq4vfa1DFK2oZGy6PYs53n0rlg"); NSLog(@"96EHV3vLDapW2YkMlGbwiP0ZAdn48"); NSLog(@"Z5kxba3JpzSN274ELfnrUBcwtFuPIDyA"); NSLog(@"Brf3vcs8znHG4mDJSUegAwLQFxNW0jTod"); NSLog(@"u2aDOCnxjZWsrPRS5F4LQv6M0fJU"); NSLog(@"ZDzFnE5U326kjK0IYwC4JPGWOigdaltNM9Areq"); NSLog(@"NrnTSsmBoMtFy8pHXKxCbRzkE2"); NSLog(@"zCoO9jHA2ugMdVaQ"); NSLog(@"fgkCzuBtHLUZoVSRT3alh7v4XKJM6m"); NSLog(@"4wVoUB68NYQJHCp2fq"); NSLog(@"VO3CHoy29DkqS"); NSLog(@"UbyxvHqsSt5gj7Pz8KLZBo63imW9RehJQuYp"); } -(void)aG4XlO:(UIAlertView*) aG4XlO a21AEv:(UIEvent*) a21AEv adbqiFf:(UISwitch*) adbqiFf aQZ3W:(UIControl*) aQZ3W a1Uj2G0:(UIDevice*) a1Uj2G0 aRbGpSlMI:(UIAlertView*) aRbGpSlMI aQtfmbAJjr:(UIInputView*) aQtfmbAJjr aJ826rd4gLY:(UIRegion*) aJ826rd4gLY aJ6AV:(UIScreen*) aJ6AV afEOxv38jLG:(UIBezierPath*) afEOxv38jLG atcZCTAsdQ:(UIImage*) atcZCTAsdQ asl1wUr:(UIBezierPath*) asl1wUr { NSLog(@"xqYvZb7u5R"); NSLog(@"TZIjeiDntlyb9NVsFS"); NSLog(@"IK0PUDpk2ZTX6Raxr7zF"); NSLog(@"yeOKrhTQEVZk2pjzwoN9L6ga38AXW1lRvBY"); NSLog(@"etjpw31DnQHhVToSI9UANmqX4WOaFz75Zg2Ldxb"); NSLog(@"rBSDWjJKtc"); NSLog(@"fjDr4vMeRhSHOaL6WKo"); NSLog(@"yCDMdQXesRlJ"); NSLog(@"vSLAsofbYC7PBtKOdra9Ewqh3e5uIRWkXD6ZyiUJ"); NSLog(@"0XEeoMObRcFi8gpQnsvCx"); NSLog(@"lQqVgsh8SmX4v2IWzFMYNJ6HiDe5LGc7Cojy"); NSLog(@"ZfaDPzRQLTvBgV2FkX73nhE9wApOMorxsYj1GSy6"); NSLog(@"NRcYZQtdWf5"); NSLog(@"wBqTFHD2O1Eu6sYXKA"); NSLog(@"XaJ0vuDCycdTWIrx8KfNeF7MzBnPo6YQ3hjGLkb"); NSLog(@"Oj7fIBJzvQHmCUs4n3d"); } -(void)a3E4eTV8Rz:(UIAlertView*) a3E4eTV8Rz ak9FDIlV:(UIRegion*) ak9FDIlV aiZM4r:(UIApplication*) aiZM4r amP2YKns6f:(UIMotionEffect*) amP2YKns6f a8nND52:(UIDocument*) a8nND52 akpnvmRBe:(UISwitch*) akpnvmRBe aXMh9UQsO1:(UIMotionEffect*) aXMh9UQsO1 aG2Aw:(UIScreen*) aG2Aw aFI6K:(UIViewController*) aFI6K aP5FzV4ZM8l:(UIEvent*) aP5FzV4ZM8l asYkMBdKy:(UIView*) asYkMBdKy aNVWc:(UITableView*) aNVWc aZKAPk9YBTd:(UIDocument*) aZKAPk9YBTd as6bwm4:(UIApplication*) as6bwm4 aVacd3y0Wi:(UITableView*) aVacd3y0Wi a12FgD83f:(UIFont*) a12FgD83f a1H2Jlc:(UIUserInterfaceIdiom*) a1H2Jlc { NSLog(@"JCnlKkXy40xvdOm"); NSLog(@"8ShDe3Q216Nd"); NSLog(@"WXJixIvlK2hQSwUqsNYzdt"); NSLog(@"efo9FuInS2lbiGdg51QEsM84NzK"); NSLog(@"rZHadSWT7YfzgN0pKPV"); NSLog(@"euTUX5nvHBd98tAVPbx2wpLJ0DFN"); NSLog(@"DlBzxo4EjMbFwIVrZXtLf"); NSLog(@"AqMC1ydVKLoGjz5fmYknrbSi26"); NSLog(@"YJKurVj1aUZfmL4eo0ISRMD8"); NSLog(@"OR5qBxJy0u3L1pmtQvhW6T"); NSLog(@"c9fAGCZpahjI"); NSLog(@"hoxqjmNIDKMvaP0nFR8dCSL6yAZ9tkOgw53Yf"); NSLog(@"LI9mPwYZ2EGH7vxDtOh1p"); NSLog(@"Tn7FiI8umsKSZD42Mh05xoALCkclaHPgRvprEGq"); NSLog(@"t6Owdna4Yb"); NSLog(@"Gzbua250x7o4M3"); NSLog(@"Hc9NZ3mKsuyr"); NSLog(@"LnHVl3WboSktNj8iO4zYgKUfRT"); NSLog(@"Qj28YaWX1BOdJnwTL3htqKsrm6bIFpRyukUf0D"); NSLog(@"lRkZ623K9Dmy478u1TdsYcGnzPw"); } -(void)aW5yKe9d:(UIKeyCommand*) aW5yKe9d auWIbLBHa:(UIActivity*) auWIbLBHa akULpBOKe:(UIColor*) akULpBOKe aR8gLzcIri:(UIFontWeight*) aR8gLzcIri aZqyGHUzjJ:(UIInputView*) aZqyGHUzjJ a8pTu4:(UIBarButtonItem*) a8pTu4 axHrSQi:(UIControl*) axHrSQi axEln72tDR:(UIEdgeInsets*) axEln72tDR aBuGD:(UIMotionEffect*) aBuGD aS1qNkh042:(UIImage*) aS1qNkh042 aet0W:(UIColor*) aet0W ahJcIWULHb:(UISwitch*) ahJcIWULHb ab0lT7s3:(UILabel*) ab0lT7s3 aeWGEiwRh4:(UIEdgeInsets*) aeWGEiwRh4 aCeGVp63:(UIBarButtonItem*) aCeGVp63 atnTo:(UITableView*) atnTo a8ut5j:(UIImageView*) a8ut5j a1w4ED65y:(UIView*) a1w4ED65y a7QtA9cT:(UIWindow*) a7QtA9cT { NSLog(@"GJRegcFshKO3M0ZS7pfoldmuPBnqa8UW5DwTrx"); NSLog(@"2fYyOcmwndeCFh5al4DBLv1HtRu"); NSLog(@"mRexsbEhryBZMgO6GiTq4AtoaNzkKvJWf3jY7dH"); NSLog(@"qrbexHYP7EONwj0gnz6TtmLFQf"); NSLog(@"iNSeTnwq6dHLF3xl8gIfm9uyPp"); NSLog(@"h7jAvxZwbfN51GICKStBz"); NSLog(@"QKM4nimxfZJVW2z30gaC6HUL91N8qRGPyrDu5pSh"); NSLog(@"rOKIQwf8FbD"); NSLog(@"5PfMAuj6BqhZNciRato370eyO8"); NSLog(@"RJYjztN0Cxlpk9aqyuWAEwcZdg"); NSLog(@"OEpmHwSJYxt7guMGq5Bb"); NSLog(@"9BrsUk7SuVnJQm5jzT1RLoOE3hdX8"); NSLog(@"uLSU4AYT6aDH9w"); NSLog(@"N7qKenpUXvzc6FrwBl1ax2YuJfEHTZVg3QLiSk"); NSLog(@"MDJHOEVTwl1Zupy7rfQLkxmvFSjiUcea5bWtz6"); NSLog(@"SZXvD2OTdgIKw97na6xrVPkMHpY4RWGeU"); NSLog(@"3QbMiO5gyqVCTxAX8dwLna4"); NSLog(@"TNZIXbuxlcasB5GEL4mQ0KogfwM7k6"); NSLog(@"aMdrysHhPCF"); NSLog(@"FWkK0oEu6ivL"); } -(void)aPuVgQwHr6a:(UIUserInterfaceIdiom*) aPuVgQwHr6a aRqiu:(UIScreen*) aRqiu aTJK7yzW5:(UIRegion*) aTJK7yzW5 aik4TfALEq9:(UIScreen*) aik4TfALEq9 aIVPqyu:(UIApplication*) aIVPqyu aeQZt9k:(UIButton*) aeQZt9k { NSLog(@"lsqFk3iCoDJj"); NSLog(@"cnuHRjvO8LmSalpoqrbFWyK3VeE"); NSLog(@"ae4PLDqABR9w1X"); NSLog(@"vgTncZhJQWd9uXeb7NUpmKt54lMHDVr8j1AoOx"); NSLog(@"Ev4disfLGDlhamz9S3N0OukIWXMrtB8yP"); NSLog(@"Ucei6q729phEr4WDMtjCgnHx1vKZ"); NSLog(@"9xbElMYrchyOHWV4GoU5wN62PdLjTFnI"); NSLog(@"35p9M1eFchWjT8LJOEuGQUisyvgx"); NSLog(@"glveRJdoXafi0BtG6TuK59HwSybQqM7YpW"); NSLog(@"udM2wHhaAOfcQBm8s6EeI1kqoFLng9b3XrzKjvVC"); NSLog(@"SE2DuMrICfJvxF9RqcN8l6HYytQZsG4"); NSLog(@"WTDhIipsN4xyvbeQZU6V3mXCtGMRl8oJ"); NSLog(@"g73eAG0YRtPSbcmjQ29qTMuLUIxkBwOf4nH1Fs6"); } -(void)aNqhCIBmjVr:(UIUserInterfaceIdiom*) aNqhCIBmjVr aqOW3:(UIInputView*) aqOW3 aFY370OK:(UIImageView*) aFY370OK aRjXnbAKF8:(UIVisualEffectView*) aRjXnbAKF8 aqHifJn1k:(UIControl*) aqHifJn1k aMSkCThO8Db:(UIControlEvents*) aMSkCThO8Db arJg3Dei:(UIView*) arJg3Dei a8H1fA4xqpm:(UIUserInterfaceIdiom*) a8H1fA4xqpm ataEniABJ:(UIApplication*) ataEniABJ aScO9vf:(UIEdgeInsets*) aScO9vf a8oeDA7J:(UIUserInterfaceIdiom*) a8oeDA7J aHUfuszqPT:(UIControl*) aHUfuszqPT azO7t95ADSv:(UIVisualEffectView*) azO7t95ADSv aC1Z4:(UIEdgeInsets*) aC1Z4 aGUMDfJZ:(UIViewController*) aGUMDfJZ aBUcLu7s:(UILabel*) aBUcLu7s aXEuH:(UIRegion*) aXEuH aIHRsG5:(UIWindow*) aIHRsG5 aG601LEz:(UIBezierPath*) aG601LEz akLI10:(UIControlEvents*) akLI10 { NSLog(@"wmGf8ytjU4IE2LB63eTza1g0AMlnW7hD"); NSLog(@"cKrmyg1dYs92D"); NSLog(@"ZmztXGpfCHF8sBl1Y0bVR9o26UqiPMgAwa4uy"); NSLog(@"xNWOSpATd2LV"); NSLog(@"GuCpaOf2DkzKL39oU70qV4yg5PlW1i6ReJScn"); NSLog(@"Z2Ad7w5qKj4ieSWVItbROpT0M6E9fXvBglYJr"); NSLog(@"myWqV8Ug1ehcl06paw9SEJIkoOt3"); NSLog(@"XEIlGspF3gMxqw6"); NSLog(@"7JksV6peZPd012AB5hOEmvuDRKTQ"); NSLog(@"ZJK6dqGkQyug5Ns8cIxWCO2"); NSLog(@"MU1BTlmp8SHXv0Y"); NSLog(@"cBM5V062QCtLUliG3a9xKJTzPkEb"); NSLog(@"npuG3fbIqdAxJkH"); NSLog(@"H95kyg3IcarQfpoGJS46nRATO"); NSLog(@"BpVP5xMCj2sROc7e3L"); NSLog(@"ZrwvsdRBngNiKWE54bxpLl1HhqUSOXMFuzJVa"); NSLog(@"HpxlZBcsEINftGCrPud2UiQq4YJODanz5S"); NSLog(@"6vjKleIOMQFA279HExdkuXgLTBbhUtpG"); NSLog(@"liXHTveEPIZ8O2uWswS9kKN4LcqMYzd51bh70Um"); NSLog(@"VMD4pIeNjK"); } @end