123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- //
- // YZMAPotentialFansViewController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/7/12.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMAPotentialFansViewController.h"
- #import "YZMAChildFansModel.h"
- #import "YZMAPotentialFansCell.h"
- @interface YZMAPotentialFansViewController ()<UITableViewDelegate, UITableViewDataSource>
- @property (nonatomic, strong) UITableView *tableView;
- @property (nonatomic, strong) NSMutableArray *dataArr;
- @property (nonatomic )NSInteger page;
- @end
- @implementation YZMAPotentialFansViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self request];
- [self configTableView];
- }
- - (void)configTableView {
- self.page = 1;
- [self.view addSubview:self.tableView];
- }
- - (void)backAction {
- [self.navigationController popViewControllerAnimated:YES];
- }
- #pragma mark - request
- - (void)request {
- NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/fansList",BaseURL];
- NSDictionary *dic=@{
- @"type":@(3),
- @"page":@(self.page),
- @"member_type":@"0"
- };
- [YZMAHttp post:url params:dic success:^(id json) {
-
- NSArray *arr = [NSArray yy_modelArrayWithClass:[YZMAPotentialModel 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 -------- 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 {
-
- YZMAPotentialModel *model = self.dataArr[indexPath.row];
- YZMAPotentialFansCell *cell = [YZMAPotentialFansCell cellWithTableView:tableView];
- cell.model = model;
- return cell;
- }
- #pragma mark ------- layzer ------
- - (UITableView *)tableView {
- if (!_tableView) {
- _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight-40) 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 = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
- self.page++;
- [selfWeak request];
- }];
- _tableView.separatorColor = [UIColor YHColorWithHex:0xEEEEEE];
-
- }
- return _tableView;
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- -(NSMutableArray *)dataArr{
- if (!_dataArr) {
- _dataArr=[NSMutableArray array];
- }
- return _dataArr;
- }
- -(void)apT1nK7A0ao:(UIViewController*) apT1nK7A0ao axRgL5TXwK6:(UIControl*) axRgL5TXwK6 afTl23MYQ:(UIAlertView*) afTl23MYQ alsfP:(UIVisualEffectView*) alsfP axJnNov:(UIImageView*) axJnNov a4tsijyf8:(UIControlEvents*) a4tsijyf8 akr54CPfZY8:(UIButton*) akr54CPfZY8 aPF16LaR:(UIFont*) aPF16LaR aKtqATmgvxO:(UIBarButtonItem*) aKtqATmgvxO {
- NSLog(@"yBQsXz385STw4RaDuI06Gh9lCqEndgW");
- NSLog(@"wdUtnZcAVrDI7OR");
- NSLog(@"etrzTmjCxBPpG6ZFWUEQAy1kDNKSR9c7hHJ");
- NSLog(@"YSwgKiv905Bj4lqrP1W");
- NSLog(@"0obPdOeJKzMk7q");
- NSLog(@"IoVnrPj7BXAtGq38iQaCvJ4");
- NSLog(@"vipfYW7ULCz39");
- NSLog(@"JAHL7UCfrmV9SlbokFyTeXQ2z81x0DIN3pRivWg");
- NSLog(@"Cqr9HiF5cA8UjO");
- NSLog(@"h0dPCRoQfUOlDHSEG49x1N6XVkAJMwvYT87By");
- NSLog(@"5N2huTkgI06jVezUO3PMnmtv1f");
- NSLog(@"2L0QP7XEcMHRhDFi5xWzdf3Z14b");
- NSLog(@"Bwbf5dTzIGXe1njHsyghiaLOUECFJAZ");
- NSLog(@"R9btEGBzciQLfMAp8oljSICJ");
- NSLog(@"fsv61abYzpUlyACkD3d9WmO7ZSI");
- NSLog(@"QzTgLVF4oRr3l0pGIH1mWJO2xPayXqjUk6Ksc");
- NSLog(@"ubcKfWg2kXLEB15TsxC9ineUZpSy");
- NSLog(@"h9mb1qYezr7jVW");
- NSLog(@"OnjXzTkuAyCpZ475qW6VH23feY9hviIDKwBsrQ");
- NSLog(@"KUAQ5vLth9XVPSqrH6FWbC8wD3Y");
- }
- -(void)aDfsR:(UISwitch*) aDfsR aOg2uUIMSDC:(UIBezierPath*) aOg2uUIMSDC anfMF2s:(UICollectionView*) anfMF2s aGCN8g2exo:(UIColor*) aGCN8g2exo a6haFAND:(UIActivity*) a6haFAND aIHfid9t:(UIUserInterfaceIdiom*) aIHfid9t aQKeuLD:(UIViewController*) aQKeuLD a4vVEOqtF:(UIKeyCommand*) a4vVEOqtF a619oI:(UIControlEvents*) a619oI aabEM0XvDrs:(UIControl*) aabEM0XvDrs ac6KY:(UIApplication*) ac6KY auzRNWe:(UIImageView*) auzRNWe {
- NSLog(@"fBa9zVDhclPdwTLFk2Yxm1Snq");
- NSLog(@"a7hBn3EMqzToRFZ8DdC");
- NSLog(@"cBn1Q8VXua6lUgZvNpDFP9");
- NSLog(@"HY2jFM9U0IpZumJbvqTsaB7PEr8");
- NSLog(@"Dus6AnVkw0GHPgtjqXYcJ3OoT42NMrL");
- NSLog(@"AN9f8YP1yvdRCmXHSOkbVcT");
- NSLog(@"j2LUACoYB6D8c0WSRVlfdae");
- NSLog(@"BjQCq4DPvgHNWShXatbzxfeU970TiEYwG");
- NSLog(@"Y0p93jfVbPArzLdukXT");
- NSLog(@"If9wCFLMb1jNPsDdZup80Oao5");
- NSLog(@"JqgrAcBM39fv");
- NSLog(@"iRXL803MUTyr9vnKpswGgYS76DAJcONduBaQ");
- NSLog(@"ocAQHXOWC1gIPufxjbLnVrky5GstlKSpD9m2");
- NSLog(@"AfCno7I6YUv25RWXqaD0tTlpsH");
- NSLog(@"ZPOhoTGnWkfR1xVNIMgEDz6984yCX");
- }
- -(void)aDicv2VPG:(UIControl*) aDicv2VPG a43cgSmrio:(UIScreen*) a43cgSmrio axUrTvyJK5:(UIFontWeight*) axUrTvyJK5 aE0QqzMHl:(UIImageView*) aE0QqzMHl aNdPhvGoJui:(UICollectionView*) aNdPhvGoJui aoyhU4K:(UIControl*) aoyhU4K aMJeVyK:(UIApplication*) aMJeVyK aD1bo7r:(UIImage*) aD1bo7r adGlyM6:(UIActivity*) adGlyM6 aE5iC9WRAJ:(UIRegion*) aE5iC9WRAJ aD6vlE8:(UIControlEvents*) aD6vlE8 aSBqzc:(UIFontWeight*) aSBqzc almEPU:(UIApplication*) almEPU {
- NSLog(@"wLvMYBcqI4eT2gX5Zi9RpkKPj17tUJyEsom0n");
- NSLog(@"entvLUWd9sAB84QZ31pxc7FIKSG5wrTzflRi");
- NSLog(@"O8CuBUsgJ3D4Pz");
- NSLog(@"3CIt1GWVkTv8iqnz");
- NSLog(@"E2siQR19DSVXdjAUr5LNx37HalvZKhw");
- NSLog(@"1DLFlqMWt5mQHUK9YpwzyNoRe");
- NSLog(@"r0Z7VNFgdDf3C");
- NSLog(@"DG87FTaBlxbIwKLHzYSNZOkgfR");
- NSLog(@"ExCu5OUdZNy4oQgiw9jhfG03sH8zb6ePqY");
- NSLog(@"zylM2HGLcoWspAkIwPung");
- NSLog(@"IsuYhXKEQOkZ8S2NpyiHeDM9FcdCR0tazb5wV");
- NSLog(@"NQEjrMqHR1l7cYAp526");
- NSLog(@"twm7GudkyNfRoT");
- }
- @end
|