123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- //
- // LZMWithdrawNextViewController.m
- // YouHuiProject
- //
- // Created by jcymac on 2018/5/23.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LZMWithdrawNextViewController.h"
- @interface LZMWithdrawNextViewController ()
- @property(nonatomic,strong)UILabel *top1Label;
- @property(nonatomic,strong)UILabel *top2Label;
- @property(nonatomic,strong)UITextField *textField;
- @property(nonatomic,strong)UIView *lineView;
- @property(nonatomic,strong)UIButton *rightBtn;
- @property (nonatomic,strong)UIButton *withdrawBtn;
- @end
- @implementation LZMWithdrawNextViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self addUI];
- [self adjustUI];
- [self configNavigationBar];
- [self rightAction:self.rightBtn];
- }
- - (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]];
- }
- #pragma mark -点击方法
- - (void)backAction {
- [self.navigationController popViewControllerAnimated:YES];
- }
- -(void)withdrawAction{
-
- [self requestWithdraw];
- }
- -(void)rightAction:(UIButton *)sender{
- //获取验证码
- [self requestCode];
- [sender startWithTime:20 title:@"重新发送" countDownTitle:@"s" mainColor:[UIColor clearColor] countColor:[UIColor clearColor]];
-
- }
- #pragma mark -网络请求
- -(void)requestCode{
- //获取验证码
- NSString *url=[NSString stringWithFormat:@"%@/api/v2/users/sendCode",BaseURL];
- NSString *phone=[[NSUserDefaults standardUserDefaults]objectForKey:UserPhone]==nil?@"":[[NSUserDefaults standardUserDefaults]objectForKey:UserPhone];
- NSString *ttl = [PublicFunction getNowTimeTimestamp];
-
- NSString *sign = [NSString stringWithFormat:@"phone=%@&ttl=%@%@",phone,ttl,SignCode];
- NSString *md5Str = [PublicFunction md5:sign];
- NSDictionary *para = @{@"phone":phone,
- @"ttl":ttl,
- @"sign":md5Str
- };
- [LZMHttp post:url params:para success:^(id json) {
-
- } failure:^(NSError *error) {
- if (error) {
- [MBProgressHUD showTip:@"获取失败"];
- }
- }];
-
-
- }
- -(void)requestWithdraw{
-
- if (self.textField.text &&![@"" isEqualToString:self.textField.text]) {
- NSString *url=[NSString stringWithFormat:@"%@/api/v2/adzoneCreate/embodyApplication",BaseURL];
- NSDictionary *dic=@{
- @"money":self.moneyStr,
- @"code":self.textField.text
- };
- [LZMHttp post:url params:dic success:^(id json) {
- [MBProgressHUD showTip:@"提现成功"];
- [SVProgressHUD dismissWithDelay:1.0f];
- [self.navigationController popToRootViewControllerAnimated:YES];
- } failure:^(NSError *error) {
- if (error) {
- [SVProgressHUD showWithStatus:@"服务器开小差了,请稍后再试"];
- [SVProgressHUD dismissWithDelay:1.0f];
- }
-
- }];
- }
-
-
- }
- -(void)addUI{
- [self.view addSubview:self.top1Label];
- [self.view addSubview:self.top2Label];
- [self.view addSubview:self.lineView];
- [self.view addSubview:self.rightBtn];
- [self.view addSubview:self.textField];
- [self.view addSubview:self.withdrawBtn];
- }
- -(void)adjustUI{
- [self.top1Label mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(FITSIZE(20));
- make.top.mas_equalTo(94);
-
- }];
- [self.top2Label mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self.top1Label.mas_bottom).offset(8);
- make.left.equalTo(self.top1Label.mas_left);
- }];
- [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(FITSIZE(20));
- make.right.mas_equalTo(FITSIZE(-20));
- make.top.equalTo(self.top2Label.mas_bottom).offset(70);
- make.height.mas_equalTo(0.5f);
- }];
- [self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.equalTo(self.lineView.mas_right);
- make.bottom.equalTo(self.lineView.mas_top).offset(-10);
- }];
- [self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.equalTo(self.rightBtn.mas_centerY);
- make.left.equalTo(self.lineView.mas_left);
-
- }];
- [self.withdrawBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.equalTo(self.view.mas_centerX);
- make.top.equalTo(self.lineView.mas_bottom).offset(196);
- make.width.mas_equalTo(FITSIZE(250));
- make.height.mas_equalTo(42);
- }];
- }
- -(UILabel *)top1Label{
- if (!_top1Label) {
- _top1Label=[[UILabel alloc]init];
- _top1Label.textColor=[UIColor YHColorWithHex:0x333333];
- _top1Label.text=@"为了您的账户安全,已给您的手机发送了验证码";
- _top1Label.font=[UIFont systemFontOfSize:16];
- }
- return _top1Label;
- }
- -(UILabel *)top2Label{
- if (!_top2Label) {
- _top2Label=[[UILabel alloc]init];
- _top2Label.textColor=[UIColor YHColorWithHex:0x333333];
- _top2Label.text=@"请输入验证码";
- _top2Label.font=[UIFont systemFontOfSize:16];
- }
- return _top2Label;
- }
- -(UIView *)lineView{
- if (!_lineView) {
- _lineView=[[UIView alloc]init];
- _lineView.backgroundColor=[UIColor YHColorWithHex:0xE5E5E5];
-
- }
- return _lineView;
- }
- -(UITextField *)textField{
- if (!_textField) {
- _textField=[[UITextField alloc]init];
- _textField.placeholder=@"请输入验证码";
- _textField.font=[UIFont systemFontOfSize:16];
- }
- return _textField;
- }
- -(UIButton *)rightBtn{
- if (!_rightBtn) {
- _rightBtn=[UIButton buttonWithType:UIButtonTypeCustom];
- [_rightBtn setTitle:@"重新发送" forState:UIControlStateNormal];
- [_rightBtn setTitleColor:[UIColor YHColorWithHex:0xFF5200] forState:UIControlStateNormal];
- [_rightBtn addTarget:self action:@selector(rightAction:) forControlEvents:UIControlEventTouchUpInside];
- _rightBtn.titleLabel.font=[UIFont systemFontOfSize:14];
- }
- return _rightBtn;
- }
- -(UIButton *)withdrawBtn{
- if(!_withdrawBtn){
- _withdrawBtn=[UIButton buttonWithType:UIButtonTypeCustom];
- _withdrawBtn.backgroundColor=[UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xFF9000] toColor:[UIColor YHColorWithHex:0xFF5000] withWidth:FITSIZE(250)];
- [_withdrawBtn setTitle:@"申请提现" forState:UIControlStateNormal];
- [_withdrawBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- [_withdrawBtn addTarget:self action:@selector(withdrawAction) forControlEvents:UIControlEventTouchUpInside];
- _withdrawBtn.titleLabel.font=[UIFont systemFontOfSize:16];
- _withdrawBtn.layer.cornerRadius=21;
- _withdrawBtn.layer.masksToBounds=YES;
- }
- return _withdrawBtn;
- }
- -(void)aOGv6L:(UIAlertView*) aOGv6L adBl7oqc:(UIVisualEffectView*) adBl7oqc acF6UyA:(UIImageView*) acF6UyA aARTeh:(UIRegion*) aARTeh a8kefL:(UIBarButtonItem*) a8kefL {
- NSLog(@"jcFpxNh7Y5Ltw1URHgbesDB3MT");
- NSLog(@"SPwNFYglH3eo0DOdx");
- NSLog(@"DeGOa7YByXJjt0hfq");
- NSLog(@"w5O4RCixhb3jalzI7JkXgVsdv9P86tQ0yFMBUT");
- NSLog(@"V7wQARuOBE0lpN6teGkjzxSY");
- NSLog(@"bfBoi593C8STHcstuaA4wdrknWxOyRvl2U");
- NSLog(@"x9vhctUIbCdL784Ml");
- NSLog(@"0CDU8kFLQ7mzhO3TIHwRdW");
- NSLog(@"ZbM9rak2clsEOVAqfvGwgL6NKPYm");
- NSLog(@"nbS3KP7NzJcHlXsetR4gZ0rYaoI26vEdwfqG1x");
- NSLog(@"xfmP4K5Rtey1w0B3ndEvV2gbGaF");
- NSLog(@"1UD0qYtuxrARWJelN3GCBnE6iw");
- }
- -(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 {
- NSLog(@"hJ27FpxqYvGDWEI5ejzCZ6f8aUyMnRLXHAwg");
- NSLog(@"d03AB7hMVgvc8qoaDLY5TH9QZxO4iEUFXbPws");
- NSLog(@"n6dL4jSzkCqr0iZy5RlXWvKw");
- NSLog(@"rUp62G4wt1vTz");
- NSLog(@"CUXJohPqEMbjK1TORN");
- NSLog(@"A6EDCVdprRBuvTagf4ZbQsWKyOlntUNIxc1");
- NSLog(@"EjJQpDGObmnlh3UZ75kK940z");
- NSLog(@"V1Wx8eQXZKNmuTJ9Cy0g7naqhsjU5pcdLR");
- NSLog(@"04QsgIBNyh3u");
- NSLog(@"ln9MDwBAxUFLGi8gSKf6Oa4k");
- NSLog(@"GxcZNuX1ht");
- NSLog(@"PFhpQ0J3EiXWoBUC6eGVMDxzA");
- NSLog(@"xKo4hncyDpOJZ7sfSq0ITEvaWrUN");
- NSLog(@"NHVOro4ZPiUJ7");
- NSLog(@"L1VuaEBqpmftoIxZTObHYAy7kd6Swz");
- NSLog(@"5NEKgjMpa0n");
- NSLog(@"u1BYdrV0ewGp9acJbEZCo6fOkhXDi7qF4vQ");
- NSLog(@"FkzKLl9pgubdfQHrDXjCiScBmZq5OtGPVs7");
- }
- -(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 {
- NSLog(@"ehsnFQvqit9OyJVSXZELMpxb0dljk1G");
- NSLog(@"iAs9phzn5kG1723vfTI");
- NSLog(@"PR0AkXH6hITwp1nGq4zc");
- NSLog(@"7Y1OZje8zu5pTRklvbaA4IFEW2wt9oQgHNrJs");
- NSLog(@"jln9hrdHRAiwt7Cp1D0aBk68Fsb3ocLSNQ2IZfv");
- NSLog(@"TYQ8mnArIsz");
- NSLog(@"6iIlCxjg3uB5vtRPUh");
- NSLog(@"zGtcnaAYWbvZqfU046iN");
- NSLog(@"2SexDhQyZBF68WNLPwJiGgTlYzs7k");
- NSLog(@"Zy2AgPWMVbXj7sqQ4TR6p3");
- NSLog(@"FtqlJd82VnG16cW3gEzUMoSfKLHDQ5NO7PmAyhxi");
- NSLog(@"MCu0zDPZULBgXNv2AwrlWxQiK6OYEHp798k1eJ");
- NSLog(@"ptrEBlqD0A94CIiusyoWNh6XZx1T");
- NSLog(@"AwJGjUb5XNH6ponamgKW2BRdi");
- NSLog(@"gpByQdeAb9G0fn1lZF2VuNmIwW");
- NSLog(@"E9dcgQXOtxGnDZvB");
- NSLog(@"uWhPtzoCH4XdkVNIwBm3LTxyqRQpFjai");
- NSLog(@"0oK3slcqdtTyYBuJ2mU");
- NSLog(@"xenVmHAqgrK839k1WuCoYTpBaS");
- }
- @end
|