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

LZMGetMoneyViewController.m 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. //
  2. // LZMGetMoneyViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/6/5.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMGetMoneyViewController.h"
  9. #import "LZMGetMoneyNextViewController.h"
  10. #import "LZMToMoneyViewController.h"
  11. @interface LZMGetMoneyViewController ()<UITextFieldDelegate>
  12. @property(nonatomic,strong)UIView *userView;
  13. @property(nonatomic,strong)UIView *moneyView;
  14. @property(nonatomic,strong)UIButton *getMoneyBtn;
  15. @property(nonatomic,strong)UILabel *bottomLabel;
  16. @end
  17. @implementation LZMGetMoneyViewController
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. // self.view.backgroundColor=[UIColor YHColorWithHex:0xF2F2F2];
  21. self.view.backgroundColor=[UIColor whiteColor];
  22. [self configNavigationBar];
  23. [self addUI];
  24. [self adjustUI];
  25. }
  26. -(void)viewWillAppear:(BOOL)animated{
  27. [super viewWillAppear:animated];
  28. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  29. }
  30. - (void)configNavigationBar {
  31. [self.navigationBar setNavTitle:@"提现"];
  32. self.navigationBar.backgroundColor = [UIColor changeColor];
  33. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  34. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  35. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  36. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  37. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  38. UIButton *rightBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 80, 40)];
  39. [rightBtn setTitle:@"提现记录" forState:UIControlStateNormal];
  40. [rightBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  41. rightBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  42. [rightBtn addTarget:self action:@selector(gotoMoneyHistory) forControlEvents:UIControlEventTouchUpInside];
  43. [self.navigationBar setCustomRightButtons:@[rightBtn]];
  44. }
  45. - (void)gotoMoneyHistory {
  46. LZMToMoneyViewController *money = [[LZMToMoneyViewController alloc] init];
  47. [self.navigationController pushViewController:money animated:YES];
  48. }
  49. -(void)addUI{
  50. [self.view addSubview:self.userView];
  51. [self.view addSubview:self.moneyView];
  52. [self.view addSubview:self.getMoneyBtn];
  53. [self.view addSubview:self.bottomLabel];
  54. }
  55. -(void)adjustUI{
  56. [self.userView mas_makeConstraints:^(MASConstraintMaker *make) {
  57. make.left.right.mas_equalTo(0);
  58. make.top.mas_equalTo(74);
  59. make.height.mas_equalTo(80);
  60. }];
  61. [self.moneyView mas_makeConstraints:^(MASConstraintMaker *make) {
  62. make.left.right.mas_equalTo(0);
  63. make.top.equalTo(self.userView.mas_bottom);
  64. make.height.mas_equalTo(144);
  65. }];
  66. [self.getMoneyBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  67. make.top.equalTo(self.moneyView.mas_bottom).offset(25);
  68. make.centerX.equalTo(self.view.mas_centerX);
  69. make.height.mas_equalTo(42);
  70. make.width.mas_equalTo(FITSIZE(250));
  71. }];
  72. [self.bottomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  73. make.top.equalTo(self.getMoneyBtn.mas_bottom).offset(15);
  74. make.left.right.mas_equalTo(0);
  75. }];
  76. UIView *imgView=[self.userView viewWithTag:10001];
  77. [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
  78. make.left.mas_equalTo(FITSIZE(15));
  79. make.centerY.equalTo(self.userView.mas_centerY);
  80. make.height.width.mas_equalTo(54);
  81. }];
  82. UIView *nameLabel=[self.userView viewWithTag:10002];
  83. [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  84. make.left.equalTo(imgView.mas_right).offset(FITSIZE(14));
  85. make.top.equalTo(imgView.mas_top).offset(5);
  86. }];
  87. UIView *getFriendLabel=[self.userView viewWithTag:10003];
  88. [getFriendLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  89. make.left.equalTo(nameLabel.mas_left);
  90. make.bottom.equalTo(imgView.mas_bottom).offset(-3);
  91. }];
  92. UIView *YView=[self.moneyView viewWithTag:20002];
  93. [YView mas_makeConstraints:^(MASConstraintMaker *make) {
  94. make.left.mas_equalTo(FITSIZE(35));
  95. make.bottom.mas_equalTo(-41);
  96. make.width.mas_equalTo(25);
  97. }];
  98. UIView *lineView=[self.moneyView viewWithTag:20005];
  99. [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
  100. make.left.equalTo(YView.mas_left);
  101. make.right.mas_equalTo(FITSIZE(-35));
  102. make.top.equalTo(YView.mas_bottom);
  103. make.height.mas_equalTo(1);
  104. }];
  105. UIView *allMoneyView=[self.moneyView viewWithTag:20004];
  106. [allMoneyView mas_makeConstraints:^(MASConstraintMaker *make) {
  107. make.top.equalTo(lineView.mas_bottom).offset(10.5f);
  108. make.right.mas_equalTo(lineView.mas_right);
  109. make.width.mas_equalTo(60);
  110. }];
  111. UIView *allowGetMoneyLabel=[self.moneyView viewWithTag:20006];
  112. [allowGetMoneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  113. make.left.equalTo(YView.mas_left);
  114. make.centerY.equalTo(allMoneyView.mas_centerY);
  115. }];
  116. UIView *textView=[self.moneyView viewWithTag:20003];
  117. [textView mas_makeConstraints:^(MASConstraintMaker *make) {
  118. make.left.equalTo(YView.mas_right).offset(FITSIZE(5));
  119. make.right.equalTo(allMoneyView.mas_left).offset(FITSIZE(-5));
  120. make.height.mas_equalTo(YView.mas_height);
  121. make.top.equalTo(YView.mas_top);
  122. }];
  123. }
  124. #pragma mark -代理
  125. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
  126. if ([@"" isEqualToString:string]) {
  127. return YES;
  128. }
  129. if ([@"0123456789" rangeOfString:string].location!= NSNotFound) {
  130. return YES;
  131. }
  132. if ([@"." isEqualToString:string]) {
  133. if (textField.text.length>0&&[textField.text rangeOfString:@"."].location==NSNotFound) {
  134. return YES;
  135. }
  136. }
  137. return NO;
  138. }
  139. #pragma mark -事件响应
  140. - (void)backAction {
  141. [self.navigationController popViewControllerAnimated:YES];
  142. }
  143. - (void)setMoneyStr:(NSString *)moneyStr{
  144. _moneyStr=moneyStr;
  145. UILabel *moneyStrLabel=[self.moneyView viewWithTag:20006];
  146. moneyStrLabel.text=[NSString stringWithFormat:@"可提现余额 ¥%@",moneyStr];
  147. }
  148. #pragma mark -懒加载
  149. -(UIView *)userView{
  150. if (!_userView) {
  151. _userView=[[UIView alloc]init];
  152. _userView.hidden=YES;
  153. _userView.backgroundColor=[UIColor whiteColor];
  154. UIImageView *imgView=[[UIImageView alloc]init];
  155. imgView.layer.cornerRadius=27;
  156. imgView.layer.masksToBounds=YES;
  157. imgView.backgroundColor=[UIColor redColor];
  158. UILabel *nameLabel=[[UILabel alloc]init];
  159. nameLabel.text=@"用户名";
  160. [nameLabel sizeToFit];
  161. nameLabel.textColor=[UIColor YHColorWithHex:0x343434];
  162. nameLabel.font=[UIFont systemFontOfSize:16];
  163. UILabel *getFriendLabel=[[UILabel alloc]init];
  164. getFriendLabel.text=@"邀请码:------";
  165. [getFriendLabel sizeToFit];
  166. getFriendLabel.textColor=[UIColor YHColorWithHex:0x343434];
  167. getFriendLabel.font=[UIFont systemFontOfSize:14];
  168. imgView.tag=10001;
  169. nameLabel.tag=10002;
  170. getFriendLabel.tag=10003;
  171. [_userView addSubview:imgView];
  172. [_userView addSubview:nameLabel];
  173. [_userView addSubview:getFriendLabel];
  174. }
  175. return _userView;
  176. }
  177. -(UIView *)moneyView{
  178. if (!_moneyView) {
  179. _moneyView=[[UIView alloc]init];
  180. _moneyView.backgroundColor=[UIColor clearColor];
  181. UILabel *YLabel=[[UILabel alloc]init];
  182. YLabel.text=@"¥";
  183. YLabel.textColor=[UIColor YHColorWithHex:0x333333];
  184. YLabel.font=[UIFont systemFontOfSize:20];
  185. [YLabel sizeToFit];
  186. UITextField *textField=[[UITextField alloc]init];
  187. textField.placeholder=@"输入提现金额";
  188. textField.textColor=[UIColor blackColor];
  189. textField.font=[UIFont systemFontOfSize:14];
  190. textField.keyboardType=UIKeyboardTypeDecimalPad;
  191. textField.delegate=self;
  192. UIButton *allMoneyBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  193. [allMoneyBtn setTitle:@"全部提现" forState:UIControlStateNormal];
  194. [allMoneyBtn setTitleColor:[UIColor YHColorWithHex:0xFF5200] forState:UIControlStateNormal] ;
  195. [[allMoneyBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
  196. if (self.moneyStr) {
  197. UITextField *textField=[self.view viewWithTag:20003];
  198. textField.text=self.moneyStr;
  199. }
  200. }];
  201. allMoneyBtn.titleLabel.font=[UIFont systemFontOfSize:12];
  202. [allMoneyBtn sizeToFit];
  203. UIView *lineView=[[UIView alloc]init];
  204. lineView.backgroundColor=[UIColor YHColorWithHex:0xD8D8D8];
  205. UILabel *allowGetMoneyLabel=[[UILabel alloc]init];
  206. allowGetMoneyLabel.textColor=[UIColor YHColorWithHex:0x717171];
  207. allowGetMoneyLabel.font=[UIFont systemFontOfSize:12];
  208. allowGetMoneyLabel.text=@"可提现余额 ¥-.--";
  209. [allowGetMoneyLabel sizeToFit];
  210. YLabel.tag=20002;
  211. textField.tag=20003;
  212. allMoneyBtn.tag=20004;
  213. lineView.tag=20005;
  214. allowGetMoneyLabel.tag=20006;
  215. [_moneyView addSubview:YLabel];
  216. [_moneyView addSubview:textField];
  217. [_moneyView addSubview:allMoneyBtn];
  218. [_moneyView addSubview:lineView];
  219. [_moneyView addSubview:allowGetMoneyLabel];
  220. }
  221. return _moneyView;
  222. }
  223. -(UIButton *)getMoneyBtn{
  224. if (!_getMoneyBtn) {
  225. _getMoneyBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  226. _getMoneyBtn.layer.cornerRadius=21;
  227. [_getMoneyBtn setTitle:@"申请提现" forState:UIControlStateNormal];
  228. _getMoneyBtn.backgroundColor=[UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xFF9000] toColor:[UIColor YHColorWithHex:0xFF5000] withWidth:FITSIZE(250)];
  229. [[_getMoneyBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
  230. LZMGetMoneyNextViewController *vc=[[LZMGetMoneyNextViewController alloc]init];
  231. UITextField *textFiled=[self.view viewWithTag:20003];
  232. vc.moneyStr=textFiled.text;
  233. if ([vc.moneyStr floatValue]>=10) {
  234. [self.navigationController pushViewController:vc animated:YES];
  235. }else{
  236. [MBProgressHUD showMessage:@"提现金额最低为10元哦"];
  237. }
  238. }];
  239. }
  240. return _getMoneyBtn;
  241. }
  242. -(UILabel *)bottomLabel{
  243. if (!_bottomLabel) {
  244. _bottomLabel=[[UILabel alloc]init];
  245. _bottomLabel.text=@"3个工作日内到账";
  246. _bottomLabel.textColor=[UIColor YHColorWithHex:0x666666];
  247. _bottomLabel.font=[UIFont systemFontOfSize:12];
  248. _bottomLabel.textAlignment=NSTextAlignmentCenter;
  249. [_bottomLabel sizeToFit];
  250. }
  251. return _bottomLabel;
  252. }
  253. -(void)a7cm4lIq:(UIBarButtonItem*) a7cm4lIq aMijCaq:(UIBarButtonItem*) aMijCaq az5r3cCxh:(UIDevice*) az5r3cCxh aDwgVisbql:(UIInputView*) aDwgVisbql a8aq2wye:(UITableView*) a8aq2wye a2JECPFz:(UIRegion*) a2JECPFz aMiKgQ:(UIApplication*) aMiKgQ aZRLQxujz:(UIColor*) aZRLQxujz amAfgNt12:(UIBarButtonItem*) amAfgNt12 aI5pX3:(UIEvent*) aI5pX3 aKIVtf8Zhw:(UILabel*) aKIVtf8Zhw {
  254. NSLog(@"Xi9muY58UsdORq6CpDlbWAE2SZIj");
  255. NSLog(@"yWXilKCAUFaSnTEsDfM9dHucwbr2O86tLvQ5");
  256. NSLog(@"EwVPjRJh8vi2oGTc64QkOC0LAKd");
  257. NSLog(@"TZeGntECqkLOl6gd8aJz9x");
  258. NSLog(@"gPsb5wl4KDX8IEW7juaf");
  259. NSLog(@"26TR1yaQwMDdWLlSZG8Fc");
  260. NSLog(@"fRQxCFhHD5uMePYqb0gdcSky473arWltmBV69s");
  261. NSLog(@"cfrzxbR2qQZpBJ46Etn");
  262. NSLog(@"Crek61oydRnTDhYucpv0NxZEMUQH5XtIz2S");
  263. NSLog(@"uoBMCs9JaE0QOZlwVdh");
  264. NSLog(@"DHTfZO7b5RN14XsMLgGFP3WoYiUmK9jA");
  265. NSLog(@"j9FAGIHl56av1TNYsqSrug8Lf");
  266. NSLog(@"H59m6MtI3Zg8");
  267. NSLog(@"7s0NpHqSfnJa6BbLMtxyC");
  268. }
  269. -(void)aknRj1VtEvS:(UIEvent*) aknRj1VtEvS asTyZUwXb:(UIInputView*) asTyZUwXb a2PzZE:(UICollectionView*) a2PzZE a32MuVr4df5:(UIBezierPath*) a32MuVr4df5 a1hHBOwq:(UIBezierPath*) a1hHBOwq aLHkS:(UIRegion*) aLHkS aUE9Fj:(UIMotionEffect*) aUE9Fj apSwDNaE:(UIUserInterfaceIdiom*) apSwDNaE aZdHQuOkxM:(UIDocument*) aZdHQuOkxM akq8IRS:(UICollectionView*) akq8IRS aDuHq9yS:(UIActivity*) aDuHq9yS afa7k3VNrnP:(UIMenuItem*) afa7k3VNrnP a2vF0NIr67m:(UIVisualEffectView*) a2vF0NIr67m aeipd:(UIButton*) aeipd aXvCWAlO:(UIKeyCommand*) aXvCWAlO {
  270. NSLog(@"f0POEosrn3d6lNKb4AtweBvqWVcH5kTzYGZ7h");
  271. NSLog(@"nhOrGlSPsxd1Qy08wWM6aZVYL");
  272. NSLog(@"74lq0ILSHvU6NjhWgsAOZrf3ubm8i1QGp");
  273. NSLog(@"gKLnfyJG6bAmXZzvVwt7RT8SFpxdUqo3");
  274. NSLog(@"UoabKt4Jj3riIpd0RkWMYSAD9V18OzB5Q2f");
  275. NSLog(@"LtVd91efrUTjsnucHQgk2BKPm");
  276. NSLog(@"NYtKJZGwWkab8gC");
  277. NSLog(@"JSRplOyj41t7FK0w");
  278. NSLog(@"OF3hPWXrfdLHIyqYE4c0eQ295tpo");
  279. NSLog(@"CSGuAhU6OzFiRrV8EYLNmQ");
  280. NSLog(@"wVhJqgdYcl6");
  281. NSLog(@"ZSF26b8gw1zKLXiWs5hQBjlaqtOTxHA4ryERcd7");
  282. NSLog(@"vP4B0r1mbpEHykWfN5V6etdaTXGQgoKhZxDuz");
  283. NSLog(@"BTJ0SVRhsrzev94QuCLMH8jlEkIZAxNfnUd");
  284. NSLog(@"JKsVPB5TRFf0bc7xgW");
  285. NSLog(@"a5cHZGYAzMdSFv9q83oLgQpwb2NuklI71ih");
  286. }
  287. -(void)aCzbruB7f:(UISwitch*) aCzbruB7f a0F4bHBw:(UIImage*) a0F4bHBw anvYjXk:(UIFont*) anvYjXk aCwsHQz:(UICollectionView*) aCwsHQz aRTANEwb:(UIInputView*) aRTANEwb atKwR6zGN:(UIScreen*) atKwR6zGN aYePULNiM:(UIEvent*) aYePULNiM almfaVq3:(UICollectionView*) almfaVq3 a9fWHuLUb2:(UIImage*) a9fWHuLUb2 acYI13B2tV:(UIView*) acYI13B2tV {
  288. NSLog(@"XUehRSAmjoQVdYrgtynKfwzuO17kl4E3");
  289. NSLog(@"WlzZKV32ygSB7bfGePLAU");
  290. NSLog(@"C2Bu8N3G70SZlfyK96FHkxJQjaM5osb4WiUnc");
  291. NSLog(@"9zLT4ij1JXIu8vt0Fo5wlZEAspnmKP2Va7yUN3GS");
  292. NSLog(@"wqHvrAIzYVTJDl5uUPBWx7");
  293. NSLog(@"C65bzLk0H9Va3YQf");
  294. NSLog(@"U4b5PRXL3NyDiKGx");
  295. NSLog(@"9xHknAz2pvwtWrG0S");
  296. NSLog(@"DjIdPArbL80CkwUEphlntX");
  297. NSLog(@"v894nsWr1h");
  298. NSLog(@"if4Mu1oBm7LIdHKnZ6tkQNwrvYJDehyES");
  299. NSLog(@"2NYX0iHzTvAp5x8ZwFsPInjMOlUEQ");
  300. NSLog(@"e0OWjrgXzmwa2");
  301. NSLog(@"gXYfVmk7xsPW0qMbET63yvSBA");
  302. NSLog(@"F9HYEXAGbD1pgrJtS0TNwm5jqPfCysoV3nL");
  303. NSLog(@"S2pLOyHeabYqBvIZCNtmx0j");
  304. }
  305. -(void)aGzdO3y:(UIMotionEffect*) aGzdO3y axbsSKpm:(UIEvent*) axbsSKpm aKAY4GH5O9:(UILabel*) aKAY4GH5O9 akZlrMK8:(UIBarButtonItem*) akZlrMK8 ag0nFNlt:(UIButton*) ag0nFNlt aN7mzWKd:(UISearchBar*) aN7mzWKd aRnq2OYoHb4:(UIUserInterfaceIdiom*) aRnq2OYoHb4 aYftiL:(UIApplication*) aYftiL aSmRk:(UIAlertView*) aSmRk ay6lkfT031:(UIApplication*) ay6lkfT031 amaBGsy:(UIButton*) amaBGsy avRLN9u:(UIKeyCommand*) avRLN9u aNclATHVqE:(UIApplication*) aNclATHVqE {
  306. NSLog(@"aquvYX9g3BG4IQWVfxPL");
  307. NSLog(@"B4WZXunIxY8GPLNjwgAVOHFvy5hsJ7S");
  308. NSLog(@"kAupeigL3fVhvy5o4DQzKjaCsUJMrd");
  309. NSLog(@"XAIlFDOp5jLf2oiEB7vZ0kszeStbCTwu91rQU");
  310. NSLog(@"wn6DvFXyehWB895LZKirgN");
  311. NSLog(@"VGM5smC6qaQIFpEhTcJ8d1UKbOxg7keNZLwSHvWi");
  312. NSLog(@"S2MZ0mhV8iOEFd96JsQB");
  313. NSLog(@"14kBLYQWt3V");
  314. NSLog(@"bxJM3KE8z2OFZshvYyBaQWeGn0T1uPpkLHV");
  315. NSLog(@"pmJvfytOPoG7");
  316. NSLog(@"mORt5KPlNkduMgHh71T8QpybEq4GzovsnA");
  317. NSLog(@"sYVozPhce4kjdg6alA");
  318. NSLog(@"OAMzjRCtpLaEHTXsf");
  319. }
  320. @end