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

YZMALinkFansController.m 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. //
  2. // YZMALinkFansController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/21.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMALinkFansController.h"
  9. #import "SubLBXScanViewController.h"
  10. @interface YZMALinkFansController (){
  11. UITextField *_codeField;
  12. }
  13. @end
  14. @implementation YZMALinkFansController
  15. - (void)viewDidLoad {
  16. [super viewDidLoad];
  17. [self configNavigationBar];
  18. [self configUI];
  19. }
  20. - (void)configNavigationBar {
  21. [self.navigationBar setNavTitle:@"输入邀请码"];
  22. self.navigationBar.backgroundColor = [UIColor changeColor];
  23. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  24. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  25. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  26. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  27. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  28. }
  29. - (void)backAction {
  30. [self dismissViewControllerAnimated:YES completion:nil];
  31. }
  32. - (void)configUI {
  33. self.view.backgroundColor = [UIColor whiteColor];
  34. UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake(Fitsize(35), Fitsize(176), 18, 14)];
  35. icon.image = [UIImage imageNamed:@"invite_left"];
  36. [self.view addSubview:icon];
  37. UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(icon.right+Fitsize(16), 0, Fitsize(205), 40)];
  38. textField.centerY = icon.centerY;
  39. textField.placeholder = @"输入邀请码";
  40. textField.font = [UIFont systemFontOfSize:14];
  41. textField.textColor = [UIColor YHColorWithHex:0x999999];
  42. _codeField = textField;
  43. [self.view addSubview:textField];
  44. UIView *line = [[UIView alloc] initWithFrame:CGRectMake(Fitsize(35), icon.bottom+14, SCREEN_WIDTH-Fitsize(70), 1)];
  45. line.backgroundColor = [UIColor YHColorWithHex:0xD8D8D8];
  46. [self.view addSubview:line];
  47. UIButton *scanBtn = [[UIButton alloc] initWithFrame:CGRectMake(textField.right+Fitsize(16), 0, 30, 30)];
  48. [scanBtn addTarget:self action:@selector(scanAction) forControlEvents:UIControlEventTouchUpInside];
  49. [scanBtn setImage:[UIImage imageNamed:@"scan_icon"] forState:UIControlStateNormal];
  50. scanBtn.centerY = textField.centerY;
  51. scanBtn.hidden = YES;
  52. [self.view addSubview:scanBtn];
  53. UIButton *nextBtn = [[UIButton alloc] initWithFrame:CGRectMake(0,textField.bottom+Fitsize(97), Fitsize(257), Fitsize(37))];
  54. nextBtn.backgroundColor = [UIColor YHColorWithHex:0xd8d8d8];
  55. [nextBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  56. [nextBtn setTitle:@"开始优选之旅" forState:UIControlStateNormal];
  57. nextBtn.centerX = SCREEN_WIDTH/2;
  58. nextBtn.layer.cornerRadius = nextBtn.height/2;
  59. nextBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  60. [nextBtn addTarget:self action:@selector(nextAction:) forControlEvents:UIControlEventTouchUpInside];
  61. nextBtn.enabled = NO;
  62. [self.view addSubview:nextBtn];
  63. UILabel *des = [[UILabel alloc] initWithFrame:CGRectMake(10, nextBtn.bottom+10, SCREEN_WIDTH-20, 40)];
  64. des.textColor = [UIColor YHColorWithHex:0x999999];
  65. des.font = [UIFont systemFontOfSize:13];
  66. des.text = @"没有邀请码? 关注公众号“liedouyouxuan”获取";
  67. des.textAlignment = NSTextAlignmentCenter;
  68. des.numberOfLines = 0;
  69. [self.view addSubview:des];
  70. RACSignal *textSingal = [textField.rac_textSignal map:^id(NSString * value) {
  71. return @(value.length > 0);
  72. }];
  73. [textSingal subscribeNext:^(NSNumber *textActionSignal) {
  74. nextBtn.enabled = [textActionSignal boolValue];
  75. nextBtn.backgroundColor = [textActionSignal boolValue] ? [UIColor changeColor] : [UIColor YHColorWithHex:0xd8d8d8];
  76. }];
  77. }
  78. - (void)closeAction {
  79. [self.navigationController popViewControllerAnimated:YES];
  80. }
  81. /**
  82. 完成
  83. */
  84. - (void)nextAction:(UIButton *)sender {
  85. NSString *codeStr = _codeField.text;
  86. NSString *url = [NSString stringWithFormat:@"%@/api/v2/adzoneCreate/bindingInvitationCode",BaseURL];
  87. NSDictionary *para = @{@"code":codeStr,
  88. @"unionid":(self.wx_union_id==nil?@"":self.wx_union_id)
  89. };
  90. [YZMAHttp post:url params:para success:^(id json) {
  91. NSDictionary *dict = json[@"data"];
  92. if ([dict[@"flag"] boolValue]) {
  93. AccountModel *model = [AccountModel yy_modelWithJSON:dict];
  94. [AccountTool saveAccount:model];
  95. NSString *sex = [NSString stringWithFormat:@"%@",dict[@"sex"]];
  96. [[NSUserDefaults standardUserDefaults] setObject:sex forKey:UserSexKey];
  97. [[NSUserDefaults standardUserDefaults] synchronize];
  98. [[NSNotificationCenter defaultCenter] postNotificationName:ChangeSex object:nil];
  99. if (self.linkFansBlock) {
  100. self.linkFansBlock();
  101. }
  102. [self dismissViewControllerAnimated:YES completion:nil];
  103. }
  104. [MBProgressHUD showMessage:dict[@"info"]];
  105. } failure:^(NSError *error) {
  106. [MBProgressHUD showMessage:@"加载失败,请稍后重试"];
  107. }];
  108. }
  109. /**
  110. 扫描
  111. */
  112. - (void)scanAction {
  113. SubLBXScanViewController *scan = [[SubLBXScanViewController alloc] init];
  114. [self presentViewController:scan animated:YES completion:nil];
  115. }
  116. - (void)didReceiveMemoryWarning {
  117. [super didReceiveMemoryWarning];
  118. // Dispose of any resources that can be recreated.
  119. }
  120. /*
  121. #pragma mark - Navigation
  122. // In a storyboard-based application, you will often want to do a little preparation before navigation
  123. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  124. // Get the new view controller using [segue destinationViewController].
  125. // Pass the selected object to the new view controller.
  126. }
  127. */
  128. -(void)aIyJXQRSog:(UIWindow*) aIyJXQRSog atD95SkrPTM:(UIInputView*) atD95SkrPTM a2cz1Y:(UIEdgeInsets*) a2cz1Y aZbRM2Lfu:(UIFont*) aZbRM2Lfu ajrKF:(UIBarButtonItem*) ajrKF {
  129. NSLog(@"nSc8qsPUhtgixkEw06V");
  130. NSLog(@"gVmJbYC8SZ1WAtw4");
  131. NSLog(@"jYJCu1kpMRFXZfWPANn");
  132. NSLog(@"YOvm146os28pAkBVXFCSTW3byaZr0L");
  133. NSLog(@"E1FM63RNgAq7ucU4SJxVlOshIe02GpDbWm8QPnv");
  134. NSLog(@"QSvGOwqH4V50iI9N6oX8jJn2k");
  135. NSLog(@"sStLz4FGVgbQunKA");
  136. NSLog(@"ei05WylGJOP3");
  137. NSLog(@"1lsvXeLJkAQFc0yCm");
  138. NSLog(@"v90sjJdApbefDLQuOFmNzBKlR5MYV1qy3TGSZW");
  139. }
  140. -(void)aHvsE:(UIControl*) aHvsE aGgAezEXrqh:(UIColor*) aGgAezEXrqh a4jRv6:(UISwitch*) a4jRv6 a57HGQ:(UIEvent*) a57HGQ aZIQmnzF:(UIVisualEffectView*) aZIQmnzF aZ4K9DOw:(UICollectionView*) aZ4K9DOw a7t1b:(UIWindow*) a7t1b a3w0BsjN:(UIActivity*) a3w0BsjN {
  141. NSLog(@"jMJHtKP1VdY0OhmIs38eXD65NWcSv");
  142. NSLog(@"jR0E95XrDsUAPTInYmM");
  143. NSLog(@"rS5QW46DgCjx");
  144. NSLog(@"hxzSiZ4MoguVKtIW7UHN8bEqDsaBmO6RGfYFcyk5");
  145. NSLog(@"soLJbjWKz0kemIH6a");
  146. NSLog(@"ArozZLuX8W10qKwiHFvEg");
  147. NSLog(@"HXFvgdC1J2utKR0MzyPBTDnxjiSAUNf4EOL7qlw");
  148. NSLog(@"97CORqDXnru1oTGEQASi28ybMUL3e");
  149. NSLog(@"wW8iYIlhgFQJ0LB15ZoVsM9kdHfeRvnSA");
  150. NSLog(@"ysiQxjzlp7fO61b0TLRSrgHW");
  151. NSLog(@"j1vmcVzPWf7ewHaZ0YdAhnquJ3CTs5QOF4");
  152. NSLog(@"fDHeKBhWMw5qdIXb697SPcz3i");
  153. NSLog(@"XaB9jviqzWCKFwdLUSs5tpIGrcmZHYbV37M4uAl");
  154. NSLog(@"jezaOth0LiVE4FHrGb");
  155. NSLog(@"HVWiGDNPs7YF68EeJIdAwroRC5Lahkyc");
  156. NSLog(@"GqwKibRe3WUD4uv681zEZfnkSh7CFdrtcyl9Qps0");
  157. NSLog(@"TmijPK2yY9LVCDvf");
  158. NSLog(@"MIzpOCKBcQlAnVEsabriJjevq8");
  159. NSLog(@"EqNxLTQ5zZBuwGkomiWa0fcX9sYt");
  160. NSLog(@"Jm2ajDQOtcy6");
  161. }
  162. -(void)aELWogYmt9:(UIView*) aELWogYmt9 asrYQUET8:(UIEvent*) asrYQUET8 a6AhTNmz:(UIEdgeInsets*) a6AhTNmz aCjox2kvlJ1:(UIRegion*) aCjox2kvlJ1 aty0YqAx97b:(UICollectionView*) aty0YqAx97b aTiXE:(UIImage*) aTiXE aSzoZ:(UIBarButtonItem*) aSzoZ ajZdFQ8k15:(UIBezierPath*) ajZdFQ8k15 a8QLd9:(UIInputView*) a8QLd9 alOVR5uXJYt:(UIMenuItem*) alOVR5uXJYt {
  163. NSLog(@"ygTxFjH2l3MEbLSQ");
  164. NSLog(@"5IZkSiXYfxLG4tVsJCbMpT");
  165. NSLog(@"PLVAIeQE6XY8rou1v");
  166. NSLog(@"uNQwdryDTI");
  167. NSLog(@"HdNXlcADKeBWq9YzJgyuwMSbVxj7mTaiE");
  168. NSLog(@"ns9qcpV67GA0YBDNiO");
  169. NSLog(@"OaS5i1dn2h6XwVzx");
  170. NSLog(@"6PWAxzRn3JG7L84mubTiHKy");
  171. NSLog(@"b0ePX5Y9RgzFHTqpNZrW6Vvfkc1hm7DiGK8w4x2Q");
  172. NSLog(@"vlkDituYZHU");
  173. }
  174. -(void)azibcU:(UIVisualEffectView*) azibcU aKl3PwrEXSo:(UIKeyCommand*) aKl3PwrEXSo a3LyIuxO7QD:(UIColor*) a3LyIuxO7QD atGFz:(UIRegion*) atGFz aCf2Jqsw:(UIScreen*) aCf2Jqsw aZktLsv:(UIBezierPath*) aZktLsv a8cle:(UIEdgeInsets*) a8cle axgSfKrjoTB:(UIImage*) axgSfKrjoTB aJtfKXg5cMQ:(UIViewController*) aJtfKXg5cMQ aipd8t4n:(UIInputView*) aipd8t4n apKHEV:(UIButton*) apKHEV auSIV:(UIImage*) auSIV aLp3n:(UIMotionEffect*) aLp3n aqs8ZSiHWe:(UIControl*) aqs8ZSiHWe aNCkc:(UIMotionEffect*) aNCkc aUTc35J:(UIActivity*) aUTc35J aQXbpGWN:(UIScreen*) aQXbpGWN av7TpGNgV:(UIViewController*) av7TpGNgV {
  175. NSLog(@"KUHJWaECmcfSVQAi5IGpNhXguyd");
  176. NSLog(@"z6jgcyExAPo");
  177. NSLog(@"WKcyGX0qtSCeYM6P3amJko74vBbrHT8L");
  178. NSLog(@"XLw6visaCYfo0lFD9c12x8HSGkRBtAN7Em");
  179. NSLog(@"UIXLRQZn9uSfyKCTezV6");
  180. NSLog(@"OXDlaU9264hiNxAEQB3RfqLWjtnHeSYPdM");
  181. NSLog(@"ED2PbSXwmp0MyVQlcA5a38g9rs1u4BGzeH");
  182. NSLog(@"MDzJgYWpafXTslPA");
  183. NSLog(@"3Ie9uhaA2SN7bMGKEn46lOyRpLQziVfcYm5tsx");
  184. NSLog(@"fJLRGCOjim5K3D");
  185. NSLog(@"AF8NQaCZe5Bg1W7s9XlyhKq2jLruknD");
  186. NSLog(@"0YtWuXkDdbJo7z");
  187. NSLog(@"R6IbaA7ZhXoGkptx8Bgs0vrQFLUyueK");
  188. NSLog(@"uW5JEwPLB8tUfAjnh6vrCkHmNe14");
  189. NSLog(@"1rQp37ZYOzdWJqM8tnuP2H6SKRvcoxiA0hgjbEe");
  190. NSLog(@"kGpiwnl7TK");
  191. NSLog(@"JblmcEFGBO37sDvjMReZUf");
  192. NSLog(@"koSGyjE0VxtB5pb4qTm2HFJXsulPMnI6CWNY9e3");
  193. NSLog(@"YUDnvyQ4wbr0StmPHhNgfesaMTOkxoF5l");
  194. }
  195. -(void)akT9hQ:(UIButton*) akT9hQ aO6uxnS9:(UIInputView*) aO6uxnS9 an1gIkZUMif:(UIScreen*) an1gIkZUMif apyz93:(UIApplication*) apyz93 ajH80UQ:(UIApplication*) ajH80UQ aSdgiu:(UIUserInterfaceIdiom*) aSdgiu aIzUt2e:(UILabel*) aIzUt2e aXGqHU:(UIActivity*) aXGqHU aEyD1YR:(UIImageView*) aEyD1YR aF50fy1:(UISearchBar*) aF50fy1 acOV7NoZ:(UIDocument*) acOV7NoZ aUxK6rVs:(UIApplication*) aUxK6rVs a6IOgAc5Us:(UIEdgeInsets*) a6IOgAc5Us aopetQSEjW4:(UITableView*) aopetQSEjW4 aiqNX:(UIUserInterfaceIdiom*) aiqNX {
  196. NSLog(@"wglXhsmaVtPzQSqRTW8dEJBxfKb7Gk5O3Cio46F");
  197. NSLog(@"7GBnXNdUke0j25apsV6WxczP4u93Q");
  198. NSLog(@"bu4eO0nat6SypwAULjf");
  199. NSLog(@"uWPUpS9O1QEDCvHtA5nKidYykwZc");
  200. NSLog(@"bI2ZhcO7QG5lSa");
  201. NSLog(@"nD3MTfJpg4YZ1WO");
  202. NSLog(@"LQz0qA1IZ45UWHfRhrvSsDukxGO");
  203. NSLog(@"TfNhCVLPqtB7KiUlr46m");
  204. NSLog(@"IWnHZ7aMBeyYcOsqSk6r");
  205. NSLog(@"Q2xOjaEvlyXcUg0PBiu34t57JS6nCdFw9eTD");
  206. NSLog(@"Pblp2zyMdE");
  207. NSLog(@"zRp349T8dnMIXPj2EwmyiebSx0FBK");
  208. NSLog(@"OYnfM2FeTouXNG");
  209. NSLog(@"yYRV4fe61SEBK3");
  210. NSLog(@"7tuz9qLBUakKpDICPhQJfgAyij86XsE0xN");
  211. NSLog(@"DyuK37Z0JSFj5WiprTc8");
  212. }
  213. -(void)aTv4XS9KdO:(UICollectionView*) aTv4XS9KdO a6PkSaqyt0n:(UIButton*) a6PkSaqyt0n aYhIk40AUKo:(UIMenuItem*) aYhIk40AUKo ag5fO2R:(UIActivity*) ag5fO2R aQgaA:(UIDevice*) aQgaA aKNBI:(UIDocument*) aKNBI adH5jiLRoI:(UIBarButtonItem*) adH5jiLRoI avAP8l2fBQn:(UIApplication*) avAP8l2fBQn {
  214. NSLog(@"1DQsX5Z8VwUvbEkLf");
  215. NSLog(@"8gJCWLb1BIsKi6FuU74dkqvNm3EMj0ehQz5xVnpD");
  216. NSLog(@"hejMVknABxX8pcPvHas2CD3ZQrbS7");
  217. NSLog(@"ez9tXhmQxwb2vWKNOpMJDyu");
  218. NSLog(@"nF1VIdt8aec");
  219. NSLog(@"jy1oY8IfZi0RLsNmqwMKn3");
  220. NSLog(@"hE1fkXU8m0eocqnVxHygBKNuMSRpvi7JtL");
  221. NSLog(@"UKEQ6sWFfrXiabwPhDgtOzJe4Z8cI0H2d5np");
  222. NSLog(@"vp2PRwuc3DjEb4dW");
  223. NSLog(@"UDAbpf9r6IXSNglPc");
  224. NSLog(@"KluYLMz4dIhriE0XABe8wGHsWpO1Sytnocm");
  225. NSLog(@"qX0J87bo65j4cDLgMERe1YSQrfltvKVunATOP2I");
  226. NSLog(@"0tBT1FWuabZhspN9vi64wXdEYoLf7gmRUOyrSDk8");
  227. NSLog(@"VUgiGkdEODrjyQIH9MRF53S0u");
  228. NSLog(@"5AUsi1qDaLO0WMfYSCGKE");
  229. }
  230. @end