两折买改口袋样式

LZMWithdrawNextViewController.m 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. //
  2. // LZMWithdrawNextViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/5/23.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMWithdrawNextViewController.h"
  9. @interface LZMWithdrawNextViewController ()
  10. @property(nonatomic,strong)UILabel *top1Label;
  11. @property(nonatomic,strong)UILabel *top2Label;
  12. @property(nonatomic,strong)UITextField *textField;
  13. @property(nonatomic,strong)UIView *lineView;
  14. @property(nonatomic,strong)UIButton *rightBtn;
  15. @property (nonatomic,strong)UIButton *withdrawBtn;
  16. @end
  17. @implementation LZMWithdrawNextViewController
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. [self addUI];
  21. [self adjustUI];
  22. [self configNavigationBar];
  23. [self rightAction:self.rightBtn];
  24. }
  25. - (void)configNavigationBar {
  26. [self.navigationBar setNavTitle:@"提现"];
  27. self.navigationBar.backgroundColor = [UIColor changeColor];
  28. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  29. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  30. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  31. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  32. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  33. }
  34. #pragma mark -点击方法
  35. - (void)backAction {
  36. [self.navigationController popViewControllerAnimated:YES];
  37. }
  38. -(void)withdrawAction{
  39. [self requestWithdraw];
  40. }
  41. -(void)rightAction:(UIButton *)sender{
  42. //获取验证码
  43. [self requestCode];
  44. [sender startWithTime:20 title:@"重新发送" countDownTitle:@"s" mainColor:[UIColor clearColor] countColor:[UIColor clearColor]];
  45. }
  46. #pragma mark -网络请求
  47. -(void)requestCode{
  48. //获取验证码
  49. NSString *url=[NSString stringWithFormat:@"%@/api/v2/users/sendCode",BaseURL];
  50. NSString *phone=[[NSUserDefaults standardUserDefaults]objectForKey:UserPhone]==nil?@"":[[NSUserDefaults standardUserDefaults]objectForKey:UserPhone];
  51. NSString *ttl = [PublicFunction getNowTimeTimestamp];
  52. NSString *sign = [NSString stringWithFormat:@"phone=%@&ttl=%@%@",phone,ttl,SignCode];
  53. NSString *md5Str = [PublicFunction md5:sign];
  54. NSDictionary *para = @{@"phone":phone,
  55. @"ttl":ttl,
  56. @"sign":md5Str
  57. };
  58. [LZMHttp post:url params:para success:^(id json) {
  59. } failure:^(NSError *error) {
  60. if (error) {
  61. [MBProgressHUD showTip:@"获取失败"];
  62. }
  63. }];
  64. }
  65. -(void)requestWithdraw{
  66. if (self.textField.text &&![@"" isEqualToString:self.textField.text]) {
  67. NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/embodyApplication",BaseURL];
  68. NSDictionary *dic=@{
  69. @"money":self.moneyStr,
  70. @"code":self.textField.text
  71. };
  72. [LZMHttp post:url params:dic success:^(id json) {
  73. [MBProgressHUD showTip:@"提现成功"];
  74. [SVProgressHUD dismissWithDelay:1.0f];
  75. [self.navigationController popToRootViewControllerAnimated:YES];
  76. } failure:^(NSError *error) {
  77. if (error) {
  78. [SVProgressHUD showWithStatus:@"服务器开小差了,请稍后再试"];
  79. [SVProgressHUD dismissWithDelay:1.0f];
  80. }
  81. }];
  82. }
  83. }
  84. -(void)addUI{
  85. [self.view addSubview:self.top1Label];
  86. [self.view addSubview:self.top2Label];
  87. [self.view addSubview:self.lineView];
  88. [self.view addSubview:self.rightBtn];
  89. [self.view addSubview:self.textField];
  90. [self.view addSubview:self.withdrawBtn];
  91. }
  92. -(void)adjustUI{
  93. [self.top1Label mas_makeConstraints:^(MASConstraintMaker *make) {
  94. make.left.mas_equalTo(FITSIZE(20));
  95. make.top.mas_equalTo(94);
  96. }];
  97. [self.top2Label mas_makeConstraints:^(MASConstraintMaker *make) {
  98. make.top.equalTo(self.top1Label.mas_bottom).offset(8);
  99. make.left.equalTo(self.top1Label.mas_left);
  100. }];
  101. [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
  102. make.left.mas_equalTo(FITSIZE(20));
  103. make.right.mas_equalTo(FITSIZE(-20));
  104. make.top.equalTo(self.top2Label.mas_bottom).offset(70);
  105. make.height.mas_equalTo(0.5f);
  106. }];
  107. [self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  108. make.right.equalTo(self.lineView.mas_right);
  109. make.bottom.equalTo(self.lineView.mas_top).offset(-10);
  110. }];
  111. [self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
  112. make.centerY.equalTo(self.rightBtn.mas_centerY);
  113. make.left.equalTo(self.lineView.mas_left);
  114. }];
  115. [self.withdrawBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  116. make.centerX.equalTo(self.view.mas_centerX);
  117. make.top.equalTo(self.lineView.mas_bottom).offset(196);
  118. make.width.mas_equalTo(FITSIZE(250));
  119. make.height.mas_equalTo(42);
  120. }];
  121. }
  122. -(UILabel *)top1Label{
  123. if (!_top1Label) {
  124. _top1Label=[[UILabel alloc]init];
  125. _top1Label.textColor=[UIColor YHColorWithHex:0x333333];
  126. _top1Label.text=@"为了您的账户安全,已给您的手机发送了验证码";
  127. _top1Label.font=[UIFont systemFontOfSize:16];
  128. }
  129. return _top1Label;
  130. }
  131. -(UILabel *)top2Label{
  132. if (!_top2Label) {
  133. _top2Label=[[UILabel alloc]init];
  134. _top2Label.textColor=[UIColor YHColorWithHex:0x333333];
  135. _top2Label.text=@"请输入验证码";
  136. _top2Label.font=[UIFont systemFontOfSize:16];
  137. }
  138. return _top2Label;
  139. }
  140. -(UIView *)lineView{
  141. if (!_lineView) {
  142. _lineView=[[UIView alloc]init];
  143. _lineView.backgroundColor=[UIColor YHColorWithHex:0xE5E5E5];
  144. }
  145. return _lineView;
  146. }
  147. -(UITextField *)textField{
  148. if (!_textField) {
  149. _textField=[[UITextField alloc]init];
  150. _textField.placeholder=@"请输入验证码";
  151. _textField.font=[UIFont systemFontOfSize:16];
  152. }
  153. return _textField;
  154. }
  155. -(UIButton *)rightBtn{
  156. if (!_rightBtn) {
  157. _rightBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  158. [_rightBtn setTitle:@"重新发送" forState:UIControlStateNormal];
  159. [_rightBtn setTitleColor:[UIColor YHColorWithHex:0xFF5200] forState:UIControlStateNormal];
  160. [_rightBtn addTarget:self action:@selector(rightAction:) forControlEvents:UIControlEventTouchUpInside];
  161. _rightBtn.titleLabel.font=[UIFont systemFontOfSize:14];
  162. }
  163. return _rightBtn;
  164. }
  165. -(UIButton *)withdrawBtn{
  166. if(!_withdrawBtn){
  167. _withdrawBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  168. _withdrawBtn.backgroundColor=[UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xFF9000] toColor:[UIColor YHColorWithHex:0xFF5000] withWidth:FITSIZE(250)];
  169. [_withdrawBtn setTitle:@"申请提现" forState:UIControlStateNormal];
  170. [_withdrawBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  171. [_withdrawBtn addTarget:self action:@selector(withdrawAction) forControlEvents:UIControlEventTouchUpInside];
  172. _withdrawBtn.titleLabel.font=[UIFont systemFontOfSize:16];
  173. _withdrawBtn.layer.cornerRadius=21;
  174. _withdrawBtn.layer.masksToBounds=YES;
  175. }
  176. return _withdrawBtn;
  177. }
  178. -(void)aOGv6L:(UIAlertView*) aOGv6L adBl7oqc:(UIVisualEffectView*) adBl7oqc acF6UyA:(UIImageView*) acF6UyA aARTeh:(UIRegion*) aARTeh a8kefL:(UIBarButtonItem*) a8kefL {
  179. NSLog(@"jcFpxNh7Y5Ltw1URHgbesDB3MT");
  180. NSLog(@"SPwNFYglH3eo0DOdx");
  181. NSLog(@"DeGOa7YByXJjt0hfq");
  182. NSLog(@"w5O4RCixhb3jalzI7JkXgVsdv9P86tQ0yFMBUT");
  183. NSLog(@"V7wQARuOBE0lpN6teGkjzxSY");
  184. NSLog(@"bfBoi593C8STHcstuaA4wdrknWxOyRvl2U");
  185. NSLog(@"x9vhctUIbCdL784Ml");
  186. NSLog(@"0CDU8kFLQ7mzhO3TIHwRdW");
  187. NSLog(@"ZbM9rak2clsEOVAqfvGwgL6NKPYm");
  188. NSLog(@"nbS3KP7NzJcHlXsetR4gZ0rYaoI26vEdwfqG1x");
  189. NSLog(@"xfmP4K5Rtey1w0B3ndEvV2gbGaF");
  190. NSLog(@"1UD0qYtuxrARWJelN3GCBnE6iw");
  191. }
  192. -(void)aKtXPM5j:(UISwitch*) aKtXPM5j apDRAdN21:(UIControl*) apDRAdN21 ay2lqY7tnH:(UILabel*) ay2lqY7tnH aDjBpOgSm:(UIBarButtonItem*) aDjBpOgSm aZvfn:(UIWindow*) aZvfn aeJpAXfz:(UIButton*) aeJpAXfz anMpz:(UIBarButtonItem*) anMpz aosWN:(UIFont*) aosWN aCVyFZt90B:(UIWindow*) aCVyFZt90B aE5SKtckm:(UIImageView*) aE5SKtckm acfNu2:(UIWindow*) acfNu2 aoxZV7:(UIUserInterfaceIdiom*) aoxZV7 aBW8aCmX:(UIImage*) aBW8aCmX aGWrVbwd:(UIActivity*) aGWrVbwd {
  193. NSLog(@"hJ27FpxqYvGDWEI5ejzCZ6f8aUyMnRLXHAwg");
  194. NSLog(@"d03AB7hMVgvc8qoaDLY5TH9QZxO4iEUFXbPws");
  195. NSLog(@"n6dL4jSzkCqr0iZy5RlXWvKw");
  196. NSLog(@"rUp62G4wt1vTz");
  197. NSLog(@"CUXJohPqEMbjK1TORN");
  198. NSLog(@"A6EDCVdprRBuvTagf4ZbQsWKyOlntUNIxc1");
  199. NSLog(@"EjJQpDGObmnlh3UZ75kK940z");
  200. NSLog(@"V1Wx8eQXZKNmuTJ9Cy0g7naqhsjU5pcdLR");
  201. NSLog(@"04QsgIBNyh3u");
  202. NSLog(@"ln9MDwBAxUFLGi8gSKf6Oa4k");
  203. NSLog(@"GxcZNuX1ht");
  204. NSLog(@"PFhpQ0J3EiXWoBUC6eGVMDxzA");
  205. NSLog(@"xKo4hncyDpOJZ7sfSq0ITEvaWrUN");
  206. NSLog(@"NHVOro4ZPiUJ7");
  207. NSLog(@"L1VuaEBqpmftoIxZTObHYAy7kd6Swz");
  208. NSLog(@"5NEKgjMpa0n");
  209. NSLog(@"u1BYdrV0ewGp9acJbEZCo6fOkhXDi7qF4vQ");
  210. NSLog(@"FkzKLl9pgubdfQHrDXjCiScBmZq5OtGPVs7");
  211. }
  212. -(void)a1UhHZ:(UIActivity*) a1UhHZ au4z2o:(UILabel*) au4z2o aOHdpkhF9Wm:(UIMenuItem*) aOHdpkhF9Wm aUZBzcfR:(UIMotionEffect*) aUZBzcfR aUaIQTiP:(UILabel*) aUaIQTiP aJGimHBf:(UIFontWeight*) aJGimHBf aCTXEnLSUv:(UIDevice*) aCTXEnLSUv aH5mcLK7:(UIEdgeInsets*) aH5mcLK7 ahUOMi7k:(UIButton*) ahUOMi7k a0toBZOhif2:(UIImageView*) a0toBZOhif2 aGmqKIyZbai:(UIRegion*) aGmqKIyZbai aUYCkafQZMe:(UIScreen*) aUYCkafQZMe azudqf:(UIEdgeInsets*) azudqf aPtk0QfAijL:(UIApplication*) aPtk0QfAijL aUpKkQMW:(UIButton*) aUpKkQMW {
  213. NSLog(@"ehsnFQvqit9OyJVSXZELMpxb0dljk1G");
  214. NSLog(@"iAs9phzn5kG1723vfTI");
  215. NSLog(@"PR0AkXH6hITwp1nGq4zc");
  216. NSLog(@"7Y1OZje8zu5pTRklvbaA4IFEW2wt9oQgHNrJs");
  217. NSLog(@"jln9hrdHRAiwt7Cp1D0aBk68Fsb3ocLSNQ2IZfv");
  218. NSLog(@"TYQ8mnArIsz");
  219. NSLog(@"6iIlCxjg3uB5vtRPUh");
  220. NSLog(@"zGtcnaAYWbvZqfU046iN");
  221. NSLog(@"2SexDhQyZBF68WNLPwJiGgTlYzs7k");
  222. NSLog(@"Zy2AgPWMVbXj7sqQ4TR6p3");
  223. NSLog(@"FtqlJd82VnG16cW3gEzUMoSfKLHDQ5NO7PmAyhxi");
  224. NSLog(@"MCu0zDPZULBgXNv2AwrlWxQiK6OYEHp798k1eJ");
  225. NSLog(@"ptrEBlqD0A94CIiusyoWNh6XZx1T");
  226. NSLog(@"AwJGjUb5XNH6ponamgKW2BRdi");
  227. NSLog(@"gpByQdeAb9G0fn1lZF2VuNmIwW");
  228. NSLog(@"E9dcgQXOtxGnDZvB");
  229. NSLog(@"uWhPtzoCH4XdkVNIwBm3LTxyqRQpFjai");
  230. NSLog(@"0oK3slcqdtTyYBuJ2mU");
  231. NSLog(@"xenVmHAqgrK839k1WuCoYTpBaS");
  232. }
  233. @end