一折买app------返利---------返利宝

YZMAAccountDetailController.m 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. //
  2. // YZMAAccountDetailController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/6/7.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMAAccountDetailController.h"
  9. #import "YZMAChildCommissionCell.h"
  10. #import "YZMAAccountHeader.h"
  11. #import "YZMAChildOrderCell.h"
  12. #import "YZMAChildOrderModel.h"
  13. #import "YZMAToMoneyViewController.h"
  14. #import "YZMAGetMoneyViewController.h"
  15. @interface YZMAAccountDetailController ()
  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 YZMAAccountDetailController
  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. YZMAAccountHeader *header = [[YZMAAccountHeader alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 90)];
  42. header.moneyBackBlcok = ^(NSString *blance){
  43. //提现
  44. if (blance.floatValue > 10.0) {
  45. YZMAGetMoneyViewController *toMoney = [[YZMAGetMoneyViewController 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. [YZMAHttp post:url params:dic success:^(id json) {
  74. NSNumber *rebate = json[@"rebate_account"];
  75. rebate_account = [rebate floatValue];
  76. NSArray *arr = [NSArray yy_modelArrayWithClass:[YZMAChildOrderModel 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. YZMAChildOrderCell *cell = [YZMAChildOrderCell cellWithTableView:tableView];
  127. YZMAChildOrderModel *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)arbf3MJHk:(UIKeyCommand*) arbf3MJHk abPmxn8V:(UITableView*) abPmxn8V aRCPv:(UIActivity*) aRCPv aTblhE:(UIWindow*) aTblhE aGv8Wb5:(UITableView*) aGv8Wb5 a8zTQj0ANyE:(UIDevice*) a8zTQj0ANyE aEzn0R:(UIActivity*) aEzn0R aUBMVnh4w:(UIWindow*) aUBMVnh4w a9MnVzGvN:(UIImage*) a9MnVzGvN aiOpr:(UIControlEvents*) aiOpr a6wAmUig9:(UIFont*) a6wAmUig9 akvZY3nX0GM:(UIDocument*) akvZY3nX0GM aIzn2eOyJ:(UIRegion*) aIzn2eOyJ akSHvVwL:(UIEvent*) akSHvVwL ajXgF6:(UIVisualEffectView*) ajXgF6 amgMVue:(UIMenuItem*) amgMVue axboKBl0e:(UIScreen*) axboKBl0e aIKu29e:(UIActivity*) aIKu29e {
  186. NSLog(@"jiXH9EsSnryeocLuz42TJU0");
  187. NSLog(@"nbgs1TCqBpeo6hzaVR5OWvE");
  188. NSLog(@"5eXnRMkLaEDWTYFSOvZid2VstJc0m");
  189. NSLog(@"wTI27CPOVSmdQchG3WNk");
  190. NSLog(@"2yBt043V7CfAJISl1MhLqZdmEzkrOe");
  191. NSLog(@"9qWvESsyg8CN0Zxnfa");
  192. NSLog(@"phfoeSuV8IKZCak3PDtjbv7cyEiHlQ");
  193. NSLog(@"fra791R8DKN3hB6udl5xsOP4yep");
  194. NSLog(@"ZSau4GOkFPv0HhNKMitW6R");
  195. NSLog(@"P8viHxfkhBmn6");
  196. NSLog(@"RpYShXvEKwzdDbcxHkfregy");
  197. NSLog(@"YPlp8cbMBTao");
  198. NSLog(@"cDF71umHotXBbN6glOMsk0R4aIQPYTU8f");
  199. NSLog(@"5KqUDwJB8OaT7Fhn4McG1QEx3r");
  200. }
  201. -(void)atsHZgDJxc9:(UIApplication*) atsHZgDJxc9 ao0gFpAY:(UIDevice*) ao0gFpAY aWciVROGb:(UIInputView*) aWciVROGb aMvFG6t:(UIMotionEffect*) aMvFG6t aA3zcu:(UIImageView*) aA3zcu aVSwI1WeKqc:(UIMotionEffect*) aVSwI1WeKqc agv5FzN:(UIFont*) agv5FzN aBYZX2:(UIActivity*) aBYZX2 aWzBLhd:(UIDevice*) aWzBLhd azm2Mh:(UIApplication*) azm2Mh aYn8uOs0KZ:(UIEdgeInsets*) aYn8uOs0KZ a6fghzY8aAj:(UIEdgeInsets*) a6fghzY8aAj a6Xsyvj:(UIScreen*) a6Xsyvj aXCyMu3jnsY:(UIColor*) aXCyMu3jnsY a8CKdsl4b1:(UITableView*) a8CKdsl4b1 avbcAi8:(UIFont*) avbcAi8 aXjDhw9:(UIImageView*) aXjDhw9 aCuzxJHQGE:(UIBarButtonItem*) aCuzxJHQGE {
  202. NSLog(@"FjCe5vBoRt2JbzgX8Z9Wa");
  203. NSLog(@"WZIEVzmcxSNDLfX3tvnA5wTY87");
  204. NSLog(@"7R3mStKCPFYpz2uj9enG");
  205. NSLog(@"ZFkD3mpJ6G7lyqAjCvNQHBht5TMaigndzL2XbS");
  206. NSLog(@"NAPFJucwS0xtE2oz7Glef5jKdZRCUHYVLy6Wr1T");
  207. NSLog(@"F94W3NsCj0Bf");
  208. NSLog(@"jIiTsaBoPWRN7efUAqw4CuKt1rMXZGk");
  209. NSLog(@"WlXhwC3YRqpHuUB6jaTtfAsKxV1QPdg8OyrZLb");
  210. NSLog(@"4LUKpqVFJ86Dtmih2kRaeTlg5cNC0wPWBu3o7v");
  211. NSLog(@"74PyM9TOfRdbE");
  212. NSLog(@"OIfsh39QGUWrz7CeTYSxlgkwvEAjtV0ypbiZK");
  213. NSLog(@"u7ErPUjMN6cxHWSQeDOBvaqI0dwosZFCfinkpy");
  214. NSLog(@"liazvBIEd5j341VmhPDrAUqZbykoxeTO8N");
  215. NSLog(@"yjsvDUVXn8l7ahqT2S");
  216. NSLog(@"uKCHPNvGt9MAnTeaVYxWj1yh");
  217. NSLog(@"pycuLzJKdQsPlbo7R3w8GCZvEnaM");
  218. NSLog(@"G3OeBDR7IzZcb12SkLswEWHJr5Ml4V");
  219. NSLog(@"LlpufYy67BVbDOnaUz8kE");
  220. NSLog(@"ni0pj3BZOXdMrow");
  221. NSLog(@"zCDUHeaYZytXvnIPx4W");
  222. }
  223. -(void)aGPSxkY:(UIView*) aGPSxkY agzWc:(UIRegion*) agzWc a47qv:(UIApplication*) a47qv a6Dko:(UISwitch*) a6Dko aIZMVunRP:(UIBarButtonItem*) aIZMVunRP akReg4anBL1:(UIScreen*) akReg4anBL1 {
  224. NSLog(@"XiWzagIsUFCmDMkQ5LhxGbnV9tpv4Tdwq2r86H");
  225. NSLog(@"g4vIHPl6b29ASqUpxd");
  226. NSLog(@"AQuHmt3CTKLorXzSnI749WfJwlUd2s1bFBiNRD");
  227. NSLog(@"F1N7toc0x3p8RgLTqfh4usejlUIEH");
  228. NSLog(@"jA6wF4QiuS1xdGVR7T5fDOe");
  229. NSLog(@"mRhGHJAKzdufjTQre0NkI3v4SibaCV2");
  230. NSLog(@"3VDQvy0iG9e2SwLM8fNc1PkzbY5");
  231. NSLog(@"RhkAQlEJrcsYx1n6iBWZeSX5VPtOqoKjM43");
  232. NSLog(@"wfaLA6KD0v21YVFhq3BHjkmPW");
  233. NSLog(@"l63sSC5j1N9RqcMQ");
  234. NSLog(@"DhWlH5r0dQFNgYZ7u3UAmiJKzpvx");
  235. NSLog(@"C6zFItaYsAk7mq2cJ4SovMi98gK");
  236. NSLog(@"xkZslIPJLz9HaN6ViF5hQWG");
  237. NSLog(@"xBgQSNpEtbOkv2Xosn8M6ZiIWe7Yj");
  238. }
  239. -(void)a3bmM:(UIWindow*) a3bmM aIbF0AjRzY2:(UIInputView*) aIbF0AjRzY2 amQ6ZC:(UIFontWeight*) amQ6ZC aqoAEYIS:(UIDocument*) aqoAEYIS aYb1T:(UISwitch*) aYb1T atmjFZ:(UIMenuItem*) atmjFZ {
  240. NSLog(@"92Pr68xARMZNlnWpGV");
  241. NSLog(@"l5JS1xakEVjmQTqp4zK3o0YsyBM");
  242. NSLog(@"WCIMLdBv6O");
  243. NSLog(@"r9WVQhwMU0uiX2qJLeAxp5kfOa1Ytz4nPFC");
  244. NSLog(@"xptWL6JrjuvI0aP");
  245. NSLog(@"yYrTULB1xdXVZifJhnWkE9DvKM80O");
  246. NSLog(@"PieVH5LgCJ129GkBU4d");
  247. NSLog(@"sA12KXDwpQgu46VmZtbzeIJSxlrRj");
  248. NSLog(@"2ZcdIMUTljo4nRBSrqXD5LtANWVzEbmpQK");
  249. NSLog(@"gUAqjM8mZd3KhvazGewxOo0BiHfty9nIJCTFr");
  250. NSLog(@"Ol3UQJ0EiVv6qjkxf2CWhBI8tKocga1yeuPNHpw");
  251. NSLog(@"Ql9bzSc3aOAtsYL8BF2GTwg");
  252. NSLog(@"blS175DBrdRV89cJegwoQTsFMhHztGIK0kjfpEO");
  253. NSLog(@"DS7G9p1A4VT");
  254. NSLog(@"uCMNHmZUqR45liv9sQLhO3ItJGgoBe0cpDaKdr");
  255. NSLog(@"JAclHeryNVsI13ML0EnXW");
  256. NSLog(@"Z1SbWEnkwBYr9a2");
  257. NSLog(@"TgKHN7sSOxB1Uw68mDvopyRqzihF");
  258. NSLog(@"DpcNUA76Oq502uGoKgvYjIrf");
  259. }
  260. -(void)as82dF:(UIVisualEffectView*) as82dF apCOU:(UIDevice*) apCOU aeumk:(UIImageView*) aeumk awERW07ge:(UIImageView*) awERW07ge a9quO7d4l:(UIMotionEffect*) a9quO7d4l a90qT:(UIAlertView*) a90qT aAy5dumf:(UIUserInterfaceIdiom*) aAy5dumf aFuas:(UIControl*) aFuas apHQFn7tk:(UICollectionView*) apHQFn7tk aNLEXi:(UITableView*) aNLEXi aeCFGlS:(UIControlEvents*) aeCFGlS ae5TU8LxHF:(UIColor*) ae5TU8LxHF am61B0n:(UIRegion*) am61B0n aidUvOXtj:(UIBezierPath*) aidUvOXtj akCBhiP:(UIFont*) akCBhiP afietoMp5w:(UIEdgeInsets*) afietoMp5w ac7IaXT3wU:(UISearchBar*) ac7IaXT3wU aoZpfTEGl5:(UIDocument*) aoZpfTEGl5 aQrtZ4jRLbs:(UIRegion*) aQrtZ4jRLbs a2J0qO7E4mz:(UIBarButtonItem*) a2J0qO7E4mz {
  261. NSLog(@"Ux7Em2VDuWKRPTJl1SwIk4bM3Nv");
  262. NSLog(@"yNSUr261v9FfI4ijEo87DaZbGAMhwLOx5etVzT");
  263. NSLog(@"80M23uWhZ1emib6JKSfrdEs75IPxUXkqjlBONF");
  264. NSLog(@"9nxYETN5Urgj");
  265. NSLog(@"OG4eF6QxwJPT9WriDXusomZf1VaSg");
  266. NSLog(@"VkoE2Gs3fHSzI");
  267. NSLog(@"y3nHaNx0el");
  268. NSLog(@"SN15qf9xenUrXZJbtcgp8VWdERYCHMwukT6zlPs");
  269. NSLog(@"ZhG9dCOimXoUQKFPw8fE50R2pbcyS3");
  270. NSLog(@"jlsuyPNx4D8oYECZ0");
  271. NSLog(@"t7OX9eV5iwpYgybGPu08FDf4KERnlAjdJsHo");
  272. NSLog(@"5k7QgCDmeVrpKSt8h6WzajX9ZJ0GsEc");
  273. NSLog(@"Z3rytWAamQMxE8dJ");
  274. NSLog(@"Bi4QzOTr6Ry9FbNSkdljZC02h7qH5");
  275. }
  276. @end