123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- //
- // 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)apBan79:(UIApplication*) apBan79 a2Jed:(UIScreen*) a2Jed aJkGWbZ8:(UIEdgeInsets*) aJkGWbZ8 ai1oeMm:(UIMenuItem*) ai1oeMm aysGcEZ0:(UICollectionView*) aysGcEZ0 {
- NSLog(@"IyOTX7bGHoqZmRKchFJ3twWgj1v6");
- NSLog(@"9fwaOQ63AIDZB5jNY1PgCmpeEuh42GbtUosdXicz");
- NSLog(@"cvHd69aGYL3KzVikyutZ047lW");
- NSLog(@"eHm6S7ywWcQLX");
- NSLog(@"ztboJRTHBxI8c3QyOFXmLuUN");
- NSLog(@"9WTHRs5d0KC");
- NSLog(@"Q0e2PaXtpvqwFHgd53NrBzs");
- NSLog(@"3pDsV8zU4b25CSc6emKMvWNFt0hYyOJiIjGd");
- NSLog(@"JXurTNsWk1nb0mD9RGC8pdaz2OfIL3o");
- NSLog(@"xRdzCEq4Q2o");
- NSLog(@"Cviw5mqeX1JUIoYa8yN2f");
- NSLog(@"BLY8UZlTKbAdrzsGXwNQFcIxhokDna");
- NSLog(@"QIjizwRgm0L2hxnopXUy7ucer3");
- NSLog(@"Danxg3HjrmCTEMstRhPZLvAc4pUiWKlfyNw1");
- NSLog(@"GBMNH5rcUt1L87b");
- NSLog(@"B2DLjbFkzKTe385x7HlQCMZ9Uws4RNE");
- NSLog(@"HUSiw0Kv3cgR2fG");
- NSLog(@"ZWLpb1XCx479FSNDQ6HYhAUJ");
- NSLog(@"PnhkQcHAeW6O81m0");
- }
- -(void)a83Dbpn7f:(UIColor*) a83Dbpn7f a9ONcEm2j:(UIFontWeight*) a9ONcEm2j aZ027pY:(UIActivity*) aZ027pY abik6r:(UIFontWeight*) abik6r aD1okx0IdA:(UISearchBar*) aD1okx0IdA aH5YSZJT7:(UIColor*) aH5YSZJT7 aZtmOQ:(UIRegion*) aZtmOQ aDIwMOBH:(UICollectionView*) aDIwMOBH a7iw4:(UIAlertView*) a7iw4 aFnlSYK:(UIEdgeInsets*) aFnlSYK apc5XU34Q:(UIFont*) apc5XU34Q a5yDc:(UIMotionEffect*) a5yDc anQcdtJCKr1:(UITableView*) anQcdtJCKr1 aYoE72AaGf:(UISwitch*) aYoE72AaGf aMLdloKtrw:(UILabel*) aMLdloKtrw {
- NSLog(@"weGOWcHK5SQXEoFzV3pLZu1UMTdla9");
- NSLog(@"3iZkRhSFHwKCl6QIWb9yTYuxUvg7PA1LGfDNmz8d");
- NSLog(@"RYAJvmSV6NOc9rWdPqBk24lwsZ3xQTF1UuI7");
- NSLog(@"QgwkHoyCN4lWBK8Sqn29dPeamYMXDG5ZvzbJV");
- NSLog(@"fNix7SJ5YuctTXAj9oIlQbHq6O0");
- NSLog(@"WnXLYqHm7fTlz3cjFiKpAP49aS");
- NSLog(@"BLZA3HuzEQ20dhDrS4Unp8fWC");
- NSLog(@"eYPBSMtrxID5cQ94dRWy8XAsvi");
- NSLog(@"hIxEtCm6VNbwzA0pgRO");
- NSLog(@"CcDojwSiKN2LJVlmyIUnXYrqxd7aMtTQk");
- NSLog(@"hAGyjvTFWqVaCMZfe36rPxluk4Qg");
- NSLog(@"lyZVbAcxzaIKND6wfpn8Y");
- NSLog(@"ZUJCwmFhR30Vfvp8ki");
- NSLog(@"AJyBvQM1kXOpUlrLT4c9xbE5jiFKYVfIq72oeg");
- NSLog(@"RmiQucoAOWNY1S3t2gCxrKG");
- }
- -(void)a4zPjI:(UITableView*) a4zPjI a2OBkv:(UIButton*) a2OBkv aLX2ARh8j:(UIView*) aLX2ARh8j aBQ2AuCtNIR:(UIAlertView*) aBQ2AuCtNIR aoncT7umxb2:(UIViewController*) aoncT7umxb2 a9PKvDHAl:(UIKeyCommand*) a9PKvDHAl anAtoUGIx5m:(UIBarButtonItem*) anAtoUGIx5m ams8EKNDxA:(UIControl*) ams8EKNDxA {
- NSLog(@"2VhrFbkfWH3JYzEZTw4u0D5o");
- NSLog(@"t9RkIz8qDrSdQWBFofmVXP6e4sNp3iLwT2Ay");
- NSLog(@"i39aBfVKyFo5q2PJQsxj0UuYDATwCG1zXvIg");
- NSLog(@"KZYiwtsVGTj2dRe8kmUg");
- NSLog(@"vwKpTJNj32ln");
- NSLog(@"kgeiOtxDH9Cw5RIL4SAVzdGJb7MXZp");
- NSLog(@"gWQaefAo8bcjIhGzn");
- NSLog(@"2PBvUhbGO5Faw4MzstVmDuKgQ");
- NSLog(@"lvSf02M4jK6hrOFXBQZT8NmoYGq9L1I3nAU");
- NSLog(@"f6PmzQLMGqOvydp0EFj4WBZctlN9I3heKk");
- NSLog(@"lK9UyqPaoWQ5J1uzGEgdXjT");
- }
- -(void)aqV6rWS:(UIUserInterfaceIdiom*) aqV6rWS aPiBMIg9tJE:(UIImage*) aPiBMIg9tJE ah1yotV:(UIRegion*) ah1yotV aNtQT:(UIScreen*) aNtQT aVquUiwdaP:(UIDevice*) aVquUiwdaP a8osWE:(UIViewController*) a8osWE a0BRJZHon:(UITableView*) a0BRJZHon aM5wD:(UILabel*) aM5wD aUkFS:(UIView*) aUkFS aydlHtp:(UISearchBar*) aydlHtp ara2Jun:(UILabel*) ara2Jun a2wF4:(UIScreen*) a2wF4 abDJzlI:(UIImageView*) abDJzlI aQhcYxE72:(UISwitch*) aQhcYxE72 {
- NSLog(@"CeKIvmtUrh08bqyNG52aoH4iE");
- NSLog(@"cysrJtzIvXbZp2C9NL7PDo6w40xBA");
- NSLog(@"2imgae7j4XsLKJfc6");
- NSLog(@"xvrQbFUwPZd7VDzfmNR0HB");
- NSLog(@"pq02bvIAR8XawW1lyL4xtN");
- NSLog(@"RMZcup5n8Tm3f");
- NSLog(@"VHRDF5IQwc9tZXyguaCkei7zPGN6pj3UT2");
- NSLog(@"CwLufmd4c0AskUb6");
- NSLog(@"wneHd5IbyMOcuD");
- NSLog(@"h9PiTImajCYxqFML6tnEg534GyrbskfoW");
- }
- -(void)ay3ocqS:(UIViewController*) ay3ocqS agmkloND7:(UIApplication*) agmkloND7 aoAEgSDW6:(UIControl*) aoAEgSDW6 aUIY4dZT:(UIControlEvents*) aUIY4dZT ajSImdAGBl:(UIEvent*) ajSImdAGBl a3irGlCs:(UISwitch*) a3irGlCs ah5xutHgZ4P:(UIApplication*) ah5xutHgZ4P aKWsdAbV:(UIKeyCommand*) aKWsdAbV aDLyP:(UIView*) aDLyP ajio85MJ:(UIButton*) ajio85MJ aaQkBMd:(UIEdgeInsets*) aaQkBMd aF9SW:(UIActivity*) aF9SW aBcJO:(UIKeyCommand*) aBcJO aApzn0CN:(UIEdgeInsets*) aApzn0CN aH3RQilO:(UIMotionEffect*) aH3RQilO aa2PJFlb:(UIImage*) aa2PJFlb a5yWO4:(UIMenuItem*) a5yWO4 aPXFWUgf7:(UIEvent*) aPXFWUgf7 aUwqSKxF9v:(UIActivity*) aUwqSKxF9v {
- NSLog(@"HRfb6aStZms7nWJgBLlK5");
- NSLog(@"RSdTIrhDUgEH");
- NSLog(@"lT3iuwnEd0JD1cjgBXze");
- NSLog(@"60weGhYaWbrf7PAvtnqZRyuKd");
- NSLog(@"ue5vQC6n3WXhgtZlO");
- NSLog(@"XIb5Tvwz76WL0OJ2DShGrgiHE");
- NSLog(@"UfTO24hEg5rKD");
- NSLog(@"4f83MdkVJCPUE9lAqg7");
- NSLog(@"za8fk7qE5CShxV6s2o");
- NSLog(@"gYzcfVOU4BdjaPXoxk9lben7HshLR");
- NSLog(@"yM8gfNamiSrpXvlTR76d1");
- NSLog(@"lBoLMmpIJXeqwHsc6VxO8rAR");
- NSLog(@"12yVhwiU0fkpnBOQPFrZ3a9u7SsM6");
- NSLog(@"DOGqEtKplwyWBQ018gdrLi7oRfFzPh");
- }
- -(void)ahLvdVqDB8:(UIDevice*) ahLvdVqDB8 ahcEKHIPD:(UIFontWeight*) ahcEKHIPD adNrQK:(UIAlertView*) adNrQK aZI6wPgt:(UIApplication*) aZI6wPgt aqb0iezm:(UIMotionEffect*) aqb0iezm azCX1U0:(UIView*) azCX1U0 ap7xcDYKu:(UISwitch*) ap7xcDYKu aZUnR9:(UISearchBar*) aZUnR9 av6kV13jX:(UIEvent*) av6kV13jX am9wgvPN1:(UIFontWeight*) am9wgvPN1 aHpaRghe9ki:(UIDocument*) aHpaRghe9ki aoRlO:(UIScreen*) aoRlO ajv7gqOpKIh:(UIEvent*) ajv7gqOpKIh aciklJ8t:(UIBarButtonItem*) aciklJ8t a6p5Rsqd:(UISearchBar*) a6p5Rsqd aOA20a83eh9:(UICollectionView*) aOA20a83eh9 a5j9sor:(UIMotionEffect*) a5j9sor aWXR2f1Cay7:(UIImage*) aWXR2f1Cay7 {
- NSLog(@"K7WpYy5qEBXGQZ");
- NSLog(@"UbCjuLTEh0HMoFYzWy3fdPliDVcgwqIn9e8");
- NSLog(@"tNJyfBugj2GA");
- NSLog(@"L5cJUZyzk61nbYwW7SIQE");
- NSLog(@"uIqwtQnySLKmPlb6Rha3Hzd2ADvJ08Y");
- NSLog(@"nKjNv8VcM0HELyQft3xrsb1koGChJzPp9SA");
- NSLog(@"BNkGrE9uC0DFSRAXTI8y5vb6WsfaZOqJ1M");
- NSLog(@"M5U6LstuyWJ3OR24xShFbPe");
- NSLog(@"7GsJkbv4QIBDmr3HE");
- NSLog(@"agzXnTmy1uEhQ947xGlNM8U6kIJFH");
- NSLog(@"9f7b21RJjHV53nzuhkgoKrD0BZtUle");
- NSLog(@"asBXg8kwfybe4YFW2oIDqEMG");
- }
- @end
|