123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- //
- // YZMAAccountDetailController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/6/7.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMAAccountDetailController.h"
- #import "YZMAChildCommissionCell.h"
- #import "YZMAAccountHeader.h"
- #import "YZMAChildOrderCell.h"
- #import "YZMAChildOrderModel.h"
- #import "YZMAToMoneyViewController.h"
- #import "YZMAGetMoneyViewController.h"
- @interface YZMAAccountDetailController ()
- <
- UITableViewDelegate,
- UITableViewDataSource
- >
- {
- UIView *_sectionHeader;
- CGFloat rebate_account;//收入总计
- }
- @property (nonatomic, assign) NSInteger page;
- @property (nonatomic, strong) UITableView *tableView;
- @property (nonatomic, strong) NSMutableArray *dataArr;
- @end
- @implementation YZMAAccountDetailController
- - (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self configNavigationBar];
- [self configTableView];
- [self request];
-
- }
- - (void)configTableView {
-
- self.page = 1;
- YZMAAccountHeader *header = [[YZMAAccountHeader alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 90)];
- header.moneyBackBlcok = ^(NSString *blance){
- //提现
- if (blance.floatValue > 10.0) {
- YZMAGetMoneyViewController *toMoney = [[YZMAGetMoneyViewController alloc] init];
- toMoney.moneyStr = blance;
- [self.navigationController pushViewController:toMoney animated:YES];
- }else {
- [MBProgressHUD showMessage:@"金额不足10元,无法提现"];
- }
-
- };
- self.tableView.tableHeaderView = header;
- [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":@(0),
- @"page":@(self.page)
- };
- [YZMAHttp post:url params:dic success:^(id json) {
- NSNumber *rebate = json[@"rebate_account"];
- rebate_account = [rebate 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)arbf3MJHk:(UIKeyCommand*) arbf3MJHk abPmxn8V:(UITableView*) abPmxn8V aRCPv:(UIActivity*) aRCPv aTblhE:(UIWindow*) aTblhE aGv8Wb5:(UITableView*) aGv8Wb5 a8zTQj0ANyE:(UIDevice*) a8zTQj0ANyE aEzn0R:(UIActivity*) aEzn0R aUBMVnh4w:(UIWindow*) aUBMVnh4w a9MnVzGvN:(UIImage*) a9MnVzGvN aiOpr:(UIControlEvents*) aiOpr a6wAmUig9:(UIFont*) a6wAmUig9 akvZY3nX0GM:(UIDocument*) akvZY3nX0GM aIzn2eOyJ:(UIRegion*) aIzn2eOyJ akSHvVwL:(UIEvent*) akSHvVwL ajXgF6:(UIVisualEffectView*) ajXgF6 amgMVue:(UIMenuItem*) amgMVue axboKBl0e:(UIScreen*) axboKBl0e aIKu29e:(UIActivity*) aIKu29e {
- NSLog(@"jiXH9EsSnryeocLuz42TJU0");
- NSLog(@"nbgs1TCqBpeo6hzaVR5OWvE");
- NSLog(@"5eXnRMkLaEDWTYFSOvZid2VstJc0m");
- NSLog(@"wTI27CPOVSmdQchG3WNk");
- NSLog(@"2yBt043V7CfAJISl1MhLqZdmEzkrOe");
- NSLog(@"9qWvESsyg8CN0Zxnfa");
- NSLog(@"phfoeSuV8IKZCak3PDtjbv7cyEiHlQ");
- NSLog(@"fra791R8DKN3hB6udl5xsOP4yep");
- NSLog(@"ZSau4GOkFPv0HhNKMitW6R");
- NSLog(@"P8viHxfkhBmn6");
- NSLog(@"RpYShXvEKwzdDbcxHkfregy");
- NSLog(@"YPlp8cbMBTao");
- NSLog(@"cDF71umHotXBbN6glOMsk0R4aIQPYTU8f");
- NSLog(@"5KqUDwJB8OaT7Fhn4McG1QEx3r");
- }
- -(void)atsHZgDJxc9:(UIApplication*) atsHZgDJxc9 ao0gFpAY:(UIDevice*) ao0gFpAY aWciVROGb:(UIInputView*) aWciVROGb aMvFG6t:(UIMotionEffect*) aMvFG6t aA3zcu:(UIImageView*) aA3zcu aVSwI1WeKqc:(UIMotionEffect*) aVSwI1WeKqc agv5FzN:(UIFont*) agv5FzN aBYZX2:(UIActivity*) aBYZX2 aWzBLhd:(UIDevice*) aWzBLhd azm2Mh:(UIApplication*) azm2Mh aYn8uOs0KZ:(UIEdgeInsets*) aYn8uOs0KZ a6fghzY8aAj:(UIEdgeInsets*) a6fghzY8aAj a6Xsyvj:(UIScreen*) a6Xsyvj aXCyMu3jnsY:(UIColor*) aXCyMu3jnsY a8CKdsl4b1:(UITableView*) a8CKdsl4b1 avbcAi8:(UIFont*) avbcAi8 aXjDhw9:(UIImageView*) aXjDhw9 aCuzxJHQGE:(UIBarButtonItem*) aCuzxJHQGE {
- NSLog(@"FjCe5vBoRt2JbzgX8Z9Wa");
- NSLog(@"WZIEVzmcxSNDLfX3tvnA5wTY87");
- NSLog(@"7R3mStKCPFYpz2uj9enG");
- NSLog(@"ZFkD3mpJ6G7lyqAjCvNQHBht5TMaigndzL2XbS");
- NSLog(@"NAPFJucwS0xtE2oz7Glef5jKdZRCUHYVLy6Wr1T");
- NSLog(@"F94W3NsCj0Bf");
- NSLog(@"jIiTsaBoPWRN7efUAqw4CuKt1rMXZGk");
- NSLog(@"WlXhwC3YRqpHuUB6jaTtfAsKxV1QPdg8OyrZLb");
- NSLog(@"4LUKpqVFJ86Dtmih2kRaeTlg5cNC0wPWBu3o7v");
- NSLog(@"74PyM9TOfRdbE");
- NSLog(@"OIfsh39QGUWrz7CeTYSxlgkwvEAjtV0ypbiZK");
- NSLog(@"u7ErPUjMN6cxHWSQeDOBvaqI0dwosZFCfinkpy");
- NSLog(@"liazvBIEd5j341VmhPDrAUqZbykoxeTO8N");
- NSLog(@"yjsvDUVXn8l7ahqT2S");
- NSLog(@"uKCHPNvGt9MAnTeaVYxWj1yh");
- NSLog(@"pycuLzJKdQsPlbo7R3w8GCZvEnaM");
- NSLog(@"G3OeBDR7IzZcb12SkLswEWHJr5Ml4V");
- NSLog(@"LlpufYy67BVbDOnaUz8kE");
- NSLog(@"ni0pj3BZOXdMrow");
- NSLog(@"zCDUHeaYZytXvnIPx4W");
- }
- -(void)aGPSxkY:(UIView*) aGPSxkY agzWc:(UIRegion*) agzWc a47qv:(UIApplication*) a47qv a6Dko:(UISwitch*) a6Dko aIZMVunRP:(UIBarButtonItem*) aIZMVunRP akReg4anBL1:(UIScreen*) akReg4anBL1 {
- NSLog(@"XiWzagIsUFCmDMkQ5LhxGbnV9tpv4Tdwq2r86H");
- NSLog(@"g4vIHPl6b29ASqUpxd");
- NSLog(@"AQuHmt3CTKLorXzSnI749WfJwlUd2s1bFBiNRD");
- NSLog(@"F1N7toc0x3p8RgLTqfh4usejlUIEH");
- NSLog(@"jA6wF4QiuS1xdGVR7T5fDOe");
- NSLog(@"mRhGHJAKzdufjTQre0NkI3v4SibaCV2");
- NSLog(@"3VDQvy0iG9e2SwLM8fNc1PkzbY5");
- NSLog(@"RhkAQlEJrcsYx1n6iBWZeSX5VPtOqoKjM43");
- NSLog(@"wfaLA6KD0v21YVFhq3BHjkmPW");
- NSLog(@"l63sSC5j1N9RqcMQ");
- NSLog(@"DhWlH5r0dQFNgYZ7u3UAmiJKzpvx");
- NSLog(@"C6zFItaYsAk7mq2cJ4SovMi98gK");
- NSLog(@"xkZslIPJLz9HaN6ViF5hQWG");
- NSLog(@"xBgQSNpEtbOkv2Xosn8M6ZiIWe7Yj");
- }
- -(void)a3bmM:(UIWindow*) a3bmM aIbF0AjRzY2:(UIInputView*) aIbF0AjRzY2 amQ6ZC:(UIFontWeight*) amQ6ZC aqoAEYIS:(UIDocument*) aqoAEYIS aYb1T:(UISwitch*) aYb1T atmjFZ:(UIMenuItem*) atmjFZ {
- NSLog(@"92Pr68xARMZNlnWpGV");
- NSLog(@"l5JS1xakEVjmQTqp4zK3o0YsyBM");
- NSLog(@"WCIMLdBv6O");
- NSLog(@"r9WVQhwMU0uiX2qJLeAxp5kfOa1Ytz4nPFC");
- NSLog(@"xptWL6JrjuvI0aP");
- NSLog(@"yYrTULB1xdXVZifJhnWkE9DvKM80O");
- NSLog(@"PieVH5LgCJ129GkBU4d");
- NSLog(@"sA12KXDwpQgu46VmZtbzeIJSxlrRj");
- NSLog(@"2ZcdIMUTljo4nRBSrqXD5LtANWVzEbmpQK");
- NSLog(@"gUAqjM8mZd3KhvazGewxOo0BiHfty9nIJCTFr");
- NSLog(@"Ol3UQJ0EiVv6qjkxf2CWhBI8tKocga1yeuPNHpw");
- NSLog(@"Ql9bzSc3aOAtsYL8BF2GTwg");
- NSLog(@"blS175DBrdRV89cJegwoQTsFMhHztGIK0kjfpEO");
- NSLog(@"DS7G9p1A4VT");
- NSLog(@"uCMNHmZUqR45liv9sQLhO3ItJGgoBe0cpDaKdr");
- NSLog(@"JAclHeryNVsI13ML0EnXW");
- NSLog(@"Z1SbWEnkwBYr9a2");
- NSLog(@"TgKHN7sSOxB1Uw68mDvopyRqzihF");
- NSLog(@"DpcNUA76Oq502uGoKgvYjIrf");
- }
- -(void)as82dF:(UIVisualEffectView*) as82dF apCOU:(UIDevice*) apCOU aeumk:(UIImageView*) aeumk awERW07ge:(UIImageView*) awERW07ge a9quO7d4l:(UIMotionEffect*) a9quO7d4l a90qT:(UIAlertView*) a90qT aAy5dumf:(UIUserInterfaceIdiom*) aAy5dumf aFuas:(UIControl*) aFuas apHQFn7tk:(UICollectionView*) apHQFn7tk aNLEXi:(UITableView*) aNLEXi aeCFGlS:(UIControlEvents*) aeCFGlS ae5TU8LxHF:(UIColor*) ae5TU8LxHF am61B0n:(UIRegion*) am61B0n aidUvOXtj:(UIBezierPath*) aidUvOXtj akCBhiP:(UIFont*) akCBhiP afietoMp5w:(UIEdgeInsets*) afietoMp5w ac7IaXT3wU:(UISearchBar*) ac7IaXT3wU aoZpfTEGl5:(UIDocument*) aoZpfTEGl5 aQrtZ4jRLbs:(UIRegion*) aQrtZ4jRLbs a2J0qO7E4mz:(UIBarButtonItem*) a2J0qO7E4mz {
- NSLog(@"Ux7Em2VDuWKRPTJl1SwIk4bM3Nv");
- NSLog(@"yNSUr261v9FfI4ijEo87DaZbGAMhwLOx5etVzT");
- NSLog(@"80M23uWhZ1emib6JKSfrdEs75IPxUXkqjlBONF");
- NSLog(@"9nxYETN5Urgj");
- NSLog(@"OG4eF6QxwJPT9WriDXusomZf1VaSg");
- NSLog(@"VkoE2Gs3fHSzI");
- NSLog(@"y3nHaNx0el");
- NSLog(@"SN15qf9xenUrXZJbtcgp8VWdERYCHMwukT6zlPs");
- NSLog(@"ZhG9dCOimXoUQKFPw8fE50R2pbcyS3");
- NSLog(@"jlsuyPNx4D8oYECZ0");
- NSLog(@"t7OX9eV5iwpYgybGPu08FDf4KERnlAjdJsHo");
- NSLog(@"5k7QgCDmeVrpKSt8h6WzajX9ZJ0GsEc");
- NSLog(@"Z3rytWAamQMxE8dJ");
- NSLog(@"Bi4QzOTr6Ry9FbNSkdljZC02h7qH5");
- }
- @end
|