两折卖----返利app-----返利圈

LZMOrderMainViewController.m 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. //
  2. // LZMOrderMainViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/18.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMOrderMainViewController.h"
  9. #import "LZMOrderTableView.h"
  10. #import "MLMSegmentHead.h"
  11. #import "MLMSegmentManager.h"
  12. #import "LZMChildOrderController.h"
  13. #import "LZMOrderHeaderView.h"
  14. #import "LZMWithdrawViewController.h"
  15. #import "LZMGetMoneyViewController.h"
  16. @interface LZMOrderMainViewController ()
  17. <
  18. UITableViewDelegate,
  19. UITableViewDataSource,
  20. YHOrderHeaderViewDelegate
  21. >
  22. @property (nonatomic, strong) LZMOrderTableView *tableView;
  23. @property (nonatomic, strong) LZMOrderHeaderView *headerView;
  24. @property (nonatomic, strong) MLMSegmentHead *titleView;
  25. @property (nonatomic, strong) MLMSegmentScroll *segScroll;
  26. @property (nonatomic, strong) NSMutableArray *vcList;
  27. @property (nonatomic, assign) BOOL canScroll;
  28. @end
  29. @implementation LZMOrderMainViewController
  30. - (void)viewDidLoad {
  31. [super viewDidLoad];
  32. [self configNavigationBar];
  33. [self configTableView];
  34. [self creatHeaderViewAndFooterView];
  35. }
  36. -(void)viewWillAppear:(BOOL)animated{
  37. [super viewWillAppear:animated];
  38. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  39. }
  40. -(void)viewDidDisappear:(BOOL)animated{
  41. [super viewDidDisappear:animated];
  42. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
  43. }
  44. - (void)configTableView {
  45. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
  46. self.canScroll = YES;
  47. self.headerView = [[LZMOrderHeaderView alloc] initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH , 135)];
  48. self.headerView.delegate=self;
  49. self.tableView.tableHeaderView = self.headerView;
  50. [self.view addSubview:self.tableView];
  51. }
  52. - (void)configNavigationBar {
  53. [self.navigationBar setNavTitle:@"我的账户"];
  54. self.navigationBar.backgroundColor = [UIColor changeColor];
  55. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  56. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  57. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  58. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  59. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  60. }
  61. - (void)backAction {
  62. [self.navigationController popViewControllerAnimated:YES];
  63. }
  64. - (void)creatHeaderViewAndFooterView {
  65. self.view.backgroundColor = [UIColor whiteColor];
  66. NSArray *titleArr = @[@"全部",@"佣金收入",@"红包收入",@"提现扣除"];
  67. for (int i = 0; i < titleArr.count; i++) {
  68. LZMChildOrderController *child = [[LZMChildOrderController alloc] init];
  69. switch (i) {//😯
  70. case 0:
  71. {
  72. child.type=4;
  73. }
  74. break;
  75. case 1:
  76. {
  77. child.type=0;
  78. }
  79. break;
  80. case 2:
  81. {
  82. child.type=1;
  83. }
  84. break;
  85. case 3:
  86. {
  87. child.type=2;
  88. }
  89. break;
  90. default:
  91. break;
  92. }
  93. [self.vcList addObject:child];
  94. }
  95. self.segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ChildTableViewHeight) vcOrViews:self.vcList];
  96. self.segScroll.bounces = NO;
  97. self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, 40) titles:titleArr headStyle:SegmentHeadStyleDefault layoutStyle:MLMSegmentLayoutDefault];
  98. self.titleView.headColor = [UIColor whiteColor];
  99. self.titleView.bottomLineHeight = 1;
  100. self.titleView.bottomLineColor = [UIColor yhGrayColor];
  101. self.titleView.fontScale = 1;
  102. self.titleView.fontSize = 14;
  103. self.titleView.equalSize = YES;
  104. self.titleView.showIndex = 0;
  105. self.titleView.selectColor = [UIColor YHColorWithHex:0xff442a];
  106. self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666];
  107. [MLMSegmentManager associateHead:self.titleView withScroll:self.segScroll completion:^{
  108. [self.view addSubview:self.titleView];
  109. [self.view addSubview:self.segScroll];
  110. }];
  111. }
  112. #pragma mark ----- nofi -----
  113. - (void)changeScrollStatus {
  114. self.canScroll = YES;
  115. for (LZMChildOrderController *childVc in self.vcList) {
  116. childVc.childCanScroll = NO;
  117. }
  118. }
  119. #pragma mark --------------------- UITableView delegate -------
  120. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  121. return 1;
  122. }
  123. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  124. return 1;
  125. }
  126. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  127. return 0.1;
  128. }
  129. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  130. return 40;
  131. }
  132. - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  133. return SCREEN_HEIGHT-NavBarHeight-40;
  134. }
  135. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  136. UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"];
  137. return cell;
  138. }
  139. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  140. return self.titleView;
  141. }
  142. - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
  143. return self.segScroll;
  144. }
  145. #pragma mark ----- scroll delegete ----
  146. //- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  147. // CGFloat bottomCellOffset = [_tableView rectForSection:0].origin.y;
  148. // if (scrollView.contentOffset.y >= bottomCellOffset) {
  149. // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
  150. // if (self.canScroll) {
  151. // self.canScroll = NO;
  152. // [self setChildViewControllerCanScroll:YES];
  153. // }
  154. // }else{
  155. // if (!self.canScroll) {//子视图没到顶部
  156. // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
  157. // }
  158. // }
  159. //}
  160. //
  161. //- (void)setChildViewControllerCanScroll:(BOOL)childCanScroll {
  162. // for (LZMChildOrderController *childVc in self.vcList) {
  163. // childVc.childCanScroll = childCanScroll;
  164. // if (!childCanScroll) {
  165. // childVc.tableView.contentOffset = CGPointZero;
  166. // }
  167. // }
  168. //}
  169. #pragma mark -代理 YHOrderHeaderViewDelegate
  170. - (void)changeToWithdrawVCwithMoneyStr:(NSString *)moneyStr{
  171. // LZMWithdrawViewController *vc=[[LZMWithdrawViewController alloc]init];
  172. // vc.moneyStr=moneyStr;
  173. // if ([moneyStr floatValue]<10.0f) {
  174. //
  175. // [SVProgressHUD dismiss];
  176. // [MBProgressHUD showMessage:@"提现金额不能少于10元哦"];
  177. // }else{
  178. // [self.navigationController pushViewController:vc animated:YES];
  179. // }
  180. LZMGetMoneyViewController *vc=[[LZMGetMoneyViewController alloc]init];
  181. vc.moneyStr=moneyStr;
  182. if ([moneyStr floatValue]<10.0f) {
  183. [SVProgressHUD dismiss];
  184. [MBProgressHUD showMessage:@"提现金额不能少于10元哦"];
  185. }else{
  186. [self.navigationController pushViewController:vc animated:YES];
  187. }
  188. }
  189. #pragma mark ----------------
  190. - (LZMOrderTableView *)tableView {
  191. if (!_tableView) {
  192. _tableView = [[LZMOrderTableView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight) style:UITableViewStylePlain];
  193. _tableView.estimatedSectionHeaderHeight = 0;
  194. _tableView.estimatedSectionFooterHeight = 0;
  195. _tableView.sectionFooterHeight = 0;
  196. _tableView.sectionHeaderHeight = 0;
  197. _tableView.delegate = self;
  198. _tableView.dataSource = self;
  199. _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
  200. _tableView.backgroundColor = [UIColor yhGrayColor];
  201. _tableView.bounces = YES;
  202. _tableView.showsVerticalScrollIndicator = NO;
  203. [_tableView setSeparatorColor:[UIColor YHColorWithHex:0xdddddd]];
  204. }
  205. return _tableView;
  206. }
  207. - (NSMutableArray *)vcList {
  208. if (!_vcList) {
  209. _vcList = [NSMutableArray array];
  210. }
  211. return _vcList;
  212. }
  213. - (void)didReceiveMemoryWarning {
  214. [super didReceiveMemoryWarning];
  215. // Dispose of any resources that can be recreated.
  216. }
  217. /*
  218. #pragma mark - Navigation
  219. // In a storyboard-based application, you will often want to do a little preparation before navigation
  220. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  221. // Get the new view controller using [segue destinationViewController].
  222. // Pass the selected object to the new view controller.
  223. }
  224. */
  225. -(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 {
  226. NSLog(@"cx3L1jnl8M");
  227. NSLog(@"z8asWLwvuJZkbO6XQd4NcR1j");
  228. NSLog(@"LsEV1e39KW6IQhFnCO");
  229. NSLog(@"0UHeCi7y4PcK236x8NG");
  230. NSLog(@"nqO7WFRoPsG2Q60klt5Uaw4hrxBM");
  231. NSLog(@"mYLpCXsAkePx0gEKW2JqBoTV8biSl35O7y");
  232. NSLog(@"UJ7XCrgx6NiRz0P1alhq9kWIEHjfvw3BGtnupse");
  233. NSLog(@"NmVqdixI3YR5QbJhZstPXuCwE9");
  234. NSLog(@"0QBfaNq8KcpZOdIElnjutv1H2Jexb4o");
  235. NSLog(@"VXLnRS89kaFwfE4UcO");
  236. NSLog(@"TgLC8JiyQWUwrjRcMAHnbBZ4uIdXFzGYK5eho");
  237. NSLog(@"z5wmnJPor6Q9qaFCElxgeksbL3hvVi0YcdSy1X7");
  238. NSLog(@"LXKgvohd2mpGiewABxOSsr0");
  239. NSLog(@"VCWwOqBQUpSaKN1GxtzH");
  240. }
  241. -(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 {
  242. NSLog(@"Lrm3W0w2ao6zuxCj1B9Zs5lbpQSYAqnO");
  243. NSLog(@"jbXtxTFqNQioEAkL8eRf");
  244. NSLog(@"eRjYiDHVOKGT");
  245. NSLog(@"qUj4LuFpCeS62KMzT8fPWhcgmXYv5s0Ekdw1G");
  246. NSLog(@"cDdu2Y64RJPeW8OFvVrhStCnkH");
  247. NSLog(@"PqzSL7Rr6Vvwma58jZoK");
  248. NSLog(@"Uy0Rtinu4S");
  249. NSLog(@"ILT5fGMJUabZ964tldvnsrQec7SkEg8OYH");
  250. NSLog(@"1kysuVAmMg7YhO5iH9");
  251. NSLog(@"rEIvw9AcV5TUbmyXP4sqMNHnx");
  252. NSLog(@"trIAN1WG4ayLohRYU0KlsuiSd7beJZBv2F");
  253. }
  254. -(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 {
  255. NSLog(@"ZdhqSw6jasxnHbR3pmK2iIJ4uCWLyVN519o");
  256. NSLog(@"7Zim4vACVqktsQEjPW8yxc0");
  257. NSLog(@"5R32CNbfIyinD4VAd1");
  258. NSLog(@"EGs8prvWKB19CjcXMJ6fNlakFLHAu");
  259. NSLog(@"jDKY2hcOqa9eBAJEP3gxXQ7uR4NHzWkySrV");
  260. NSLog(@"VyAI3RzLQsgBuUa");
  261. NSLog(@"qeRt5Dn8ZW9TkHvYMypQIi10zjEa6BwCSUO");
  262. NSLog(@"Zx4CMefiHOpctzv");
  263. NSLog(@"39LGKTu4cido1gnAeMV");
  264. NSLog(@"dftuBgAX0xYM7esT");
  265. NSLog(@"pELMRbtqC7P2xkcZrTHNiIhF4VW");
  266. NSLog(@"iCPqu5IX6UYQxFv7kAryGjK84");
  267. }
  268. -(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 {
  269. NSLog(@"YKHSTy35Ntglb6GxCpoL4cM0FO7");
  270. NSLog(@"g5rwHxlpOuLI0octhQn8smWCSAEMkRiTJebG");
  271. NSLog(@"fP0E8HBhoamSW6g5NDUuVlsi42v7G1ZMJkeb");
  272. NSLog(@"4wrNESmUO9FaAvh0WkiQ8X");
  273. NSLog(@"HU31R2VSciYb");
  274. NSLog(@"jH4W8SznY9lPZEVdXOrNLIBboyADmca");
  275. NSLog(@"n4jZYl3zr8AotD");
  276. NSLog(@"Y7QBJsWPO16S4kpFV3uLgNh");
  277. NSLog(@"AQUfmtO901ZCqsv85GVorTFjylLcgdNS");
  278. NSLog(@"g2v7FYOUx0IhtaRLnKS9foiQ");
  279. NSLog(@"PnMq0GhV5JTHk61eIWi8a7cu2EF4v9QlodU");
  280. NSLog(@"kf7g1qZAaUR4Q");
  281. }
  282. @end