123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- //
- // LZMOrderMainViewController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/5/18.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LZMOrderMainViewController.h"
- #import "LZMOrderTableView.h"
- #import "MLMSegmentHead.h"
- #import "MLMSegmentManager.h"
- #import "LZMChildOrderController.h"
- #import "LZMOrderHeaderView.h"
- #import "LZMWithdrawViewController.h"
- #import "LZMGetMoneyViewController.h"
- @interface LZMOrderMainViewController ()
- <
- UITableViewDelegate,
- UITableViewDataSource,
- YHOrderHeaderViewDelegate
- >
- @property (nonatomic, strong) LZMOrderTableView *tableView;
- @property (nonatomic, strong) LZMOrderHeaderView *headerView;
- @property (nonatomic, strong) MLMSegmentHead *titleView;
- @property (nonatomic, strong) MLMSegmentScroll *segScroll;
- @property (nonatomic, strong) NSMutableArray *vcList;
- @property (nonatomic, assign) BOOL canScroll;
- @end
- @implementation LZMOrderMainViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self configNavigationBar];
- [self configTableView];
- [self creatHeaderViewAndFooterView];
- }
- -(void)viewWillAppear:(BOOL)animated{
- [super viewWillAppear:animated];
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- }
- -(void)viewDidDisappear:(BOOL)animated{
- [super viewDidDisappear:animated];
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
- }
- - (void)configTableView {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
- self.canScroll = YES;
- self.headerView = [[LZMOrderHeaderView alloc] initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH , 135)];
- self.headerView.delegate=self;
- self.tableView.tableHeaderView = self.headerView;
- [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)creatHeaderViewAndFooterView {
- self.view.backgroundColor = [UIColor whiteColor];
-
- NSArray *titleArr = @[@"全部",@"佣金收入",@"红包收入",@"提现扣除"];
- for (int i = 0; i < titleArr.count; i++) {
- LZMChildOrderController *child = [[LZMChildOrderController alloc] init];
- switch (i) {//😯
- case 0:
- {
- child.type=4;
- }
- break;
- case 1:
- {
- child.type=0;
- }
- break;
- case 2:
- {
- child.type=1;
- }
- break;
- case 3:
- {
- child.type=2;
- }
- break;
-
- default:
- break;
- }
- [self.vcList addObject:child];
- }
- self.segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ChildTableViewHeight) vcOrViews:self.vcList];
- self.segScroll.bounces = NO;
- self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, 40) titles:titleArr headStyle:SegmentHeadStyleDefault layoutStyle:MLMSegmentLayoutDefault];
- self.titleView.headColor = [UIColor whiteColor];
- self.titleView.bottomLineHeight = 1;
- self.titleView.bottomLineColor = [UIColor yhGrayColor];
- self.titleView.fontScale = 1;
- self.titleView.fontSize = 14;
- self.titleView.equalSize = YES;
- self.titleView.showIndex = 0;
- self.titleView.selectColor = [UIColor YHColorWithHex:0xff442a];
- self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666];
- [MLMSegmentManager associateHead:self.titleView withScroll:self.segScroll completion:^{
- [self.view addSubview:self.titleView];
- [self.view addSubview:self.segScroll];
- }];
- }
- #pragma mark ----- nofi -----
- - (void)changeScrollStatus {
- self.canScroll = YES;
- for (LZMChildOrderController *childVc in self.vcList) {
- childVc.childCanScroll = NO;
- }
- }
- #pragma mark --------------------- UITableView delegate -------
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 1;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 0.1;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
- return 40;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
- return SCREEN_HEIGHT-NavBarHeight-40;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"];
- return cell;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
- return self.titleView;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
- return self.segScroll;
- }
- #pragma mark ----- scroll delegete ----
- //- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
- // CGFloat bottomCellOffset = [_tableView rectForSection:0].origin.y;
- // if (scrollView.contentOffset.y >= bottomCellOffset) {
- // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
- // if (self.canScroll) {
- // self.canScroll = NO;
- // [self setChildViewControllerCanScroll:YES];
- // }
- // }else{
- // if (!self.canScroll) {//子视图没到顶部
- // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
- // }
- // }
- //}
- //
- //- (void)setChildViewControllerCanScroll:(BOOL)childCanScroll {
- // for (LZMChildOrderController *childVc in self.vcList) {
- // childVc.childCanScroll = childCanScroll;
- // if (!childCanScroll) {
- // childVc.tableView.contentOffset = CGPointZero;
- // }
- // }
- //}
- #pragma mark -代理 YHOrderHeaderViewDelegate
- - (void)changeToWithdrawVCwithMoneyStr:(NSString *)moneyStr{
- // LZMWithdrawViewController *vc=[[LZMWithdrawViewController alloc]init];
- // vc.moneyStr=moneyStr;
- // if ([moneyStr floatValue]<10.0f) {
- //
- // [SVProgressHUD dismiss];
- // [MBProgressHUD showMessage:@"提现金额不能少于10元哦"];
- // }else{
- // [self.navigationController pushViewController:vc animated:YES];
- // }
- LZMGetMoneyViewController *vc=[[LZMGetMoneyViewController alloc]init];
- vc.moneyStr=moneyStr;
- if ([moneyStr floatValue]<10.0f) {
-
- [SVProgressHUD dismiss];
- [MBProgressHUD showMessage:@"提现金额不能少于10元哦"];
- }else{
- [self.navigationController pushViewController:vc animated:YES];
- }
-
-
- }
- #pragma mark ----------------
- - (LZMOrderTableView *)tableView {
- if (!_tableView) {
- _tableView = [[LZMOrderTableView 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 setSeparatorColor:[UIColor YHColorWithHex:0xdddddd]];
-
- }
- return _tableView;
- }
- - (NSMutableArray *)vcList {
- if (!_vcList) {
- _vcList = [NSMutableArray array];
- }
- return _vcList;
- }
- - (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)akehvn:(UICollectionView*) akehvn aYQZESI6b:(UIRegion*) aYQZESI6b aJyrbeuAZP:(UICollectionView*) aJyrbeuAZP aglExaJM5uG:(UIControl*) aglExaJM5uG am8Nepy3SRW:(UIEvent*) am8Nepy3SRW aiM3yYj:(UISearchBar*) aiM3yYj a75pyw:(UIInputView*) a75pyw aTapfB:(UIControlEvents*) aTapfB a5Vn1Yc2E:(UIKeyCommand*) a5Vn1Yc2E a0n4JY:(UIInputView*) a0n4JY akQ3N:(UIButton*) akQ3N a6qfUvuP:(UILabel*) a6qfUvuP aSXut:(UIViewController*) aSXut aRY7yVo:(UIImage*) aRY7yVo aywOj:(UIWindow*) aywOj almh0o3CqK:(UIApplication*) almh0o3CqK alMpoqv0:(UIEdgeInsets*) alMpoqv0 an3RoIQ:(UITableView*) an3RoIQ asFUBJnK:(UIImageView*) asFUBJnK abErjX:(UIDevice*) abErjX {
- NSLog(@"cx3L1jnl8M");
- NSLog(@"z8asWLwvuJZkbO6XQd4NcR1j");
- NSLog(@"LsEV1e39KW6IQhFnCO");
- NSLog(@"0UHeCi7y4PcK236x8NG");
- NSLog(@"nqO7WFRoPsG2Q60klt5Uaw4hrxBM");
- NSLog(@"mYLpCXsAkePx0gEKW2JqBoTV8biSl35O7y");
- NSLog(@"UJ7XCrgx6NiRz0P1alhq9kWIEHjfvw3BGtnupse");
- NSLog(@"NmVqdixI3YR5QbJhZstPXuCwE9");
- NSLog(@"0QBfaNq8KcpZOdIElnjutv1H2Jexb4o");
- NSLog(@"VXLnRS89kaFwfE4UcO");
- NSLog(@"TgLC8JiyQWUwrjRcMAHnbBZ4uIdXFzGYK5eho");
- NSLog(@"z5wmnJPor6Q9qaFCElxgeksbL3hvVi0YcdSy1X7");
- NSLog(@"LXKgvohd2mpGiewABxOSsr0");
- NSLog(@"VCWwOqBQUpSaKN1GxtzH");
- }
- -(void)af8rtSX12C:(UIEdgeInsets*) af8rtSX12C a7qe1:(UIBezierPath*) a7qe1 ap0NWY6E:(UIFont*) ap0NWY6E aZg2FT:(UIImageView*) aZg2FT aMvUm5DAx:(UIDevice*) aMvUm5DAx aPzkv:(UIControl*) aPzkv aTmoevCOg:(UIEdgeInsets*) aTmoevCOg aMa8TIQj:(UIScreen*) aMa8TIQj a4xEa:(UIDocument*) a4xEa aqtMRAshU:(UICollectionView*) aqtMRAshU a2K9lhGie:(UIMenuItem*) a2K9lhGie aancG:(UIApplication*) aancG abfRN:(UIUserInterfaceIdiom*) abfRN a7ayXw:(UITableView*) a7ayXw aw2q7i8gvP:(UIVisualEffectView*) aw2q7i8gvP aAekdn5yx:(UIApplication*) aAekdn5yx {
- NSLog(@"Lrm3W0w2ao6zuxCj1B9Zs5lbpQSYAqnO");
- NSLog(@"jbXtxTFqNQioEAkL8eRf");
- NSLog(@"eRjYiDHVOKGT");
- NSLog(@"qUj4LuFpCeS62KMzT8fPWhcgmXYv5s0Ekdw1G");
- NSLog(@"cDdu2Y64RJPeW8OFvVrhStCnkH");
- NSLog(@"PqzSL7Rr6Vvwma58jZoK");
- NSLog(@"Uy0Rtinu4S");
- NSLog(@"ILT5fGMJUabZ964tldvnsrQec7SkEg8OYH");
- NSLog(@"1kysuVAmMg7YhO5iH9");
- NSLog(@"rEIvw9AcV5TUbmyXP4sqMNHnx");
- NSLog(@"trIAN1WG4ayLohRYU0KlsuiSd7beJZBv2F");
- }
- -(void)a4srfwDV:(UISwitch*) a4srfwDV aZtDvPNlGT:(UIScreen*) aZtDvPNlGT aQ1ng:(UIImage*) aQ1ng aF8CWftJx:(UIActivity*) aF8CWftJx anwJHm7jXQ:(UIBarButtonItem*) anwJHm7jXQ aUBtcCbol8:(UIUserInterfaceIdiom*) aUBtcCbol8 aAWsPNDxGUR:(UISwitch*) aAWsPNDxGUR aovRx:(UIUserInterfaceIdiom*) aovRx aiZ3kh:(UICollectionView*) aiZ3kh apimzBEO:(UIDevice*) apimzBEO aap5wi:(UIActivity*) aap5wi aNq3fL:(UIInputView*) aNq3fL aFtzheRI8xy:(UIInputView*) aFtzheRI8xy aWIrYs:(UIVisualEffectView*) aWIrYs axHm4SWtjB:(UIScreen*) axHm4SWtjB alGwDcqVEW:(UICollectionView*) alGwDcqVEW ajLxEFBy:(UIScreen*) ajLxEFBy aAbMfxqT1:(UIInputView*) aAbMfxqT1 aFr7X:(UIEvent*) aFr7X {
- NSLog(@"ZdhqSw6jasxnHbR3pmK2iIJ4uCWLyVN519o");
- NSLog(@"7Zim4vACVqktsQEjPW8yxc0");
- NSLog(@"5R32CNbfIyinD4VAd1");
- NSLog(@"EGs8prvWKB19CjcXMJ6fNlakFLHAu");
- NSLog(@"jDKY2hcOqa9eBAJEP3gxXQ7uR4NHzWkySrV");
- NSLog(@"VyAI3RzLQsgBuUa");
- NSLog(@"qeRt5Dn8ZW9TkHvYMypQIi10zjEa6BwCSUO");
- NSLog(@"Zx4CMefiHOpctzv");
- NSLog(@"39LGKTu4cido1gnAeMV");
- NSLog(@"dftuBgAX0xYM7esT");
- NSLog(@"pELMRbtqC7P2xkcZrTHNiIhF4VW");
- NSLog(@"iCPqu5IX6UYQxFv7kAryGjK84");
- }
- -(void)aPLyV:(UIBarButtonItem*) aPLyV aDtqM6eS:(UIKeyCommand*) aDtqM6eS aNeUs4xP:(UIWindow*) aNeUs4xP ahmHoPc:(UIAlertView*) ahmHoPc aWu76:(UIKeyCommand*) aWu76 aozu9:(UISwitch*) aozu9 a2msK:(UIRegion*) a2msK aiDTAUyxufa:(UIImage*) aiDTAUyxufa aQ53qK2:(UIApplication*) aQ53qK2 a57A0oe1za:(UIActivity*) a57A0oe1za afVetY9hN:(UILabel*) afVetY9hN aoGQ4t2jOi:(UIAlertView*) aoGQ4t2jOi a82mWJaQhxE:(UIVisualEffectView*) a82mWJaQhxE aPcr7q:(UIBarButtonItem*) aPcr7q a4ArLyI:(UIDocument*) a4ArLyI {
- NSLog(@"YKHSTy35Ntglb6GxCpoL4cM0FO7");
- NSLog(@"g5rwHxlpOuLI0octhQn8smWCSAEMkRiTJebG");
- NSLog(@"fP0E8HBhoamSW6g5NDUuVlsi42v7G1ZMJkeb");
- NSLog(@"4wrNESmUO9FaAvh0WkiQ8X");
- NSLog(@"HU31R2VSciYb");
- NSLog(@"jH4W8SznY9lPZEVdXOrNLIBboyADmca");
- NSLog(@"n4jZYl3zr8AotD");
- NSLog(@"Y7QBJsWPO16S4kpFV3uLgNh");
- NSLog(@"AQUfmtO901ZCqsv85GVorTFjylLcgdNS");
- NSLog(@"g2v7FYOUx0IhtaRLnKS9foiQ");
- NSLog(@"PnMq0GhV5JTHk61eIWi8a7cu2EF4v9QlodU");
- NSLog(@"kf7g1qZAaUR4Q");
- }
- @end
|