两折买改口袋样式

LZMOrderMainViewController.m 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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)apBan79:(UIApplication*) apBan79 a2Jed:(UIScreen*) a2Jed aJkGWbZ8:(UIEdgeInsets*) aJkGWbZ8 ai1oeMm:(UIMenuItem*) ai1oeMm aysGcEZ0:(UICollectionView*) aysGcEZ0 {
  226. NSLog(@"IyOTX7bGHoqZmRKchFJ3twWgj1v6");
  227. NSLog(@"9fwaOQ63AIDZB5jNY1PgCmpeEuh42GbtUosdXicz");
  228. NSLog(@"cvHd69aGYL3KzVikyutZ047lW");
  229. NSLog(@"eHm6S7ywWcQLX");
  230. NSLog(@"ztboJRTHBxI8c3QyOFXmLuUN");
  231. NSLog(@"9WTHRs5d0KC");
  232. NSLog(@"Q0e2PaXtpvqwFHgd53NrBzs");
  233. NSLog(@"3pDsV8zU4b25CSc6emKMvWNFt0hYyOJiIjGd");
  234. NSLog(@"JXurTNsWk1nb0mD9RGC8pdaz2OfIL3o");
  235. NSLog(@"xRdzCEq4Q2o");
  236. NSLog(@"Cviw5mqeX1JUIoYa8yN2f");
  237. NSLog(@"BLY8UZlTKbAdrzsGXwNQFcIxhokDna");
  238. NSLog(@"QIjizwRgm0L2hxnopXUy7ucer3");
  239. NSLog(@"Danxg3HjrmCTEMstRhPZLvAc4pUiWKlfyNw1");
  240. NSLog(@"GBMNH5rcUt1L87b");
  241. NSLog(@"B2DLjbFkzKTe385x7HlQCMZ9Uws4RNE");
  242. NSLog(@"HUSiw0Kv3cgR2fG");
  243. NSLog(@"ZWLpb1XCx479FSNDQ6HYhAUJ");
  244. NSLog(@"PnhkQcHAeW6O81m0");
  245. }
  246. -(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 {
  247. NSLog(@"weGOWcHK5SQXEoFzV3pLZu1UMTdla9");
  248. NSLog(@"3iZkRhSFHwKCl6QIWb9yTYuxUvg7PA1LGfDNmz8d");
  249. NSLog(@"RYAJvmSV6NOc9rWdPqBk24lwsZ3xQTF1UuI7");
  250. NSLog(@"QgwkHoyCN4lWBK8Sqn29dPeamYMXDG5ZvzbJV");
  251. NSLog(@"fNix7SJ5YuctTXAj9oIlQbHq6O0");
  252. NSLog(@"WnXLYqHm7fTlz3cjFiKpAP49aS");
  253. NSLog(@"BLZA3HuzEQ20dhDrS4Unp8fWC");
  254. NSLog(@"eYPBSMtrxID5cQ94dRWy8XAsvi");
  255. NSLog(@"hIxEtCm6VNbwzA0pgRO");
  256. NSLog(@"CcDojwSiKN2LJVlmyIUnXYrqxd7aMtTQk");
  257. NSLog(@"hAGyjvTFWqVaCMZfe36rPxluk4Qg");
  258. NSLog(@"lyZVbAcxzaIKND6wfpn8Y");
  259. NSLog(@"ZUJCwmFhR30Vfvp8ki");
  260. NSLog(@"AJyBvQM1kXOpUlrLT4c9xbE5jiFKYVfIq72oeg");
  261. NSLog(@"RmiQucoAOWNY1S3t2gCxrKG");
  262. }
  263. -(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 {
  264. NSLog(@"2VhrFbkfWH3JYzEZTw4u0D5o");
  265. NSLog(@"t9RkIz8qDrSdQWBFofmVXP6e4sNp3iLwT2Ay");
  266. NSLog(@"i39aBfVKyFo5q2PJQsxj0UuYDATwCG1zXvIg");
  267. NSLog(@"KZYiwtsVGTj2dRe8kmUg");
  268. NSLog(@"vwKpTJNj32ln");
  269. NSLog(@"kgeiOtxDH9Cw5RIL4SAVzdGJb7MXZp");
  270. NSLog(@"gWQaefAo8bcjIhGzn");
  271. NSLog(@"2PBvUhbGO5Faw4MzstVmDuKgQ");
  272. NSLog(@"lvSf02M4jK6hrOFXBQZT8NmoYGq9L1I3nAU");
  273. NSLog(@"f6PmzQLMGqOvydp0EFj4WBZctlN9I3heKk");
  274. NSLog(@"lK9UyqPaoWQ5J1uzGEgdXjT");
  275. }
  276. -(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 {
  277. NSLog(@"CeKIvmtUrh08bqyNG52aoH4iE");
  278. NSLog(@"cysrJtzIvXbZp2C9NL7PDo6w40xBA");
  279. NSLog(@"2imgae7j4XsLKJfc6");
  280. NSLog(@"xvrQbFUwPZd7VDzfmNR0HB");
  281. NSLog(@"pq02bvIAR8XawW1lyL4xtN");
  282. NSLog(@"RMZcup5n8Tm3f");
  283. NSLog(@"VHRDF5IQwc9tZXyguaCkei7zPGN6pj3UT2");
  284. NSLog(@"CwLufmd4c0AskUb6");
  285. NSLog(@"wneHd5IbyMOcuD");
  286. NSLog(@"h9PiTImajCYxqFML6tnEg534GyrbskfoW");
  287. }
  288. -(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 {
  289. NSLog(@"HRfb6aStZms7nWJgBLlK5");
  290. NSLog(@"RSdTIrhDUgEH");
  291. NSLog(@"lT3iuwnEd0JD1cjgBXze");
  292. NSLog(@"60weGhYaWbrf7PAvtnqZRyuKd");
  293. NSLog(@"ue5vQC6n3WXhgtZlO");
  294. NSLog(@"XIb5Tvwz76WL0OJ2DShGrgiHE");
  295. NSLog(@"UfTO24hEg5rKD");
  296. NSLog(@"4f83MdkVJCPUE9lAqg7");
  297. NSLog(@"za8fk7qE5CShxV6s2o");
  298. NSLog(@"gYzcfVOU4BdjaPXoxk9lben7HshLR");
  299. NSLog(@"yM8gfNamiSrpXvlTR76d1");
  300. NSLog(@"lBoLMmpIJXeqwHsc6VxO8rAR");
  301. NSLog(@"12yVhwiU0fkpnBOQPFrZ3a9u7SsM6");
  302. NSLog(@"DOGqEtKplwyWBQ018gdrLi7oRfFzPh");
  303. }
  304. -(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 {
  305. NSLog(@"K7WpYy5qEBXGQZ");
  306. NSLog(@"UbCjuLTEh0HMoFYzWy3fdPliDVcgwqIn9e8");
  307. NSLog(@"tNJyfBugj2GA");
  308. NSLog(@"L5cJUZyzk61nbYwW7SIQE");
  309. NSLog(@"uIqwtQnySLKmPlb6Rha3Hzd2ADvJ08Y");
  310. NSLog(@"nKjNv8VcM0HELyQft3xrsb1koGChJzPp9SA");
  311. NSLog(@"BNkGrE9uC0DFSRAXTI8y5vb6WsfaZOqJ1M");
  312. NSLog(@"M5U6LstuyWJ3OR24xShFbPe");
  313. NSLog(@"7GsJkbv4QIBDmr3HE");
  314. NSLog(@"agzXnTmy1uEhQ947xGlNM8U6kIJFH");
  315. NSLog(@"9f7b21RJjHV53nzuhkgoKrD0BZtUle");
  316. NSLog(@"asBXg8kwfybe4YFW2oIDqEMG");
  317. }
  318. @end