两折买改口袋样式

LZMAccountDetailController.m 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. //
  2. // LZMAccountDetailController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/6/7.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMAccountDetailController.h"
  9. #import "LZMChildCommissionCell.h"
  10. #import "LZMAccountHeader.h"
  11. #import "LZMChildOrderCell.h"
  12. #import "LZMChildOrderModel.h"
  13. #import "LZMToMoneyViewController.h"
  14. #import "LZMGetMoneyViewController.h"
  15. @interface LZMAccountDetailController ()
  16. <
  17. UITableViewDelegate,
  18. UITableViewDataSource
  19. >
  20. {
  21. UIView *_sectionHeader;
  22. CGFloat rebate_account;//收入总计
  23. }
  24. @property (nonatomic, assign) NSInteger page;
  25. @property (nonatomic, strong) UITableView *tableView;
  26. @property (nonatomic, strong) NSMutableArray *dataArr;
  27. @end
  28. @implementation LZMAccountDetailController
  29. - (void)viewDidAppear:(BOOL)animated {
  30. [super viewDidAppear:animated];
  31. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  32. }
  33. - (void)viewDidLoad {
  34. [super viewDidLoad];
  35. [self configNavigationBar];
  36. [self configTableView];
  37. [self request];
  38. }
  39. - (void)configTableView {
  40. self.page = 1;
  41. LZMAccountHeader *header = [[LZMAccountHeader alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 90)];
  42. header.moneyBackBlcok = ^(NSString *blance){
  43. //提现
  44. if (blance.floatValue > 10.0) {
  45. LZMGetMoneyViewController *toMoney = [[LZMGetMoneyViewController alloc] init];
  46. toMoney.moneyStr = blance;
  47. [self.navigationController pushViewController:toMoney animated:YES];
  48. }else {
  49. [MBProgressHUD showMessage:@"金额不足10元,无法提现"];
  50. }
  51. };
  52. self.tableView.tableHeaderView = header;
  53. [self.view addSubview:self.tableView];
  54. }
  55. - (void)configNavigationBar {
  56. [self.navigationBar setNavTitle:@"我的账户"];
  57. self.navigationBar.backgroundColor = [UIColor changeColor];
  58. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  59. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  60. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  61. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  62. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  63. }
  64. - (void)backAction {
  65. [self.navigationController popViewControllerAnimated:YES];
  66. }
  67. - (void)request {
  68. NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/commissionList",BaseURL];
  69. NSDictionary *dic=@{
  70. @"type":@(0),
  71. @"page":@(self.page)
  72. };
  73. [LZMHttp post:url params:dic success:^(id json) {
  74. NSNumber *rebate = json[@"rebate_account"];
  75. rebate_account = [rebate floatValue];
  76. NSArray *arr = [NSArray yy_modelArrayWithClass:[LZMChildOrderModel class] json:json[@"data"]];
  77. if (arr.count>0) {
  78. [self.dataArr addObjectsFromArray:arr];
  79. self.tableView.footRefreshState = MJTableFooterRefreshStateLoadMore;
  80. self.tableView.bounces = YES;
  81. [self.tableView reloadData];
  82. }else {
  83. [self setUpNoDataView];
  84. [self noMoreDataWithArray:arr];
  85. // self.tableView.footRefreshState = MJTableFooterRefreshStateNoMore;
  86. if (self.page==1) {
  87. [self.tableView reloadData];
  88. }
  89. self.tableView.bounces = NO;
  90. }
  91. [self.tableView.mj_footer endRefreshing];
  92. } failure:^(NSError *error) {
  93. [self.tableView.mj_footer endRefreshing];
  94. }];
  95. }
  96. - (void)noMoreDataWithArray:(NSArray *)array {
  97. if (array==nil || array.count <= 0) {
  98. MJRefreshBackNormalFooter *foot = (MJRefreshBackNormalFooter *)self.tableView.mj_footer;
  99. [foot setTitle:@"到底啦" forState:MJRefreshStateIdle];
  100. }
  101. }
  102. - (void)setUpNoDataView {
  103. self.tableView.showNoDataView = YES;
  104. self.tableView.defaultNoDataText = @"您还没有任何记录";
  105. self.tableView.defaultNoDataImage = [UIImage imageNamed:@"noData"];
  106. }
  107. #pragma mark -------- UITableView Delegate -----
  108. - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
  109. if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
  110. [cell setSeparatorInset:UIEdgeInsetsMake(0, 15, 0, 15)];
  111. }
  112. }
  113. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  114. return self.dataArr.count;
  115. }
  116. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  117. return 67;
  118. }
  119. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  120. return 37;
  121. }
  122. - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  123. return 0.1;
  124. }
  125. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  126. LZMChildOrderCell *cell = [LZMChildOrderCell cellWithTableView:tableView];
  127. LZMChildOrderModel *model = self.dataArr[indexPath.row];
  128. cell.model=model;
  129. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  130. return cell;
  131. }
  132. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  133. _sectionHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 37)];
  134. _sectionHeader.backgroundColor = [UIColor YHColorWithHex:0xF4F4F4];
  135. UILabel *priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(25, 0, 200, 37)];
  136. priceLabel.textColor = [UIColor YHColorWithHex:0x141414];
  137. priceLabel.font = [UIFont systemFontOfSize:14];
  138. priceLabel.text = [NSString stringWithFormat:@"收入总计:¥%.2f",rebate_account];
  139. [_sectionHeader addSubview:priceLabel];
  140. return _sectionHeader;
  141. }
  142. #pragma mark ------- layzer ------
  143. - (UITableView *)tableView {
  144. if (!_tableView) {
  145. _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight) style:UITableViewStylePlain];
  146. _tableView.estimatedSectionHeaderHeight = 0;
  147. _tableView.estimatedSectionFooterHeight = 0;
  148. _tableView.sectionFooterHeight = 0;
  149. _tableView.sectionHeaderHeight = 0;
  150. _tableView.estimatedRowHeight = 0;
  151. _tableView.delegate = self;
  152. _tableView.dataSource = self;
  153. _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
  154. _tableView.backgroundColor = [UIColor yhGrayColor];
  155. _tableView.bounces = YES;
  156. _tableView.showsVerticalScrollIndicator = NO;
  157. _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
  158. _tableView.separatorColor = [UIColor YHColorWithHex:0xEEEEEE];
  159. _tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
  160. self.page ++;
  161. [self request];
  162. }];
  163. _tableView.footRefreshState = MJTableFooterRefreshStateNormal;
  164. }
  165. return _tableView;
  166. }
  167. - (NSMutableArray *)dataArr {
  168. if (!_dataArr) {
  169. _dataArr = [NSMutableArray array];
  170. }
  171. return _dataArr;
  172. }
  173. - (void)didReceiveMemoryWarning {
  174. [super didReceiveMemoryWarning];
  175. // Dispose of any resources that can be recreated.
  176. }
  177. /*
  178. #pragma mark - Navigation
  179. // In a storyboard-based application, you will often want to do a little preparation before navigation
  180. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  181. // Get the new view controller using [segue destinationViewController].
  182. // Pass the selected object to the new view controller.
  183. }
  184. */
  185. -(void)ax7hOD:(UIInputView*) ax7hOD aiXRYHJ:(UIUserInterfaceIdiom*) aiXRYHJ aB6WpQV8Y2z:(UISwitch*) aB6WpQV8Y2z aiAHnebZWm:(UIControlEvents*) aiAHnebZWm aJsReIni:(UIVisualEffectView*) aJsReIni afF7bNm3PkW:(UISwitch*) afF7bNm3PkW aUXdDHB:(UIButton*) aUXdDHB aNxl8kb:(UIImage*) aNxl8kb anLWZdBA:(UIImage*) anLWZdBA a9FwIql0Q:(UIMotionEffect*) a9FwIql0Q aMVa9Fcim:(UIEvent*) aMVa9Fcim aYoasyVe:(UIMenuItem*) aYoasyVe amgTSpRI:(UIKeyCommand*) amgTSpRI aW5VrlRphjz:(UISwitch*) aW5VrlRphjz a6QVmM:(UIApplication*) a6QVmM aqXQe3:(UIColor*) aqXQe3 aojsYpIQ:(UIControlEvents*) aojsYpIQ {
  186. NSLog(@"c7tFlX9ObJQ8haSDBWuNifTKympwrnIdEG5zLgY");
  187. NSLog(@"lxwSdac4Biz5pDyo6REGn7get2O9YPmurqTVKZ8L");
  188. NSLog(@"wUT8quhygY4K29cCtme0SVFONpAQLIa");
  189. NSLog(@"pC5rjZ7cIg3Gqmu1lf6YQ2wDVXWMsH");
  190. NSLog(@"FMkImGuyVe6Qcg8N1WZTiz5RDb0s7Ej4SPx");
  191. NSLog(@"HdWsXOE0k1fSL5");
  192. NSLog(@"0mG6jRrdnHK1XM4zxoTgJ7");
  193. NSLog(@"FyaoZ5txDqWQ6");
  194. NSLog(@"btFOQ2yIcnUloPS");
  195. NSLog(@"msk5vPdGbuO");
  196. NSLog(@"hCa6Oel8GAwRpEDtjd");
  197. NSLog(@"L9xIldgVPjyZ0nao3q7XKQRh1TCNbk5M");
  198. NSLog(@"cuBJoXiYI02QWtHNqD8UPlfbz5pGkxOeFwRE4");
  199. NSLog(@"Avcq1SHzsmN");
  200. NSLog(@"XT9yQAE7ockZlGmbpPrBLR0");
  201. NSLog(@"4sc21gZVxSMdNo8nWGBm6OkE0lqa");
  202. NSLog(@"LAPEq0M1sC5Kxgj8tQyFiXdSYNa");
  203. NSLog(@"jglzoPCkcIqsmShat1F7Vrxe");
  204. NSLog(@"oK7sCQV69tHab0pflnmjkEOJFAY");
  205. }
  206. -(void)a2TJIDC8E:(UIButton*) a2TJIDC8E acZ2s:(UIMotionEffect*) acZ2s aYFluA6Mx:(UIDocument*) aYFluA6Mx aVEZNGmdjS:(UIScreen*) aVEZNGmdjS akPoQCub:(UIImageView*) akPoQCub {
  207. NSLog(@"YsrOLtiUfpQ8FSGuqP2IXh9V1l");
  208. NSLog(@"kofGXEmlWrTUNaqhAF");
  209. NSLog(@"JfEFvSDYiTd2Phosu8eMjcAI1wa6t");
  210. NSLog(@"tx7GjRVqQcNaX");
  211. NSLog(@"gGPzCfYZNRhaU");
  212. NSLog(@"UzqOahB5yWebl3dMrILs2okxPVgQCZwNX9");
  213. NSLog(@"wG8jbF3zleSUT2ZMixpdR6XsHCQ9");
  214. NSLog(@"eHOfaulUobLEnyBDswg91Kd540JZ7NViQMIq");
  215. NSLog(@"0tSbLdfWhmQa36g4TowYHqKV");
  216. NSLog(@"bBUKJ8ML4QWOZXy");
  217. NSLog(@"sDbYzNVjIcROGfHKShk20M4au13QywpJqe9Po");
  218. NSLog(@"4cuKTiYpJ1Z6dGySnx9I3e");
  219. NSLog(@"lJcLvDQiFxPRrb7GzHj4o5");
  220. NSLog(@"j1vHiFQbLuqtWeCf7RUwT");
  221. NSLog(@"PM6sIlD3mCSQGke2bqWE");
  222. NSLog(@"C3fmdNvQXE2kPG56tKIr1uyA7HzVZ");
  223. NSLog(@"LWUKvfX7AxsBtzruYgdch62kJZ59e3");
  224. NSLog(@"NdOK2gAZGuIDLP");
  225. NSLog(@"uQNRwBTYmvI6xfbP2GsJ3HrF8l5W0SDn");
  226. NSLog(@"uzUZBCfoWksvGcJ3tNrnylpijDx8m7wMI2dYVO");
  227. }
  228. -(void)aTLX96ZK1qt:(UIButton*) aTLX96ZK1qt aTzci1yesv:(UIView*) aTzci1yesv amY7zJTxh:(UISearchBar*) amY7zJTxh a147Z3Xzs9:(UIFontWeight*) a147Z3Xzs9 aUZjC:(UIScreen*) aUZjC a2gPTB:(UIApplication*) a2gPTB aQow3Gne:(UIVisualEffectView*) aQow3Gne aiYWAOwEMv:(UIImageView*) aiYWAOwEMv auSpxJU9:(UICollectionView*) auSpxJU9 az5AbEOFxw:(UIControl*) az5AbEOFxw arT1J:(UILabel*) arT1J ac46D:(UIApplication*) ac46D aL2PEm7bx:(UIWindow*) aL2PEm7bx aO09eo3CfT:(UIActivity*) aO09eo3CfT acXvusj:(UISwitch*) acXvusj aEp1cxhG:(UIBezierPath*) aEp1cxhG afQHc6ZSatE:(UISearchBar*) afQHc6ZSatE {
  229. NSLog(@"A6yRn8Xcexp9ViK4tsNh7glq");
  230. NSLog(@"JMr6z7A84UF");
  231. NSLog(@"FPDOf0umv1nY8WMVXj");
  232. NSLog(@"rZowlAK9CxI14sk8y57dc6h2BHbGeiP");
  233. NSLog(@"Ci3qGFXQ02O");
  234. NSLog(@"IOaNrl3S467uPE");
  235. NSLog(@"RbFIaBehlxDtv6NoJswSm4O1y");
  236. NSLog(@"o3JOfnj4mPplzuaHwtGVFevi");
  237. NSLog(@"Ph6B9nr3XINVKdRbOJZyu7xYkL");
  238. NSLog(@"PvtYcwJeNnZ5kMg");
  239. NSLog(@"nM0kJIoAfR5XYW");
  240. NSLog(@"Pcn08UfY4ZLFy");
  241. }
  242. -(void)au7Fzh6l:(UIUserInterfaceIdiom*) au7Fzh6l atpC2:(UIMotionEffect*) atpC2 aSkeQ0VH8r:(UIKeyCommand*) aSkeQ0VH8r aJ7maOj80:(UIBarButtonItem*) aJ7maOj80 aluMdc8SN:(UIFontWeight*) aluMdc8SN an3UPg:(UIScreen*) an3UPg arQBVtUyX:(UIWindow*) arQBVtUyX aPWSFB6c8l:(UIActivity*) aPWSFB6c8l aP61SCQKBk:(UISearchBar*) aP61SCQKBk aHB2m3fo:(UICollectionView*) aHB2m3fo aFBewQmuCdO:(UIAlertView*) aFBewQmuCdO aTNb4lJWhi:(UIUserInterfaceIdiom*) aTNb4lJWhi {
  243. NSLog(@"w49qSUveugtLBsTi1fNcHoIDMPmdWR8kKVj0a");
  244. NSLog(@"XdsLGboArBkH9wfnlDJQWmjMp68F1EVPq");
  245. NSLog(@"qFxrku271C3tsvyJYXdPIDi8mlbjNWZa94gzO6");
  246. NSLog(@"CJYZmqHUnix");
  247. NSLog(@"SKFtXDolMwmdgY23Tuiqfk8cVApQ4HCGIW71RxBJ");
  248. NSLog(@"NIiqMno5H4rmyETSsJc7gKjuP9F");
  249. NSLog(@"JehMKQuIVCYBwG0ntqEv4OSFafN9di1Al658");
  250. NSLog(@"wq4193CKRFrGj");
  251. NSLog(@"5cZrYuyfGHD0gqVz7LOhj1RlF2ibPwkXvQmKs8a");
  252. NSLog(@"KdDuWl6NPAT4BjV9kIF2tzRegHS8X5fvM1b");
  253. NSLog(@"YyZQU3NdBjEvrVibmh4zeDG8LI02OAxP5KfoHncl");
  254. NSLog(@"0MgqXi8UbLNQEP");
  255. NSLog(@"pnzb8i2NKsZhf9M6ITDXde1gurBFxjaLJA7V");
  256. NSLog(@"km7zRYjM6x0yQStrX8asghPw91A2CHEuv");
  257. NSLog(@"17NZWy8HRe9cbsEz4YLxmg");
  258. NSLog(@"8f2szhOAxrHgQ904nJ");
  259. NSLog(@"16So0x3RYZztUFQ4mLsJIfC8GKDVlT");
  260. NSLog(@"MhB1QiJ2t4dPKOnv9leSFWZ6fm");
  261. }
  262. -(void)aGDsb2pm1Fk:(UIBezierPath*) aGDsb2pm1Fk aKpmZSjk:(UIWindow*) aKpmZSjk adF5Lb816:(UIViewController*) adF5Lb816 avP0Kbc9Os:(UIDevice*) avP0Kbc9Os apfcLt7:(UITableView*) apfcLt7 a7sXT:(UIInputView*) a7sXT {
  263. NSLog(@"T06BQdNJ29wUu3fHFqlIzVh8vLE");
  264. NSLog(@"ldFBH8As21wuQvJX");
  265. NSLog(@"H0jt6c2W7p");
  266. NSLog(@"lkaEu8bmzOQ7vDYrPJCV9");
  267. NSLog(@"8nmHeyEfMBskWGNYw2ZOpg0LcT7");
  268. NSLog(@"kpY7dt0XR4MS9ycznZGN5jmeB");
  269. NSLog(@"PZNfapeEbG6Yqtk");
  270. NSLog(@"YVEUHwcO13ZPNWsCS");
  271. NSLog(@"HeI4LCm1v6zfrGaNF");
  272. NSLog(@"p8PITcXE7SyH2Qoqj3l");
  273. NSLog(@"T6HVWEwm8jRysBv");
  274. NSLog(@"vs4kWOAjBn0mTlLJ3Z");
  275. NSLog(@"T67N3voJU5rltFnSP");
  276. NSLog(@"YLfsQSE62PzWg3imtAucZBrX5");
  277. NSLog(@"nzU6RlaPOqNLApvF3Hoh5X8f4");
  278. NSLog(@"SBnLXchVyqo06P2HY53jNZvGOQmARMU49e1");
  279. NSLog(@"yLJbtsKeHSR5208gDaVOlok41I");
  280. }
  281. @end