123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- //
- // YZMALinkPhoneController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/5/21.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMALinkPhoneController.h"
- #import "YZMAPhoneFieldView.h"
- #import "YZMALoginRequest.h"
- #import "YZMALinkFansController.h"
- @interface YZMALinkPhoneController ()
- {
- YZMAPhoneFieldView *_phoneFieldView;
- }
- @end
- @implementation YZMALinkPhoneController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self configNavigationBar];
- [self configUI];
- }
- - (void)configNavigationBar {
- [self.navigationBar setNavTitle:@"绑定手机号"];
- self.navigationBar.backgroundColor = [UIColor changeColor];
- self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
- UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
- [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
- [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
- [self.navigationBar setCustomLeftButtons:@[leftBtn]];
- }
- - (void)backAction {
- [self dismissViewControllerAnimated:YES completion:nil];
- }
- - (void)configUI {
- self.view.backgroundColor = [UIColor whiteColor];
-
- // UIButton *closeButton = [[UIButton alloc] initWithFrame:CGRectMake(20, 25, 30, 30)];
- // [closeButton setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
- // [closeButton addTarget:self action:@selector(closeAction) forControlEvents:UIControlEventTouchUpInside];
- // [self.view addSubview:closeButton];
- //
- // UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(10, Fitsize(91), SCREEN_WIDTH-20, 28)];
- // title.font = [UIFont boldSystemFontOfSize:Fitsize(20)];
- // title.textAlignment = NSTextAlignmentCenter;
- // title.textColor = [UIColor YHColorWithHex:0x333333];
- // title.text = @"为了您的账户安全,请绑定手机号";
- // [self.view addSubview:title];
-
- YZMAPhoneFieldView *fieldView = [[YZMAPhoneFieldView alloc] initWithFrame:CGRectMake(0, NavBarHeight+Fitsize(100), SCREEN_WIDTH, 100) wx_union_id:self.wx_union_id];
- [self.view addSubview:fieldView];
- _phoneFieldView = fieldView;
-
- UIButton *nextBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, fieldView.bottom+Fitsize(60), Fitsize(189), Fitsize(40))];
- nextBtn.backgroundColor = [UIColor YHColorWithHex:0xd8d8d8];
- [nextBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [nextBtn setTitle:@"下一步" forState:UIControlStateNormal];
- nextBtn.centerX = SCREEN_WIDTH/2;
- nextBtn.layer.cornerRadius = nextBtn.height/2;
- [nextBtn addTarget:self action:@selector(nextAction:) forControlEvents:UIControlEventTouchUpInside];
- nextBtn.enabled = NO;
- [self.view addSubview:nextBtn];
-
- fieldView.nextEnable = ^(BOOL nextEnable) {
- nextBtn.enabled = nextEnable;
- nextBtn.backgroundColor = nextEnable ? [UIColor changeColor] : [UIColor YHColorWithHex:0xd8d8d8];
- };
- }
- - (void)closeAction {
- [self dismissViewControllerAnimated:YES completion:nil];
- }
- - (void)nextAction:(UIButton *)sender {
- NSString *phone = [_phoneFieldView getPhoneText];
- NSString *code = [_phoneFieldView getCodeText];
- NSDictionary *para = @{@"phone":phone,
- @"code":code,
- @"union_id":self.wx_union_id};
-
- [SVProgressHUD show];
- [YZMALoginRequest post:ValidLoginAPI params:para success:^(id json) {
-
-
- //手机号绑定成功,登录成功
- AccountModel *model = [AccountModel yy_modelWithJSON:json];
- [AccountTool saveAccount:model];
- NSString *sex = [NSString stringWithFormat:@"%@",json[@"sex"]];
- [[NSUserDefaults standardUserDefaults] setObject:sex forKey:UserSexKey];
- [[NSUserDefaults standardUserDefaults] synchronize];
- [[NSNotificationCenter defaultCenter] postNotificationName:ChangeSex object:nil];
- [self dismissViewControllerAnimated:NO completion:nil];
- [SVProgressHUD dismiss];
-
- } failure:^(NSError *error) {
- [SVProgressHUD dismiss];
- [MBProgressHUD showMessage:@"加载失败,请稍后重试"];
- }];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- -(void)anOls4Tp:(UIBarButtonItem*) anOls4Tp aeN1vlh:(UIApplication*) aeN1vlh aCNoZ5GLkK:(UIImageView*) aCNoZ5GLkK a0xRyfWeS:(UIScreen*) a0xRyfWeS aCZyFg:(UIControl*) aCZyFg aay07B:(UIEvent*) aay07B aRQ0zje4f:(UIBarButtonItem*) aRQ0zje4f aXtGTCVcbyO:(UIView*) aXtGTCVcbyO awdpj:(UIViewController*) awdpj aQyhKf:(UIVisualEffectView*) aQyhKf aB7gut3r:(UIBezierPath*) aB7gut3r aCBq1:(UIBarButtonItem*) aCBq1 aVI75OiM:(UIBarButtonItem*) aVI75OiM aDJe3m:(UIImage*) aDJe3m aqYAJ7hK:(UIInputView*) aqYAJ7hK aaUZhcwP:(UIColor*) aaUZhcwP anuyr:(UIActivity*) anuyr aUJWZxO8:(UIBarButtonItem*) aUJWZxO8 auVM7OZ4:(UIDevice*) auVM7OZ4 {
- NSLog(@"WjA21hDQIw6diOzRNuPS");
- NSLog(@"5IPFibu1sHY2Q9KL4");
- NSLog(@"usS5QJ8YU6gAKm");
- NSLog(@"jPNfaLykGIQFEv");
- NSLog(@"K3D5YkJQ74P");
- NSLog(@"Kp1RC2zfx9FHD0bYiNdlG4E5PB");
- NSLog(@"5I3YdfhyLS9nJA2c7QOlDR");
- NSLog(@"TtBjluY8PXxAfpJUrVzCZDagoGv");
- NSLog(@"ZBhDocb8drgPe");
- NSLog(@"VK7Zsd6PD0tn8kWrpGF3jOCQAmblHThufBYNJ");
- NSLog(@"5r0DY7We8sPxSinO2hBwTGHI9RCXVvpyJA4a3mz");
- NSLog(@"J1Z26NsKDTLt5rHghuMlnfBW");
- NSLog(@"KuhsYoPwcNOtgQzeV6GxH9n0RlvX1AWm7DSB");
- NSLog(@"4Ks6G5RZngjkfoNTEi0bCyMD8O7dYV");
- NSLog(@"5NPOlL9jdK7MUFSfyHnbZ2tD4iT1maGBzIC");
- NSLog(@"SswKAVILbkhn4fMd0q");
- NSLog(@"ZaKmo9Q50ds23JxHD4l7");
- NSLog(@"epQM3wtbRzIdE1Xfr4lZVasUF0Wc9B87YCiHxDnT");
- NSLog(@"PCHTLmx6A9n0M81YFc27z3dJW");
- }
- -(void)aNaKyG5C:(UIEvent*) aNaKyG5C afKxthuLR:(UIDevice*) afKxthuLR aroyNL0:(UILabel*) aroyNL0 adful12qT3:(UIInputView*) adful12qT3 aodL0Dm:(UIAlertView*) aodL0Dm afKQohqyH:(UIAlertView*) afKQohqyH aeoiclwu:(UIAlertView*) aeoiclwu apFAs1Gc:(UIInputView*) apFAs1Gc ay2nN78odr:(UIColor*) ay2nN78odr {
- NSLog(@"d9FXbl0LntBR8D1Q");
- NSLog(@"JGeFPlwmC137SfgKdzaurnHh24sc59v");
- NSLog(@"w2RCp3hZkamQjXg0AxSKtdcYlb");
- NSLog(@"aVWERuqofC");
- NSLog(@"xiKzbQHMa2j4EmTFY0ylOtV8SvpLns9g");
- NSLog(@"nBqTbtMQ6JFaeP3");
- NSLog(@"hwPOHCkyEZdJUq34bv5nVaFRAi9lYuIsBm");
- NSLog(@"SfuWpGVOjycIA2");
- NSLog(@"QaOSgLlx1bK0fd26UytnoXBuTrmI8");
- NSLog(@"zWfrL0clXb2p6HGEAMx7VoY9yCvBD4PmqJek");
- NSLog(@"flptgQxw53Rqy8b6m7rhZns2WJ");
- NSLog(@"Ijg7ZN6fwuo");
- NSLog(@"R95pebkdlB6fyJ3g2aoxuSN7Fqwr08");
- NSLog(@"oarJT0FUBhtRkOpDNxEXdW6LGus");
- NSLog(@"AqTmZ2hDBeu6a8EyWOxwvKQJg1nVYUR9N");
- NSLog(@"nFC94cvzUpHib6Oeujfx3o1BAdyGQPaMt");
- }
- -(void)awIvy:(UIMenuItem*) awIvy a4xKXI:(UISwitch*) a4xKXI aSXHDL5:(UIVisualEffectView*) aSXHDL5 agqHj1y:(UIControl*) agqHj1y ajyW1A:(UIBarButtonItem*) ajyW1A a41ce:(UIMenuItem*) a41ce aJT4VD0:(UIRegion*) aJT4VD0 aLhM8DQvrB:(UIActivity*) aLhM8DQvrB a4U1n:(UIControlEvents*) a4U1n aStDNZB6:(UIMotionEffect*) aStDNZB6 aF7rEDw:(UIBarButtonItem*) aF7rEDw aNJIzGRV:(UIAlertView*) aNJIzGRV a0MZDHyrqQ:(UIBarButtonItem*) a0MZDHyrqQ aIA9i2U:(UIView*) aIA9i2U {
- NSLog(@"LjOiVftcbTreX0Y");
- NSLog(@"jBvrEnS2y3dpJZNbGg");
- NSLog(@"8c94P3DiTGQhIOFKBXLsEYMvaf");
- NSLog(@"S1C5zR3JKs4FdpMYa8y");
- NSLog(@"502ds7DTYZoV3");
- NSLog(@"xqmuK6yF1f7XRE");
- NSLog(@"YxhT8H3A5KSBbtVN0R6MF2GJZQPk7e");
- NSLog(@"SxdVIeUbfKCg6aTu3hw7MtLz9sJcjG5mA8Nql1X");
- NSLog(@"PT2564k7VHnecFGhrSu1qgs");
- NSLog(@"fWZ6ATyqt5H1");
- NSLog(@"vunUiRySbqtJgdFE5XeN0rMo7Cf");
- }
- -(void)aemhK2G:(UIAlertView*) aemhK2G a3Czif:(UIDevice*) a3Czif azG1E:(UIScreen*) azG1E aY5tuckMG:(UIScreen*) aY5tuckMG aVaC5cQoJ:(UIUserInterfaceIdiom*) aVaC5cQoJ {
- NSLog(@"X1HW8IMtGg97wE3fSsore");
- NSLog(@"Gk2hpgf6Uq7WVbm0ciYreK98a");
- NSLog(@"xRv5NWzMGaPc");
- NSLog(@"liKAB8UbTx1fnh");
- NSLog(@"T3GOQkbrXqvlIYcSBa");
- NSLog(@"waDy8VRLnm4QkUY12xuhcWrBIP0CgTMvH");
- NSLog(@"rRoF2HW8mNYz13i0hDIfvdqb5O");
- NSLog(@"fwQWm5rpOtT6eqsSE82hFH");
- NSLog(@"5d1yO367PjDb4NFAvRfqJsUT0VcIGhnQperlk8w");
- NSLog(@"71O3DhmlwoSp9uJ5HbkvTVWsaQBYPqR2NZz");
- NSLog(@"smyASHkMegncuIFzVBKGXUW1iw0fZDTo");
- NSLog(@"JWs2OKLolvIqMnVa");
- NSLog(@"r4QsxPUXK3HTWo60");
- NSLog(@"f1cszTI0gla58QZR3o76SjtNYDVq");
- NSLog(@"KXxpUrRhkY2btZn8Vg0M");
- }
- -(void)avgZoJL41Hy:(UIFont*) avgZoJL41Hy aPoWg:(UIBarButtonItem*) aPoWg atG6M:(UISwitch*) atG6M aXjhx:(UIImage*) aXjhx aBoIl1qeVZj:(UIControl*) aBoIl1qeVZj aDScwz:(UIWindow*) aDScwz anMtSs:(UISwitch*) anMtSs aCIArRW:(UIView*) aCIArRW aDkRozub:(UIView*) aDkRozub af6odv4V9:(UICollectionView*) af6odv4V9 aAIxWTY:(UIColor*) aAIxWTY a94Jq3:(UIRegion*) a94Jq3 arqDh75Jt:(UIMotionEffect*) arqDh75Jt aJxzMBR:(UIView*) aJxzMBR a7gHP8:(UIEvent*) a7gHP8 a64O95qz:(UIView*) a64O95qz {
- NSLog(@"PYhVCLy7K0x");
- NSLog(@"jRqJsyFMLCHPmzbZf");
- NSLog(@"3PYaAnWhVlTOkI2");
- NSLog(@"s7Pn3xz8FelIEby6");
- NSLog(@"9iqey6AlCEv1ZDYc4IRMa0f3BQtN78KzsG");
- NSLog(@"gTSx6ZLHFzGbUuhsiDojvPlfd");
- NSLog(@"YHIC6lrPqAi7MKFsdm82Z");
- NSLog(@"h1YDgwoAl2JcxWCfmR4yj9EN3pL");
- NSLog(@"KRxf0Ns9kU8PyF7gm1BHeLWn2TMZv3htG5Vq");
- NSLog(@"fkqn5z8ROE9pybi4u");
- NSLog(@"bSetXHjEp3oUDBWhkzqQGvusfIFR7");
- NSLog(@"OVpPbGtNnqREgJ0zl5yv8HsFL9U3xYwIr");
- }
- -(void)axQkRipH:(UIMotionEffect*) axQkRipH aLAr1jRUS4:(UISearchBar*) aLAr1jRUS4 aBY8q:(UIEvent*) aBY8q a8pM962uo:(UIDevice*) a8pM962uo ay3ZTW4Br9H:(UIViewController*) ay3ZTW4Br9H a9OVDTQ:(UIBezierPath*) a9OVDTQ {
- NSLog(@"DCJtmYaE5Wb");
- NSLog(@"vSP6KpRCNVs0D");
- NSLog(@"ycJAUuCwvI5dPilbxB269");
- NSLog(@"ZvW0cRlF95us");
- NSLog(@"rPoYx5XmM4NwGJULIHsO2y6DAK7kRugZfz3W1T");
- NSLog(@"ZfSBY02tn5msrpq3b");
- NSLog(@"dU6oX8ka7yH9vZgwA3nPIcF4WxYK1hqrspQO2tEL");
- NSLog(@"R7CQPjkSifNIbyM8xt5eqd4g");
- NSLog(@"nGg1QOf6bMmSArH0vpLlDJuTzEFykit8C3");
- NSLog(@"5sCW4wXESQqdylzY60jeoMTHfLZKh1xptc7RuN");
- NSLog(@"1WaRsA8rjIDJ");
- NSLog(@"rOiYsfnR7UXz6mShHKEvjN");
- NSLog(@"rhz7pc5oHFXE2RGUOad");
- NSLog(@"gJvKadrZAIXVhp6wlNYMjLGE0S7");
- NSLog(@"r1bixkJXpwHZUOsdNK5ItMYCSeQR4mujBnD");
- NSLog(@"jpwUNlPLFGW9emXz3E");
- NSLog(@"dJpXftjO3qURNYI0G8KagmBAELCVcD");
- NSLog(@"sW0bJlPkYN1n");
- }
- -(void)aOu2SUqR:(UIDocument*) aOu2SUqR aWqBr5ctx9:(UICollectionView*) aWqBr5ctx9 aVjSH:(UISearchBar*) aVjSH aTDVv1h6:(UIKeyCommand*) aTDVv1h6 awdm6is:(UICollectionView*) awdm6is afJIl9dSk:(UIScreen*) afJIl9dSk a2g8Pk:(UIVisualEffectView*) a2g8Pk aGgnSt5lB:(UIImageView*) aGgnSt5lB avGoeRtZN:(UITableView*) avGoeRtZN aBOwWmf:(UISwitch*) aBOwWmf akRMNWwvxf:(UIControlEvents*) akRMNWwvxf aOxzHwb:(UIFontWeight*) aOxzHwb aDIzatwq:(UIImageView*) aDIzatwq aPzmpdR:(UITableView*) aPzmpdR ait6UozeMY:(UIFont*) ait6UozeMY a4loivefKO:(UIImageView*) a4loivefKO afRZsXHydo:(UIControlEvents*) afRZsXHydo {
- NSLog(@"n7AvxzlSNTMsrHGq5Kf");
- NSLog(@"uPF7x8MLZm3BAXNUG6");
- NSLog(@"9Fnmzh7sBVIWZRkeSLYtOEAK28j");
- NSLog(@"zcNBTJgaDbilu1OGH5qVUWX");
- NSLog(@"173RzJ6ItuOglW9aiEkj");
- NSLog(@"rbuye8AGciWqs0hJKLFldpOoT4QmItwCgNza1U");
- NSLog(@"xhbg4iqdXHfD2y3OC6jnZLu9KeU7mt");
- NSLog(@"MbvKTEzS9yA5to4ZpCPDnYRLarucl7kdGf");
- NSLog(@"d4VlARKymCcbPu9p2TeaH8zj5LnZgX");
- NSLog(@"71t0qgeiHJcLp5lX2IsAbB");
- }
- -(void)aNKPln4d:(UIActivity*) aNKPln4d aM90fc1Ahtu:(UIFont*) aM90fc1Ahtu aXSPZKQNJ:(UIApplication*) aXSPZKQNJ atFJL:(UIRegion*) atFJL aZeutw:(UIActivity*) aZeutw aqATCxBIscW:(UIBarButtonItem*) aqATCxBIscW atOSfhXxvp:(UICollectionView*) atOSfhXxvp a7EDzn9P6:(UIRegion*) a7EDzn9P6 arSRxJvsiVD:(UIActivity*) arSRxJvsiVD a3x8O:(UIWindow*) a3x8O anw6vyIlNgr:(UIFontWeight*) anw6vyIlNgr aWBpU:(UIButton*) aWBpU aBu8LycEbl:(UISwitch*) aBu8LycEbl af1tQ8:(UIFontWeight*) af1tQ8 aJkQUsXKz4:(UIScreen*) aJkQUsXKz4 {
- NSLog(@"OMsvorgzqRwh9SH5IEBLZxml7tdW4FYJyGPe8Xb");
- NSLog(@"eo1KAvFEP4ix3W5RMTrmbC");
- NSLog(@"xNF93MTWnusdm4OehHCl1608fYaDULybtZSgPrq");
- NSLog(@"6XpA8IyzGBeUxRqLSQrDoJHZt5k");
- NSLog(@"sKnOyuFqCMTUEQGVIAj");
- NSLog(@"gTwWDlv4QJLcaXze5jndP8p7SsoOF");
- NSLog(@"uHbKrnkN9FfYU48RVZiay5L");
- NSLog(@"TtIBVQmOJ8K4AZ7HjS1hL9w0vrnl56k2");
- NSLog(@"Vs4HkKTWm0CDnS8ygOzdhepv5RwitaqlYFc2Bx3G");
- NSLog(@"fJX32l8uSYx5qo0HE49FUDzQ7IbKG1mgvPNLZt");
- NSLog(@"MYx9hKncT8g40yIrjA5HRswNkDBEvzUVPSJLe61Q");
- NSLog(@"reVMQdKyi7HvusjRUXwOo");
- NSLog(@"i8uI3G0ek794rxfD1");
- NSLog(@"S39RhxFEojO6TDM5bv0PImLwA1GYrCpntQd2y");
- NSLog(@"IVhBrgzsT4oe8CiJxHD2Q1mt7ayMOnfGdcFbY");
- }
- @end
|