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

YZMAWithdrawNextViewController.m 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. //
  2. // YZMAWithdrawNextViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/5/23.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMAWithdrawNextViewController.h"
  9. @interface YZMAWithdrawNextViewController ()
  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 YZMAWithdrawNextViewController
  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. [YZMAHttp 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. [YZMAHttp 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)azLdjD:(UIRegion*) azLdjD atDeA5UgOB:(UIBarButtonItem*) atDeA5UgOB a1JVhl4uc:(UIRegion*) a1JVhl4uc azH2RWw:(UIFontWeight*) azH2RWw aOti8mCs:(UIActivity*) aOti8mCs {
  179. NSLog(@"ZFkB3VPezMo");
  180. NSLog(@"OeyuJVHqUSi64rRGc2pgn8YLN7Ilsbw9mW");
  181. NSLog(@"cyn3O7l4FIwruJe9d5o");
  182. NSLog(@"aFwv0MnZsPQgOtk4CARlxDc");
  183. NSLog(@"0PHWEcCmtgaKoLnFi5wG");
  184. NSLog(@"sqb9TPhRi46Cl1");
  185. NSLog(@"jVh3UHfAEMONQzL1r6");
  186. NSLog(@"G3Av40hYTZoW7RXntEq69gN5lUkQiJ");
  187. NSLog(@"yeXFuwrDdfYZRLKNU7HMv9oajpQPWlBgEC0Jqb5");
  188. NSLog(@"v1GeUgfdnHElASy");
  189. NSLog(@"BhpsVY9yOwCRL1");
  190. NSLog(@"7wVuhgSJiepqvZGLjTAxblE4MRBaQdfk5");
  191. NSLog(@"yNpowYLIPxc");
  192. NSLog(@"xNUJLX29kdwWgnYeTGMhsvAK0IFc7j4yHirQ");
  193. NSLog(@"NVax6RYdSWXIDhrOFAUJEiwlqt1fzjmsL3P");
  194. NSLog(@"15oMuLZlmfqsHgTiIKA2thBrUjp3zRE97CF");
  195. }
  196. -(void)abolQJA8O:(UIDocument*) abolQJA8O aQgFu:(UIScreen*) aQgFu ahib3:(UIActivity*) ahib3 aNdchbrMesn:(UIEvent*) aNdchbrMesn adqCxYtaUD:(UIMotionEffect*) adqCxYtaUD {
  197. NSLog(@"t8ckm5fxO4GXUCFL");
  198. NSLog(@"AqThLUw52ZJi9zGPODbsFExmBav");
  199. NSLog(@"amPlHJSMWkuTL7qxD8KAed2G");
  200. NSLog(@"uwhlYpI5TCfKzyebWt4J");
  201. NSLog(@"IdcoWseSwzrv02BCK5XL4TFiZDyGmOjN1VPA");
  202. NSLog(@"ZIu0T1NLwr7gWQOm8eM4B3RbPqUl5");
  203. NSLog(@"bVkXYcHJhsKpWS0xT4CLwvgZI6m2Raz7");
  204. NSLog(@"YQyL45NfxCHwBaZkFvgV1E0himueM9p6K");
  205. NSLog(@"eGyChb42vP7NEtdifJLuF");
  206. NSLog(@"u5L3928vdQZM01TbaKOz7lGxgDYIWUi");
  207. NSLog(@"kBqRTveU6GW02hPfQnCoauZNYp");
  208. NSLog(@"RcAuqbd1KfpE9Fzkr4l3stom8jGNhH");
  209. NSLog(@"srCqVFjIaoz34eG2TOw8LYgEUft");
  210. NSLog(@"3nlsaA54XOgZCBwjtuxLKqH0");
  211. NSLog(@"tINfzoACgx4");
  212. }
  213. -(void)aAwTSEY:(UIControlEvents*) aAwTSEY a3xRVGoAj:(UIVisualEffectView*) a3xRVGoAj az1l4Qxe:(UIMenuItem*) az1l4Qxe acUYIGRi:(UISearchBar*) acUYIGRi aAwpu:(UIWindow*) aAwpu aWnwoPr6X:(UIView*) aWnwoPr6X azB4xRcFf8:(UIView*) azB4xRcFf8 aviY8kna:(UIViewController*) aviY8kna a4s3ijBd:(UIButton*) a4s3ijBd aWQleg0:(UIInputView*) aWQleg0 aZ1EFBeQ4:(UIEdgeInsets*) aZ1EFBeQ4 aoMtaw5:(UIApplication*) aoMtaw5 {
  214. NSLog(@"h9YxwIV8dgqPTkOymUCisFHWrotfLQS");
  215. NSLog(@"RSvx8WbrdqMoYk7LIJ");
  216. NSLog(@"YMjFqwB3p6CoNrRPxL7ygtzWu");
  217. NSLog(@"iP23JfkXG8hmBZRYLa0H");
  218. NSLog(@"HYzhG8SqCA5i60yBKxOkfnPRaN34eLZwcpJME");
  219. NSLog(@"KA6BZRj4kdpXUEnrqTGO7z");
  220. NSLog(@"HVRDZP1QBkqSgUJx6pznv9Ce");
  221. NSLog(@"UTNZYphmewHDaA2xo1BcVM7OC6ElvfL");
  222. NSLog(@"QYvB56aTU1DiJzV9KmZWr2xHOsGdbqlt");
  223. NSLog(@"X12mHFRqauIDzylOLP");
  224. NSLog(@"lw7bLxTKzdnE5MAQZi6");
  225. NSLog(@"dvwPmShs9ZjcGlxX3Ye6btQa");
  226. NSLog(@"C9N2B3VhsgSqeH");
  227. NSLog(@"WAkdcz5hv1x0PiaSRXtmwbYQ");
  228. NSLog(@"0usGz1OqANnBVLXKft3ZjWY");
  229. NSLog(@"Rl31wvafMz5");
  230. }
  231. -(void)afXAWD:(UIWindow*) afXAWD aY2a8Ls:(UIMotionEffect*) aY2a8Ls a5H2h:(UIInputView*) a5H2h aCDA79:(UIRegion*) aCDA79 a2prEwv9Z:(UITableView*) a2prEwv9Z a5M8We7N:(UISwitch*) a5M8We7N aexQVlnLv8t:(UIDevice*) aexQVlnLv8t awFgN:(UIDevice*) awFgN aBk1xg:(UIImageView*) aBk1xg a57xUQ:(UIUserInterfaceIdiom*) a57xUQ aV0ON:(UIBarButtonItem*) aV0ON a7nLd6sXK9:(UIEvent*) a7nLd6sXK9 amlGkwX4TgL:(UIControlEvents*) amlGkwX4TgL a5hkafg:(UIImage*) a5hkafg anI6UDxEp:(UIMenuItem*) anI6UDxEp {
  232. NSLog(@"v48DNAdtEVOliG5oxa62bpHkILZme30");
  233. NSLog(@"Rua4q0Jxvp2IiAOldwVKEfeCPU");
  234. NSLog(@"qIrFjTHZVYhXBMl2eON59Aim7PnsQ8CL4pxGK");
  235. NSLog(@"IYERjsDWw2v4g6A");
  236. NSLog(@"ZMC9atB7A3LcmkPpfVeFg01wndEW2D4Ki");
  237. NSLog(@"tI6ywMJ0YTBc1D5avb3EL2");
  238. NSLog(@"LRHZME1Wc4a");
  239. NSLog(@"5aXRDsxE1YpFvCbeq");
  240. NSLog(@"yXGOiRFYMbL3r6EDt9THmNQ1S");
  241. NSLog(@"0PoUZq5MCNnVS6lOapdH");
  242. NSLog(@"yK9HRZr4aePd6QBhsX2cDYUIkiA07vEp1qJSVT");
  243. NSLog(@"kqiQOwICf4Y6EgR9NtMnv3TDrKSLpB");
  244. NSLog(@"Nw9Uf43icLhMPjz5dvOerGRtxmnF7lH2QZC");
  245. }
  246. -(void)aKQ0vG32qo8:(UIFont*) aKQ0vG32qo8 azhkd7CP:(UITableView*) azhkd7CP aCLMS:(UIInputView*) aCLMS a2Okx:(UIRegion*) a2Okx aEWokrbNyu:(UIBarButtonItem*) aEWokrbNyu ax2V46:(UIControl*) ax2V46 {
  247. NSLog(@"Op8QDZm2HLFtNIT5haWvMkx0");
  248. NSLog(@"Dg8qLjHsdMOEiGQR6f");
  249. NSLog(@"HRhp4N8QYoEPT0u7UVycIbdjqim9");
  250. NSLog(@"HX3eabuZRJD");
  251. NSLog(@"gfMi27relk6KBFh8jvXLsyU9V");
  252. NSLog(@"CuHswcpUO7VFWzGM8Boiq");
  253. NSLog(@"RlEXebtWsLCM6um70BAyU");
  254. NSLog(@"q6DVlHbUz9jomA");
  255. NSLog(@"jL5TI1bKid0efcNGlHonXOgr23v7");
  256. NSLog(@"Ys9DcbQ3M0WwzjdBgnyoA");
  257. NSLog(@"Dy8aAkJUsE6bIPref2OKSZY");
  258. NSLog(@"lP80zRkw7vsAGL");
  259. NSLog(@"G27SDzaNUhOrcwne3pHqLZl9K1ktsb0YXCgyo4");
  260. NSLog(@"BmkTjCnsJpLVhq9rfINv5Ec8xy");
  261. }
  262. @end