// // YZMAChildOrderController.m // YouHuiProject // // Created by 小花 on 2018/5/18. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMAChildOrderController.h" #import "YZMAChildOrderCell.h" #import "YZMAChildOrderModel.h" @interface YZMAChildOrderController () @property (nonatomic, strong) NSMutableArray *dataArr; @property (nonatomic) NSInteger page; @end @implementation YZMAChildOrderController - (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 67; } - (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 { YZMAChildOrderCell *cell = [YZMAChildOrderCell cellWithTableView:tableView]; YZMAChildOrderModel *model=self.dataArr [indexPath.row]; cell.model=model; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } #pragma mark ------ scrollView delegate ----- //- (void)scrollViewDidScroll:(UIScrollView *)scrollView { // // if (!self.childCanScroll) { // scrollView.contentOffset = CGPointZero; // } // if (scrollView.contentOffset.y <= 0) { // // self.childCanScroll = NO; // scrollView.contentOffset = CGPointZero; // [[NSNotificationCenter defaultCenter] postNotificationName:@"leaveTop" object:nil];//到顶通知父视图改变状态 // } //} // // #pragma mark - request - (void)request { NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/commissionList",BaseURL]; NSDictionary *dic=@{ @"type":@(self.type), @"page":@(self.page) }; [YZMAHttp post:url params:dic success:^(id json) { NSArray *arr = [NSArray yy_modelArrayWithClass:[YZMAChildOrderModel class] json:json[@"data"]]; if (arr.count>0) { [self.dataArr addObjectsFromArray:arr]; self.tableView.footRefreshState = MJTableFooterRefreshStateLoadMore; }else { self.tableView.footRefreshState = MJTableFooterRefreshStateNoMore; [self setUpNoDataView]; } [self.tableView reloadData]; } failure:^(NSError *error) { [self.tableView.mj_footer endRefreshing]; }]; } - (void)setUpNoDataView { self.tableView.showNoDataView = YES; self.tableView.noDataImageOffsetY = -70; 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.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.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.page ++; [self request]; }]; _tableView.footRefreshState = MJTableFooterRefreshStateNormal; _tableView.separatorColor = [UIColor YHColorWithHex:0xEEEEEE]; } return _tableView; } -(NSMutableArray *)dataArr{ if (!_dataArr) { _dataArr=[NSMutableArray array]; } return _dataArr; } -(void)aYETR:(UIEdgeInsets*) aYETR aZ3hcSQqBRv:(UIAlertView*) aZ3hcSQqBRv avYMPDT:(UIDocument*) avYMPDT aE7qOjxeYH:(UIFontWeight*) aE7qOjxeYH avipPZH:(UIMotionEffect*) avipPZH ac7k6Br0Kn:(UIDevice*) ac7k6Br0Kn aQqFOWPT48e:(UIRegion*) aQqFOWPT48e aAD4u:(UIControlEvents*) aAD4u aIEhglmQicZ:(UIApplication*) aIEhglmQicZ a7zdpe6YMB:(UILabel*) a7zdpe6YMB apBL0O46lP:(UIInputView*) apBL0O46lP { NSLog(@"Y3bA8OugtHWe1TDd59NnIwBFv0"); NSLog(@"H3J9GN2Q1fvKFoydaZ6OLj0PCb7wlXTU4Bzs"); NSLog(@"ADi3ZrQt5Wq"); NSLog(@"y2iR0BnJdpKZ9c3jEe4vbPFOfWogVD17TlMqzmGI"); NSLog(@"cqC8K06hR25ZVgrHtXNe"); NSLog(@"fadSHQvxIV5ulAj89sRJFOqDmoBywKXM6gCh4bWk"); NSLog(@"JmADMztceNCLfIRYsdWO4aEnwuhKil72grPxZ"); NSLog(@"SlMuCm0peEXbixBh61gaU8swNW9"); NSLog(@"mX6JkCc5sfQ8KEZxBeWGRdHqVor0aT"); NSLog(@"r4nZmzJOyVXljDGxvpTsN"); NSLog(@"BjzKYgGfVLv0WpAe6MEqt9JQC57"); NSLog(@"psqMBOWR1ja095vNZ3FDShTnlox"); NSLog(@"A6M12ozqa3lXu5jKLyUVIcFZWN"); NSLog(@"X9HTNoiAZdDuwt3QrFbxW2lzIsvSY0fMqJn"); NSLog(@"wQhafopLyJguj"); NSLog(@"xbkpjv04cQ1AhIi8GWOL5"); NSLog(@"bEUiADPq47"); NSLog(@"S5Eab19IrFdRYeim4H2pMkL"); NSLog(@"hslOvkCAEWgq7jKZHxptToc9VRQzn5"); NSLog(@"GXCbPWsVzNxkaBlouRZ80Y5InqOdM1DiT"); } -(void)azU6h7e0P:(UIRegion*) azU6h7e0P akx7GB2:(UIEdgeInsets*) akx7GB2 aAD1aon:(UIButton*) aAD1aon agudtOwc8:(UIKeyCommand*) agudtOwc8 ae73ph6XY:(UIControl*) ae73ph6XY aKfOnxLVeQ:(UIAlertView*) aKfOnxLVeQ aSYNWa:(UISwitch*) aSYNWa aYzSEVO:(UIButton*) aYzSEVO aSDjw:(UIButton*) aSDjw al4feEoCsp:(UICollectionView*) al4feEoCsp a8c57r:(UIView*) a8c57r ahICbRG:(UIVisualEffectView*) ahICbRG aTuIXak4G:(UIEvent*) aTuIXak4G aaKouL:(UITableView*) aaKouL aQHuyWoab38:(UIFont*) aQHuyWoab38 a8cN1PuJSp:(UIControl*) a8cN1PuJSp ax302EVGw:(UIKeyCommand*) ax302EVGw a6xn0:(UIActivity*) a6xn0 { NSLog(@"8vhd7X5OjHyGk1fm"); NSLog(@"ZcKUsy4uf6wET9nA7aGVzdb01vehQJrk"); NSLog(@"VQFkTWtgo9cDnBxbm5OEZzrpSMjJsGNaCI7eAXf0"); NSLog(@"MJEUPyzqIoHXgOwc1reT5flGSuNntQvKA6VmB"); NSLog(@"x1auvEFg9XYlfZT3mPw8jBh5yUAWctoV7Dze"); NSLog(@"UQstmrgBocdX4b59TnlNMv"); NSLog(@"0NLO1BmsWbxQquv4f8SA"); NSLog(@"p6Ka9NBFIDPxCVgUhSAnWdcyXlY"); NSLog(@"C7kpuMQ9XjHmT"); NSLog(@"1hqNYiE6y5H8DXU94oQnsIOM"); NSLog(@"1Mr56JqBWhG8PXHboCdU"); NSLog(@"TVgairpHCzYOMvAmq35xPFyBhIQW2j4lRE7uX"); NSLog(@"ifwO3IUeW5lGcTNVkQj"); NSLog(@"526ke0vpOxbTc"); NSLog(@"3NKWc80morXH"); NSLog(@"tMCfmi47ZQx3YROyBJcLI9vEeXdgDV"); } -(void)at7pREQdJn8:(UIApplication*) at7pREQdJn8 a4wKZ9oQT:(UIFontWeight*) a4wKZ9oQT aXKRkiDv:(UIKeyCommand*) aXKRkiDv atbJQYr:(UIDevice*) atbJQYr aWkrPKS:(UISwitch*) aWkrPKS aZHyf2:(UIFontWeight*) aZHyf2 aIoTp:(UITableView*) aIoTp aVvObkX:(UIAlertView*) aVvObkX ailva:(UIWindow*) ailva ambG8UL:(UIVisualEffectView*) ambG8UL aP4tUHe7o:(UIRegion*) aP4tUHe7o aV0QtJ:(UIDocument*) aV0QtJ avzLoc:(UICollectionView*) avzLoc ai1KkpEA:(UIVisualEffectView*) ai1KkpEA aA8C4Q975W1:(UIRegion*) aA8C4Q975W1 aPQAdLu2H:(UIRegion*) aPQAdLu2H aBkrGZi9P:(UIActivity*) aBkrGZi9P { NSLog(@"MZ2sB7mpIQn30fFetkHL"); NSLog(@"cLVDbW9YN8ZFMdmHaTluy1feXG7QIw"); NSLog(@"GDWpse4iAPltSIHb3j6dU8yEX"); NSLog(@"z7d50uGDFoJ"); NSLog(@"AL17ncNI6H4"); NSLog(@"bZWmjIutlgf58vE3BqoGRyK"); NSLog(@"dNRyiDl09p3zfY7WHO2MZxUaVE5c"); NSLog(@"NJu6bO3VyBzgtS2FXIMvc19CP0qRxhKZl"); NSLog(@"OVBFACnbLr3M"); NSLog(@"Tqx1cLGJIRorkPu9eMF"); NSLog(@"0wHZvC2Xq1PpO"); NSLog(@"mg2Gh5EBO8Lr1R3"); NSLog(@"WJLeT2IHK1sbqx"); NSLog(@"zUECFZXT56V9mGMDgRkSouKNHn3aOwiqY"); NSLog(@"9KwSoyWfdmh53pcsEGjgxVHqv4baQZOzMU"); NSLog(@"aCy473G2YzwceDQ5jpkEAorSKLNVhUuigtJ8P"); } -(void)amwD9xH:(UIApplication*) amwD9xH avocExaHL9S:(UILabel*) avocExaHL9S a9DOfqhz:(UITableView*) a9DOfqhz arLDpdYiabF:(UIWindow*) arLDpdYiabF atsDzJgR:(UIDevice*) atsDzJgR aSeQtqa5Bnv:(UIImage*) aSeQtqa5Bnv av7Thtq:(UIEdgeInsets*) av7Thtq adiPp1UA:(UISwitch*) adiPp1UA aeAgVtrkwmI:(UIImage*) aeAgVtrkwmI ad5TfnNkI:(UIBarButtonItem*) ad5TfnNkI aZCre1J:(UIDocument*) aZCre1J aztc8nDZ:(UIBezierPath*) aztc8nDZ at2CaY:(UIApplication*) at2CaY a01BaV:(UIView*) a01BaV { NSLog(@"oONcp6YsEV0bd"); NSLog(@"sSA701i3EpNFcBVRQvHez9frb"); NSLog(@"o2M46wtda9XOz1ARFCYTHIej0kiZPGBuvpn"); NSLog(@"xoTtqAikUCyZ71z5u8lX3RQ4cvhYmL9"); NSLog(@"fbATMjol4Nrdy"); NSLog(@"ifbqzDRwVC6NB"); NSLog(@"WOdemwYf5ZQVXy1gzHSCxR7kDAB"); NSLog(@"OBuWcD2ondT7X"); NSLog(@"jSQ9kryfzPZvR2C3wAspJl4YIn0iNMOmqKuEHx"); NSLog(@"HdFKYnLza1y6cw3ObpDso0teRWrVN2gE94x"); NSLog(@"xy2JozEhSXi3um1T7Pc"); NSLog(@"AQh7dmKfv3GNLuqcSTVnb2"); NSLog(@"GjeKOohwySYcZaLH3V12Tx9t"); NSLog(@"l9a8QGAedcBKIZ7z3Rofw"); NSLog(@"pEm1sdU4iD6t7Jl8RohVeGrAuK"); NSLog(@"wBIahi62ev3boJGH1uNzFScsxr9"); } -(void)apVOx25:(UIKeyCommand*) apVOx25 aja3HQ:(UIInputView*) aja3HQ akm8Zu:(UIEvent*) akm8Zu aPqrihIYU:(UIBezierPath*) aPqrihIYU a0B1zntDSr:(UITableView*) a0B1zntDSr ajMG9gZfaX:(UIEvent*) ajMG9gZfaX arRSZ1KqHTe:(UIRegion*) arRSZ1KqHTe aUavjb:(UIInputView*) aUavjb aQFxX:(UIMenuItem*) aQFxX aBeIN2ijv5K:(UIViewController*) aBeIN2ijv5K aE27z6:(UIImageView*) aE27z6 a3TdcSb9BnM:(UIFontWeight*) a3TdcSb9BnM akBNxJ5whmj:(UIDevice*) akBNxJ5whmj aXfElm5B1:(UIInputView*) aXfElm5B1 { NSLog(@"WtwAMzoSe7lVBvsxJcH9y2bOFhYDLU"); NSLog(@"9mc1ORGPWIxqMghnSTr74tw"); NSLog(@"8IGEwv1ptMq5FHy3hjUzcRiPKkYu9DagOlSsx"); NSLog(@"EaHhGsNZrRU1Xg08wlMoqkp7P6jATLJbzOBcy"); NSLog(@"r6Bz8fpswAP5IRntuYS0Kd1LOko"); NSLog(@"Tf0QyLz52KbFarvdpAWonmtHBkOC"); NSLog(@"sS0EW1iufXF6gTvVmIn"); NSLog(@"DYC71mLlwqJ2ANfOiogWzs0"); NSLog(@"cHoRAptsI1"); NSLog(@"5AwfgvxUo1tjlnh8Zq4WOBmJDIcCTzaRSi"); NSLog(@"qAwMv0GuVrypEfhCSxmWkU46P3Q1iDJ"); NSLog(@"rcl7sS4EXTM1LghniJ"); NSLog(@"97Xi3cC0FoTRJlhBP5zNqQUfn6IGYvpHVgKkL"); NSLog(@"XBDGzi10S4wrI658qQuf"); NSLog(@"rzu54Ryqh6jw1MekVf29GDKTo0BcU"); } -(void)aX4NhUGwRb:(UIViewController*) aX4NhUGwRb a985PiGYK:(UIInputView*) a985PiGYK abSWgP:(UIDevice*) abSWgP aE7hSq5dw:(UIVisualEffectView*) aE7hSq5dw ah5t7NmPW:(UIMenuItem*) ah5t7NmPW adMvWQ:(UIEdgeInsets*) adMvWQ arBeH:(UIKeyCommand*) arBeH { NSLog(@"a4VcEn9MkpdyrIQX3OGlti67NLb5CRZhgDjFKYu"); NSLog(@"VrE6uhqjp04tbk5sYAivxZPcJKUnXWMf"); NSLog(@"tTuFreL93k285B1NqgI"); NSLog(@"Vi9oJSOlKdue"); NSLog(@"j6UBum4eWvd8yFDHZt1nzcTM5V9s"); NSLog(@"5YScyXdOJgCP8IhmQeNG46iWls7wkT1UHbjL"); NSLog(@"4Pf8rJDvFQmMaLhBW5Z7zCd6RGc"); NSLog(@"LcyTAN4VjPdKhr32lDxw"); NSLog(@"EIyL94NUkSxA85D0COcpXslM3"); NSLog(@"zCQVyU9RIfhWDXc3sgKGbEokOt4HSBP6vZ8"); NSLog(@"g9EJH4j3uILwYklhr7CeRdAysP6ox8ct"); NSLog(@"ljRSgucrC9wTbfvkXBeMt8xz53nWEI6"); NSLog(@"nCpAsdIlyEWkB0a9q5"); NSLog(@"HDsoTd1jUS9mMF8uqIK27b"); NSLog(@"lObgvsqMjL3WnNJ8GQ"); NSLog(@"5NimwgTBWPQcU3sqfY6JX10MSdv47HueIa"); NSLog(@"Xq4P3u1ZBIyaJsSmeEvtYLprgcFnCiDK"); NSLog(@"HyKqNVxBODtm1gAGkZsST58bwCo"); NSLog(@"RqC4nOdYmhjxX6NoBKlMft1HVLJFW3"); NSLog(@"DMGXjo4A5bc7YHixrI"); } -(void)aUbyhtF4uT:(UIBarButtonItem*) aUbyhtF4uT aB8lx:(UIInputView*) aB8lx a9nJjxXd:(UIKeyCommand*) a9nJjxXd aYvHMkwJ1Q:(UIFontWeight*) aYvHMkwJ1Q aCIVGjXS:(UIDevice*) aCIVGjXS aY5c9DIKh4k:(UIVisualEffectView*) aY5c9DIKh4k aPd4GfXc6L:(UIBezierPath*) aPd4GfXc6L abWrQh2S:(UIInputView*) abWrQh2S aE1Coef2:(UIEdgeInsets*) aE1Coef2 aPyju:(UIDevice*) aPyju a4KvDLd:(UIBarButtonItem*) a4KvDLd abYBm8uZ:(UICollectionView*) abYBm8uZ aeTj5h:(UIColor*) aeTj5h aUsS4Ma5v9x:(UIApplication*) aUsS4Ma5v9x aEeOtyU34HL:(UIApplication*) aEeOtyU34HL aWwBsyVe:(UIColor*) aWwBsyVe aY2r5H:(UIEvent*) aY2r5H ajYg4:(UIWindow*) ajYg4 agAM4by52P:(UIMotionEffect*) agAM4by52P aOlwZt:(UIEvent*) aOlwZt { NSLog(@"SXxaTbQyldVFJo2PkMNUj5"); NSLog(@"Oy9d3TsMe8Y"); NSLog(@"ykjcQCTiVsU9PwhYfa1Rqe8gD"); NSLog(@"qpPMmEIaYXb9Qi"); NSLog(@"vZsa5RElxPnbjLYO9WeMKt021qXpyiwfAFg6Ud"); NSLog(@"fnJRTsS75gPwN43bVF62G1U"); NSLog(@"7lLMCSseB9zuw8Tpitma3DkRrqcP6Vd1fY"); NSLog(@"nuj3evGcy64U2dOTVF"); NSLog(@"H2ANPaZvO03"); NSLog(@"oWuXFQOjZY1SKPV9aGc8TJfsHN"); NSLog(@"tR8PGHJ4gs0U5bcVj2YuB9TIiKp3XNzDf7v"); NSLog(@"2g0Z7EFOhsxwuPRH"); NSLog(@"D5BrY0Ok8j"); NSLog(@"rVsunJCDfNbGSHA"); NSLog(@"QP50wpUrcY2MAbmO4tqJfDTH67a3zeZK"); NSLog(@"fKTrNia8c3I0su"); NSLog(@"bDuzQopGq51rRihJPYcnjONWwmVe69"); } @end