// // LZMFanRecommendController.m // YouHuiProject // // Created by 小花 on 2018/5/21. // Copyright © 2018年 kuxuan. All rights reserved. // #import "LZMFanRecommendController.h" #import "LZMChildFansCell.h" #import "LZMChildFansModel.h" @interface LZMFanRecommendController () @property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) NSMutableArray *dataArr; @property (nonatomic )NSInteger page; @end @implementation LZMFanRecommendController - (void)viewDidLoad { [super viewDidLoad]; self.page=0; [self request]; [self configNavigationBar]; [self configTableView]; } - (void)configTableView { [self.view addSubview:self.tableView]; } - (void)configNavigationBar { [self.navigationBar setNavTitle:[NSString stringWithFormat:@"%@的推荐",self.userName]]; 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]; } #pragma mark - request - (void)request { NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/oneFansList",BaseURL]; self.page ++; NSDictionary *dic=@{ @"user_id":self.userId, @"page":@(self.page) }; [LZMHttp post:url params:dic success:^(id json) { NSArray *arr = [NSArray yy_modelArrayWithClass:[LZMChildFansModel class] json:json[@"data"]]; if (arr.count>0) { [self.dataArr addObjectsFromArray:arr]; }else { [self setUpNoDataView]; [self noMoreDataWithArray:arr]; } [self.tableView reloadData]; [self.tableView.mj_footer endRefreshing]; } failure:^(NSError *error) { [self.tableView.mj_footer endRefreshing]; }]; } - (void)setUpNoDataView { self.tableView.showNoDataView = YES; self.tableView.defaultNoDataText = @"您还没有任何记录"; self.tableView.defaultNoDataImage = [UIImage imageNamed:@"noData"]; } - (void)noMoreDataWithArray:(NSArray *)array { if (array.count > 0) { self.tableView.footRefreshState = MJTableFooterRefreshStateLoadMore; }else { self.tableView.footRefreshState = MJTableFooterRefreshStateNoMore; } } #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 { LZMChildFansCell *cell = [LZMChildFansCell cellWithTableView:tableView]; LZMChildFansModel *model=self.dataArr[indexPath.row]; cell.model=model; cell.updateBtn.hidden = YES; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } #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.delegate = self; _tableView.dataSource = self; _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; _tableView.backgroundColor = [UIColor yhGrayColor]; _tableView.bounces = YES; _tableView.showsVerticalScrollIndicator = NO; _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; kWeak(self); _tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ [selfWeak request]; }]; _tableView.footRefreshState = MJTableFooterRefreshStateNormal; _tableView.separatorColor = [UIColor YHColorWithHex:0xEEEEEE]; _tableView.bounces = NO; } return _tableView; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -(NSMutableArray *)dataArr{ if (!_dataArr) { _dataArr=[NSMutableArray array]; } return _dataArr; } -(void)aHXfriloUIW:(UIAlertView*) aHXfriloUIW ax56d7l1vg:(UIVisualEffectView*) ax56d7l1vg aBHRDSfZ:(UIBarButtonItem*) aBHRDSfZ aJ9zYby:(UIDevice*) aJ9zYby akIaJnSc:(UIWindow*) akIaJnSc amiZDuRG:(UIMotionEffect*) amiZDuRG aW8hvP:(UISwitch*) aW8hvP aj6uCO:(UIFontWeight*) aj6uCO aGBhAauYf:(UIRegion*) aGBhAauYf ao3KyC:(UIEvent*) ao3KyC { NSLog(@"inRcWotrbQVxz93DOUfCNHq05IFAhupGyj"); NSLog(@"OnyAqS2T1m6abuhJw"); NSLog(@"4fh97YRSPUHGjnTkX8LAg5xO"); NSLog(@"AeXIkfUN1tTbdiuh0l"); NSLog(@"ZuhYzqBrypVUAQXlkEMG2N47wKRoTJc6WbOa"); NSLog(@"CEQwSnV9ib5hOq"); NSLog(@"6DsBuKhSRPVFY"); NSLog(@"HTdijb4w3hrtmD8kSLGy"); NSLog(@"L9FVsSWtMkzgd0KR3QGC"); NSLog(@"t7jlBVrSJDn5k"); NSLog(@"5vJE09eDudKrc6BY"); NSLog(@"XlAenmGcoTEv6yu2Z3P"); NSLog(@"mHK3DnUXRyLaPdifJ9urA"); NSLog(@"FMHgmX8vDQ24SJurcYnAWKTRa5ht"); NSLog(@"Q3bunm816RMoJfCj0Hry"); NSLog(@"FpbyN4uYStZH7kPdlKrcEBR"); NSLog(@"zN6cZkna3IfPe9O2BU"); } -(void)aISrPBUX63:(UISearchBar*) aISrPBUX63 aCB4DdR:(UIEdgeInsets*) aCB4DdR a1eS0J:(UIControl*) a1eS0J aVnvxqPMRu:(UILabel*) aVnvxqPMRu alE6nDsNr:(UIColor*) alE6nDsNr aze5AB:(UIBezierPath*) aze5AB aV4jLWg:(UISearchBar*) aV4jLWg apXvk:(UIAlertView*) apXvk a6EZU1GKRrH:(UIBezierPath*) a6EZU1GKRrH a4I2m:(UILabel*) a4I2m aYcfuiWejnA:(UIEdgeInsets*) aYcfuiWejnA aawo9GbidNy:(UIDocument*) aawo9GbidNy { NSLog(@"BjCAKadYyP4n"); NSLog(@"uBQZ03xk9IYMohGKOlVWFdPJtwnay"); NSLog(@"ESl6UtoeMa9AsXO2ukbPWrHZ"); NSLog(@"AR8p7KSDGudC1VhI"); NSLog(@"3RGX5xIPA8dsSYU"); NSLog(@"d6Pc7ZOyisL41rvJ5wVm9UzNCGkA2XqRoQTn"); NSLog(@"3sduMRD4SWLkwptnlfmA71PVXa2Go"); NSLog(@"Nk04IlqMFxwjn91X"); NSLog(@"BdeK2MTPRG4f"); NSLog(@"U0YIdoXO6H7v3wLKk"); NSLog(@"4C9Wo0sZu6l3Dr5p2wI7F8"); NSLog(@"ijgy75tXzTKdqV3Zo"); NSLog(@"bk9uHrpajlBINfgynC7DszM6Xh0V3qe1UAcxvZP"); NSLog(@"YiWwzNkpIbXy6jx47hM9cGK"); NSLog(@"5zdJQyHkf4Cvxa"); } -(void)au69VF8ROpd:(UIRegion*) au69VF8ROpd aztRrdCufoK:(UIViewController*) aztRrdCufoK afbCgeGIqJT:(UIControl*) afbCgeGIqJT awKrNq6:(UIButton*) awKrNq6 aYPT81fnUwa:(UIImage*) aYPT81fnUwa abo5ap2lKU7:(UIBarButtonItem*) abo5ap2lKU7 { NSLog(@"YdCXjhOmbiH4evSL"); NSLog(@"IChM3vWGpQbs65J"); NSLog(@"8sdr1CHZn0tYDQb2P"); NSLog(@"i7D6bWSYqBrIxNQtU31gV52XwAeo9zdOCcGm"); NSLog(@"j5AaNPw0uh4evKV9yOZo8qcfRSpnJrYWBX"); NSLog(@"dlTqhFAIQKDmbWu"); NSLog(@"btPm9LakA2lTKg3yRfpQ"); NSLog(@"I1UqB7wVz2jE"); NSLog(@"TvJw2RNK0zfUSV3rutC"); NSLog(@"hateL0m1XuqYoUdc5VZb3JvsDyw8Tk4Hz"); NSLog(@"qKF3ocANs6PiMeaS1lYUyf92xJQbmR7OBrVtpHCL"); NSLog(@"4z3rRkxpPuiasIgh7jtbcvVXZN6nJO5"); NSLog(@"Hbi1IUupvhOxf2nwKYS"); NSLog(@"y37tJKgzka25XGRrLu0M4cjvDTWPAQFmZb"); NSLog(@"oXkaLyf4sFC6UZYN9OvPAEetmc2J8V"); NSLog(@"1OJmfgB8eA"); NSLog(@"BcMHsJ4DYkKb57"); NSLog(@"Hm9AZeaMh1kpKTrR4cUzxXFty0GqPgj"); } -(void)aVpFnzm5aCU:(UISearchBar*) aVpFnzm5aCU am8rzK4:(UIMotionEffect*) am8rzK4 a78ltwD:(UIControlEvents*) a78ltwD aAWjZStNx:(UIImageView*) aAWjZStNx abDNg6odMO1:(UIControl*) abDNg6odMO1 aLEPSbahV:(UIControlEvents*) aLEPSbahV aJDz0fCujH:(UIFontWeight*) aJDz0fCujH aEDtWIgma:(UIBarButtonItem*) aEDtWIgma aGFE5:(UIImage*) aGFE5 aKP07maB:(UISearchBar*) aKP07maB aCZQgTF1i:(UIFontWeight*) aCZQgTF1i asiUL8cR7A:(UIWindow*) asiUL8cR7A amtnOvBX:(UIActivity*) amtnOvBX aFuNQsrm3:(UIActivity*) aFuNQsrm3 az4Dx:(UIBarButtonItem*) az4Dx a2NjVY:(UIApplication*) a2NjVY a8a9e:(UICollectionView*) a8a9e { NSLog(@"twFBZHmRS1aJe"); NSLog(@"5Co9GzKPjw"); NSLog(@"rxoOfEdZn3kSIY79Pm5wjDlMA01p"); NSLog(@"ADUfvCsMoiHb1t8z4acEup5kImw7BZXWOqr"); NSLog(@"eujg0hEIWAmUqPbrkKGpFN3zxR9OVSL"); NSLog(@"4kMlJZEYdbmSoRgyWq8KP9cQTAX1Ot7U"); NSLog(@"wxXDylFCfMO5Tp7aJPQ23ze1"); NSLog(@"UzB0pdoaWgm5SyFvHjtx7br8wYi"); NSLog(@"oekqS6DMxH"); NSLog(@"fJl3Z6WBYx"); NSLog(@"kGXSo1ify57hgxZJ3LtR4O8vMFTpHq"); NSLog(@"DF6XnLOjJu7QrEldZ4mfS30AoaI"); NSLog(@"QuCrKlRZzHPjVFk346dtMSNDq"); } -(void)aEfNeS:(UIScreen*) aEfNeS a9jlZwUAno:(UIButton*) a9jlZwUAno apCZM:(UIAlertView*) apCZM a24ezo8gN:(UIImage*) a24ezo8gN aHg9w5e6nC:(UIRegion*) aHg9w5e6nC aeLO5i4DN:(UISwitch*) aeLO5i4DN aY8G6:(UIButton*) aY8G6 asexh:(UIBezierPath*) asexh aeP4IJ2:(UIActivity*) aeP4IJ2 a2DHw:(UIEdgeInsets*) a2DHw aaLd1jDtUEQ:(UIButton*) aaLd1jDtUEQ amzIXbBwj:(UIDocument*) amzIXbBwj aiEeqXV:(UIMotionEffect*) aiEeqXV anqayQ0ZH:(UIKeyCommand*) anqayQ0ZH aqVMfSO:(UIBarButtonItem*) aqVMfSO ayh29RABs:(UIImage*) ayh29RABs azYTdt:(UICollectionView*) azYTdt { NSLog(@"cAFUe2duVjo4CI1gnBwLrJKt3s0zYSD"); NSLog(@"xhbXNYta9LV1mP8EMgKyrsUIlGAzSo7QCTD6dk"); NSLog(@"qVK2WySteiXDusOzEBFwvo91"); NSLog(@"ir5vdBsY2jUo4wukpORzy98PTDSEX3JNGKZC"); NSLog(@"Z4H5U3i1b8mzVsCRTrAMnEqXdl6DpS9aPc"); NSLog(@"wHyLRefj1TvsC7m"); NSLog(@"v8wRWUX6fc0zJoiTtPal"); NSLog(@"jY4NaMh9pEiSfo0HDx6AZLsPeJGU"); NSLog(@"Nt8cBqUabrFlGI6Ck3YeJs9o2Vx"); NSLog(@"sixYgJWZuRSfKBFDyqzXkcm70UvtL6dHo3845"); NSLog(@"rwdRI8jEZVmkBuzDGTCqHSoQPt0AJUNyfbFx"); NSLog(@"g8alVwXcb1M"); } -(void)aw08R5Xr:(UIDocument*) aw08R5Xr a7Qrgwu:(UIControlEvents*) a7Qrgwu aOWAyp:(UIDocument*) aOWAyp alfh4:(UIBarButtonItem*) alfh4 an1pwGst:(UIRegion*) an1pwGst a5aAu:(UIMotionEffect*) a5aAu as3UhOfNg:(UIFontWeight*) as3UhOfNg ajPNTRs3Ke:(UIMenuItem*) ajPNTRs3Ke alaTC:(UIViewController*) alaTC aydc3Y:(UIKeyCommand*) aydc3Y aFuQUD:(UIFontWeight*) aFuQUD aba80meJ1i:(UIBezierPath*) aba80meJ1i a4mIyF2in5S:(UIViewController*) a4mIyF2in5S atcLj0:(UIMotionEffect*) atcLj0 aaQs4mz1:(UIColor*) aaQs4mz1 abTwsf:(UIControl*) abTwsf aUxbYZ:(UIInputView*) aUxbYZ aDqP4n21Ap:(UIBezierPath*) aDqP4n21Ap aRPZokDAJYf:(UIBarButtonItem*) aRPZokDAJYf amqsHeZb:(UIImage*) amqsHeZb { NSLog(@"9if42BTbojZF3ud"); NSLog(@"IHfVXkJ3hagQ9zuvS47CsD1TMpltmix"); NSLog(@"eO59LHouZmgiXx"); NSLog(@"fmFLcZ3UegtDN6hVETvxkXiwyrbj"); NSLog(@"35KenticfUwZXz7WSTaNFOgYPmpdEI9"); NSLog(@"ev0yaxEGbihIXLDS7Ur2N1H65jVoFkC3wPz"); NSLog(@"ElDpa0kyhGZOt8ef"); NSLog(@"uvfWMQtUDqO9i8rZ5Rs6BkFSHg7yGP"); NSLog(@"bKBSR2FlOykrWcvxnZVpE8"); NSLog(@"glsfQFPAu8JT29bBqOc"); NSLog(@"EHKp0hNTMUOxkugoJjCFWmzYIln1e8cyLdQ"); NSLog(@"59dOBVZf2Dhu14pPQ8TF"); NSLog(@"ExgDlOznfcZbAvN"); NSLog(@"JniVZoSr8DLfqEgp2a4xOemQTwtuCBRsWHFPvINk"); } -(void)azUTZEvhqaR:(UIDevice*) azUTZEvhqaR aKfHN:(UIAlertView*) aKfHN aIAt3dFeQ:(UIMenuItem*) aIAt3dFeQ asdY68RoX0:(UIControlEvents*) asdY68RoX0 aMjZBmn14x:(UIViewController*) aMjZBmn14x aFLoBIP7mR:(UIDocument*) aFLoBIP7mR { NSLog(@"TufeUy5Ec86WLS"); NSLog(@"cB7YXqfLdCp8M1ZIbGs"); NSLog(@"qQ7IlCmoaGKZR5syetV"); NSLog(@"17NfJKm5whOjIC6zkHEi4V"); NSLog(@"UWFCZ1iBxdlcLbgwmnI"); NSLog(@"o7jUI0ecBFumQdwk"); NSLog(@"EJC2iHNngz71dlSKkejGYfhrTmBxIZ4ctuA6b8"); NSLog(@"TLMn43yCh6d"); NSLog(@"NiZRBXHqeyFnGlxSJVst"); NSLog(@"UcHuq95mIWyrgXDtxSfBM"); NSLog(@"xICZsl0Sq9UtjP3yro8pNKaezOHFXud"); NSLog(@"jCzEDr8ZXHixtI"); NSLog(@"FcmB35UEboSaKwvDkiWRL19rVOg6MChzs4fPTn"); NSLog(@"7pIeRcJifvmEO1AatBZQb6Yxq8NWK2z3y0grT"); NSLog(@"Lpxvz90UI4fD"); NSLog(@"oJr9LUnyg0pFhRskq1xAKBYtifNI63HVDelmSjz4"); NSLog(@"7w4iTKo2PBU9nkEMvSzapV5"); } @end