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

LZMGetMoneyNextViewController.m 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. //
  2. // LZMGetMoneyNextViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/6/11.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMGetMoneyNextViewController.h"
  9. @interface LZMGetMoneyNextViewController ()<UITextFieldDelegate>
  10. @property (nonatomic,strong) UIView *codeView;
  11. @property (nonatomic,strong) UIButton *nextBtn;
  12. @end
  13. @implementation LZMGetMoneyNextViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. [self addUI];
  17. [self adjustUI];
  18. [self timeAction:[self.view viewWithTag:10003]];
  19. }
  20. -(void)viewWillAppear:(BOOL)animated{
  21. [super viewWillAppear:animated];
  22. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  23. }
  24. - (void)configNavigationBar {
  25. [self.navigationBar setNavTitle:@"验证手机号"];
  26. self.navigationBar.backgroundColor = [UIColor changeColor];
  27. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  28. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  29. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  30. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  31. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  32. }
  33. -(void)addUI{
  34. [self.view addSubview:self.codeView];
  35. [self.view addSubview:self.nextBtn];
  36. [self configNavigationBar];
  37. }
  38. -(void)adjustUI{
  39. [self.codeView mas_makeConstraints:^(MASConstraintMaker *make) {
  40. make.left.mas_equalTo(FITSIZE(35));
  41. make.right.mas_equalTo(FITSIZE(-35));
  42. make.top.mas_equalTo(154);
  43. make.height.mas_equalTo(144);
  44. }];
  45. [self.nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  46. make.top.equalTo(self.codeView.mas_bottom).offset(25);
  47. make.centerX.equalTo(self.view.mas_centerX);
  48. make.height.mas_equalTo(42);
  49. make.width.mas_equalTo(FITSIZE(250));
  50. }];
  51. UIView *imgView=[self.codeView viewWithTag:10001];
  52. UIView *textFieldView=[self.codeView viewWithTag:10002];
  53. UIView *timeView=[self.codeView viewWithTag:10003];
  54. UIView *lineView=[self.codeView viewWithTag:10004];
  55. [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
  56. make.left.mas_equalTo(0);
  57. make.bottom.mas_equalTo((-41-10));
  58. make.width.height.mas_equalTo(18);
  59. }];
  60. [timeView mas_makeConstraints:^(MASConstraintMaker *make) {
  61. make.right.mas_equalTo(0);
  62. make.centerY.equalTo(imgView.mas_centerY);
  63. make.width.mas_equalTo(76);
  64. make.height.mas_equalTo(22);
  65. }];
  66. [textFieldView mas_makeConstraints:^(MASConstraintMaker *make) {
  67. make.left.equalTo(imgView.mas_right).offset(FITSIZE(10));
  68. make.centerY.equalTo(imgView.mas_centerY);
  69. make.right.equalTo(timeView.mas_left);
  70. }];
  71. [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
  72. make.left.equalTo(imgView.mas_left);
  73. make.right.equalTo(timeView.mas_right);
  74. make.top.equalTo(imgView.mas_bottom).offset(10);
  75. make.height.mas_equalTo(1);
  76. }];
  77. }
  78. #pragma mark -事件
  79. -(void)timeAction:(UIButton *)sender{
  80. [self requestCode];
  81. [sender startWithTime:60 title:@"重新发送" countDownTitle:@"s" mainColor:[UIColor clearColor] countColor:[UIColor clearColor]];
  82. }
  83. #pragma mark -网络请求
  84. -(void)requestCode{
  85. //获取验证码
  86. NSString *url=[NSString stringWithFormat:@"%@/api/v2/users/sendCode",BaseURL];
  87. [LZMHttp post:url params:nil success:^(id json) {
  88. } failure:^(NSError *error) {
  89. if (error) {
  90. [MBProgressHUD showMessage:@"获取失败"];
  91. }
  92. }];
  93. }
  94. -(void)requestGetMoney{
  95. UITextField *textField=[self.codeView viewWithTag:10002];
  96. if(textField.text &&![@"" isEqualToString:textField.text]) {
  97. NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/embodyApplication",BaseURL];
  98. NSDictionary *dic=@{
  99. @"money":self.moneyStr,
  100. @"code":textField.text
  101. };
  102. [LZMHttp post:url params:dic success:^(id json) {
  103. [MBProgressHUD showMessage:@"提现成功"];
  104. [SVProgressHUD dismissWithDelay:1.0f];
  105. [self.navigationController popToRootViewControllerAnimated:YES];
  106. } failure:^(NSError *error) {
  107. if (error) {
  108. [MBProgressHUD showMessage:@"服务器开小差了,请稍后再试"];
  109. }
  110. }];
  111. }else{
  112. [MBProgressHUD showMessage:@"您的输入有误,请重新输入"];
  113. }
  114. }
  115. #pragma mark -代理
  116. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
  117. if ([@"" isEqualToString:string]) {
  118. return YES;
  119. }
  120. if ([@"0123456789" rangeOfString:string].location!= NSNotFound) {
  121. return YES;
  122. }
  123. return NO;
  124. }
  125. #pragma mark -事件响应
  126. - (void)backAction {
  127. [self.navigationController popViewControllerAnimated:YES];
  128. }
  129. #pragma mark -懒加载
  130. -(UIView *)codeView{
  131. if (!_codeView) {
  132. _codeView=[[UIView alloc]init];
  133. UIImageView *imgView=[[UIImageView alloc]init];
  134. UITextField *textField=[[UITextField alloc]init];
  135. UIButton *timeBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  136. UIView *lineView=[[UIView alloc]init];
  137. imgView.tag=10001;
  138. textField.tag=10002;
  139. timeBtn.tag=10003;
  140. lineView.tag=10004;
  141. [_codeView addSubview:imgView];
  142. [_codeView addSubview:textField];
  143. [_codeView addSubview:timeBtn];
  144. [_codeView addSubview:lineView];
  145. imgView.image = [UIImage imageNamed:@"code_left"];
  146. textField.placeholder=@"输入验证码";
  147. textField.textColor=[UIColor blackColor];
  148. textField.font=[UIFont systemFontOfSize:14];
  149. textField.delegate=self;
  150. textField.keyboardType=UIKeyboardTypeNumberPad;
  151. [timeBtn setTitleColor:[UIColor YHColorWithHex:0xFF6D33] forState:UIControlStateNormal];
  152. timeBtn.layer.borderColor=[UIColor YHColorWithHex:0xFF6D33].CGColor;
  153. [timeBtn addTarget:self action:@selector(timeAction:) forControlEvents:UIControlEventTouchUpInside];
  154. [timeBtn setTitle:@"重新获取" forState:UIControlStateNormal];
  155. timeBtn.titleLabel.font=[UIFont systemFontOfSize:12];
  156. [timeBtn setTitleColor:[UIColor YHColorWithHex:0xFF6D33] forState:UIControlStateNormal];
  157. timeBtn.layer.borderWidth=1;
  158. timeBtn.layer.cornerRadius=11;
  159. timeBtn.layer.masksToBounds=YES;
  160. lineView.backgroundColor=[UIColor YHColorWithHex:0xD8D8D8];
  161. }
  162. return _codeView;
  163. }
  164. -(UIButton *)nextBtn{
  165. if (!_nextBtn) {
  166. _nextBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  167. _nextBtn.layer.cornerRadius=21;
  168. [_nextBtn setTitle:@"完成" forState:UIControlStateNormal];
  169. _nextBtn.backgroundColor=[UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xFF9000] toColor:[UIColor YHColorWithHex:0xFF5000] withWidth:FITSIZE(250)];
  170. [[_nextBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
  171. [self requestGetMoney];
  172. }];
  173. }
  174. return _nextBtn;
  175. }
  176. -(void)aM1rWtd7zU:(UIUserInterfaceIdiom*) aM1rWtd7zU aLkcmT:(UIFontWeight*) aLkcmT aE1QrPNB:(UICollectionView*) aE1QrPNB aBl3znONYJ:(UIVisualEffectView*) aBl3znONYJ a7nDH0EqhO:(UIView*) a7nDH0EqhO aE2KCIdeHAG:(UIRegion*) aE2KCIdeHAG aG4hwCKqM:(UIEvent*) aG4hwCKqM atOr6GFoBfu:(UIInputView*) atOr6GFoBfu aFDK23fd5BO:(UIImageView*) aFDK23fd5BO a4Crc2kpn:(UIImage*) a4Crc2kpn aGMxF:(UIDocument*) aGMxF aXzF8Ke2U:(UIWindow*) aXzF8Ke2U auhaAMzkG:(UIUserInterfaceIdiom*) auhaAMzkG akDyJUsaw:(UIApplication*) akDyJUsaw aGM5V:(UIEvent*) aGM5V auiqAn:(UIScreen*) auiqAn apje4DX12:(UILabel*) apje4DX12 aYaQ1rN:(UIActivity*) aYaQ1rN amZuaKgfnl:(UIUserInterfaceIdiom*) amZuaKgfnl {
  177. NSLog(@"Z0sAUGemtKra8vbIxiloSMgVk9nCq35TE");
  178. NSLog(@"PlwkOVR1zNrDsBu8ZLbEpCyi");
  179. NSLog(@"QLIhsYVSBFEyNT0MtAilCxwHGX1kf9U6p8Wo");
  180. NSLog(@"I8Y4jRKSk6AehL7gVxvN2iZFb");
  181. NSLog(@"9kxRXhVWLOpAZ");
  182. NSLog(@"afW8BVCMbw0HlgrRc9nQAxmqkt5zhJd1L2GuFS");
  183. NSLog(@"fu1HpVn48qiLX3h2");
  184. NSLog(@"EamFLvDPlStyg0ZWe2udGTsj");
  185. NSLog(@"uqyemsTfNcAkUnJQX8K5vYiCPzxh3HMRIwF6l");
  186. NSLog(@"L4zDjfktP2TRY7NwM8xl1rWFqAIXbBm0Hypci");
  187. NSLog(@"uCmQORoaKnptcqEZ");
  188. NSLog(@"4iaIVCWKBokfOHb6dzJ7vgUE9Z2QyPL1n");
  189. NSLog(@"KQClFe4E5jtx2MZ3sqJkaw9UrpyHbf8cioWVOm");
  190. NSLog(@"bGsHNOM3qQcIXPo65V97RTg8eynxf");
  191. NSLog(@"rGnm3cAxT90FUuhEds2Kj1RZSkLboHfJvygaliw5");
  192. NSLog(@"t9BkjPu56WCdIJRoMfXT3Z7Kal8h");
  193. NSLog(@"sCcnNmKrbauRLEVgxfOq7UpzI");
  194. NSLog(@"ceysPmvRarIWxq7uhK35HtpSdNi");
  195. }
  196. -(void)aJPpGqWhgn:(UIBarButtonItem*) aJPpGqWhgn aIV3gW:(UIViewController*) aIV3gW aLfQbvJj4U:(UIBarButtonItem*) aLfQbvJj4U a6Sru1BvC3w:(UITableView*) a6Sru1BvC3w aJdmafHv7:(UILabel*) aJdmafHv7 aCMy3k4:(UIColor*) aCMy3k4 aG5d4Mr:(UIImage*) aG5d4Mr {
  197. NSLog(@"KhoENRlO5pYi2z");
  198. NSLog(@"feMmVy0TDqrBkbEU3Lglpa14oJQ");
  199. NSLog(@"h8lULd5YPZDrpCkz9ev2GgqHwmy14KWJjEos0");
  200. NSLog(@"3G0KaQmnRXhw8dPNso9FrtBIi");
  201. NSLog(@"GvcnmFOJLreItYw");
  202. NSLog(@"vuegkf6snGmcC3YzFoApBMESbr");
  203. NSLog(@"stDVpzEQKWX8fNZgd2U7jHbum");
  204. NSLog(@"4cwpSB9TJn3xEF0Hev82");
  205. NSLog(@"2elgoqtx45sGKfPaCvmEJNiHwQLc8");
  206. NSLog(@"hsAtEGVHiTlocROj1kFYW7pDw2qC");
  207. NSLog(@"qG1TRiyg6BHhfOpsdA8CYbjJQN5vrU");
  208. NSLog(@"sZ9RLYGAcC46TxnU");
  209. NSLog(@"WNJTtkHmdxojhsKAcfYr586C");
  210. NSLog(@"sJHmq3r7Th1ki");
  211. NSLog(@"fs7DGVqZwv9SmtEWKMI2jTR4BHdhiPQ8150glCbF");
  212. NSLog(@"dExivpu5rPY73XKfwykceoBjh0A1RmFnUtS4I9gH");
  213. NSLog(@"RuZ6XOrPgjE3epm");
  214. NSLog(@"f4AJWVyXnP0G27iLtwD8z9a3oIUv6Eh");
  215. }
  216. -(void)aGDg8aXQE:(UIRegion*) aGDg8aXQE auS0rT:(UIColor*) auS0rT aFuE9IK:(UIView*) aFuE9IK a1cYG3:(UIFontWeight*) a1cYG3 aa1Eq:(UILabel*) aa1Eq ayu2RND7n:(UIMotionEffect*) ayu2RND7n a4Jsd:(UIDevice*) a4Jsd amnHST:(UIView*) amnHST aObGohJB:(UIColor*) aObGohJB aJUXFhfDsg:(UIMotionEffect*) aJUXFhfDsg akcx09R:(UIControl*) akcx09R aWyKh3eV:(UIButton*) aWyKh3eV aZlEjOdU05:(UIRegion*) aZlEjOdU05 {
  217. NSLog(@"PA9Cwuxv4tFi2S0QRkIXZ");
  218. NSLog(@"FJSzOUuw1tM6");
  219. NSLog(@"TmcXD0OU9lbqA");
  220. NSLog(@"bjCcNaSo4V7T0ldmYeR9wr3");
  221. NSLog(@"NArnId6pfD81ze7OVjYMc");
  222. NSLog(@"nme1ag4LZcTGu95EtrD8h0FBdUYlsXjfxzIM2p");
  223. NSLog(@"3BTPb8vJMghkWlqxwAUONIyCfac2");
  224. NSLog(@"GsC1i20jIT93MkHvFZ5b6ufK");
  225. NSLog(@"izyurtj1l8bD4LhEO0ZFnq");
  226. NSLog(@"qJ1t2mQh5lNKF");
  227. NSLog(@"zBhfpM47RsdIoOLkKWQe2gASYxtZFDNnlHcEP");
  228. }
  229. -(void)asq4OpzyYC:(UIDocument*) asq4OpzyYC aYDTFW:(UIDocument*) aYDTFW aKpf84:(UIControl*) aKpf84 a84dRQT1h:(UIControl*) a84dRQT1h aX8RstiHNz:(UIScreen*) aX8RstiHNz a9UB05ka:(UIButton*) a9UB05ka aja8IQ2:(UIControlEvents*) aja8IQ2 axEWCl5:(UIBarButtonItem*) axEWCl5 aJdPrcIhL0S:(UIColor*) aJdPrcIhL0S a3jDrQxA:(UIBarButtonItem*) a3jDrQxA axRku7:(UIFont*) axRku7 aMjWhP:(UIScreen*) aMjWhP aRT86:(UIViewController*) aRT86 aahUg6cuO:(UICollectionView*) aahUg6cuO a4umshx:(UIFont*) a4umshx aw8lSG:(UIBarButtonItem*) aw8lSG {
  230. NSLog(@"8hiJmdIAPFpMz47QYOVyjKX2DvGULBqoSxNet6WC");
  231. NSLog(@"lfVBJ5QCnUO4dGESj0");
  232. NSLog(@"VbuYskh4eRFgE");
  233. NSLog(@"VYBxlurUEFDL90KC6ZMsciJNWv3t");
  234. NSLog(@"eOJxbKsL8ZCj");
  235. NSLog(@"IvrCwxsGNha891ZQuUoigHqFj4y5XETYJAbknc6p");
  236. NSLog(@"NBiWUDxmoGQk1d6LEv05");
  237. NSLog(@"aKTntd5Ze6FIjkUv");
  238. NSLog(@"2Q0OD6V5Fxp");
  239. NSLog(@"kGI9S8jECa6W1HfXNY");
  240. NSLog(@"7cj0pnPq8dZuUSoxtVOTAHB5LW1QvJyDg");
  241. NSLog(@"Fnk0v9aZ2TDIOJt1G45Mjwbc");
  242. NSLog(@"JO0z1VAKSeRF3gsruycYMCWLPXoBk7DfwnZj");
  243. NSLog(@"2sTl3VhqUOaXeuRQjicLJo4");
  244. NSLog(@"FJHTgizWC7tEBxlmuV");
  245. NSLog(@"t135sWbChTyUfaIX8E7kKLZD96dF2ejvRN");
  246. NSLog(@"1uJ5dKIOXE6CvlSxF8obeMZNYVpjkiAcGR2n");
  247. NSLog(@"m0pYxlaEW6k27PJ");
  248. NSLog(@"1IRg0HcTlzLNjshw7");
  249. }
  250. -(void)aIfrHF2C:(UIUserInterfaceIdiom*) aIfrHF2C aqExvd653:(UIBarButtonItem*) aqExvd653 apTnu:(UIImage*) apTnu aPFTI:(UIActivity*) aPFTI aTx1tQ:(UIVisualEffectView*) aTx1tQ a0Vhd:(UIColor*) a0Vhd aID9U:(UIButton*) aID9U {
  251. NSLog(@"P4b2YFDrNEW3Zht");
  252. NSLog(@"W1hQCjAPTMFGEzKtOmB9");
  253. NSLog(@"y2lkWi4XnUvx3pmqgfQHEN09Me1PsBwzRbc");
  254. NSLog(@"VQ4x3ohWpdAsbygmKES");
  255. NSLog(@"uzojyNgt60eEMxfO");
  256. NSLog(@"NKzlWJ7L4c1snRQM5TVf");
  257. NSLog(@"dP9o0M5OuTaNt3");
  258. NSLog(@"s6bXlrvG4eF90ToCkMgOq");
  259. NSLog(@"GiZnrtajh90pSN5OYAbCMUv2HL");
  260. NSLog(@"StxsFU1Da4lXiREHZyv8uABNIo7fWh");
  261. NSLog(@"0QAitVwLfsJvW4qEzrdKB7u8SNZO9PT");
  262. NSLog(@"qah7Ko3R6HWsdYQxfCIuO19lXLDEJNGwn");
  263. NSLog(@"N09iUEr8KSkqjvBJ54dThwAYRy6CZbstlD2");
  264. }
  265. @end