123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- //
- // JXShenQinTiMoneyVc.m
- // shiku_im
- //
- // Created by 123 on 2020/5/30.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXShenQinTiMoneyVc.h"
- #import "JLWithdrawalRecordViewController.h"
- #import "JXTiMoneyShowView.h"
- @interface JXShenQinTiMoneyVc ()
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topViewH;
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topviewConstH;
- @property (weak, nonatomic) IBOutlet UITextField *coinTF;
- @property (weak, nonatomic) IBOutlet UITextField *moneyTF;
- @property (weak, nonatomic) IBOutlet UIButton *tijiaoBtn;
- @property (nonatomic,copy) NSString *coinStr;
- @property (nonatomic,weak) JXTiMoneyShowView *moneyShowView;
- @end
- @implementation JXShenQinTiMoneyVc
- - (IBAction)goback:(UIButton *)sender {
-
- if (sender.tag==0) {
- [g_navigation dismissViewController:self animated:YES];
- }else{
- JLWithdrawalRecordViewController *vc = [[JLWithdrawalRecordViewController alloc] init];
- [g_navigation pushViewController:vc animated:YES];
- }
- }
- - (void)tijiaoBtnClick{
- [self.view endEditing:YES];
- if (_moneyTF.text.length==0) {
- [SVProgressHUD showWithStatus:@"请输入您的提现金额"];
- [SVProgressHUD dismissWithDelay:1.0];
- return;
- }
- // NSString *moenyStr=[_moneyTF.text stringByReplacingOccurrencesOfString:@" " withString:@""];
- if ([_coinTF.text intValue]<=[_moneyTF.text intValue]) {
- [SVProgressHUD showWithStatus:@"您的余额不足 不能提现"];
- [SVProgressHUD dismissWithDelay:1.0];
- return;
- }
-
- [SVProgressHUD show];
- long time = (long)[[NSDate date] timeIntervalSince1970];
- time = (time *1000 + g_server.timeDifference);
- NSString *salt = [NSString stringWithFormat:@"%ld", time];
-
- [g_server addWithdrawlPlatformName:salt account:@"即信" amount:_moneyTF.text reason:@"" remark:@"" verifyCode:@"" userId:g_server.myself.userId userName:g_server.myself.userNickname toView:self];
-
-
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.topviewConstH.constant=JX_SCREEN_HEIGHT>=812?88:64;
- [self.tijiaoBtn addTarget:self action:@selector(tijiaoBtnClick) forControlEvents:UIControlEventTouchUpInside];
-
- long time = (long)[[NSDate date] timeIntervalSince1970];
- time = (time *1000 + g_server.timeDifference);
- NSString *salt = [NSString stringWithFormat:@"%ld", time];
- [g_server getMyCoinsss:salt andToView:self];
-
- JXTiMoneyShowView *show=[[JXTiMoneyShowView alloc]init];
- show.frame=[UIScreen mainScreen].bounds;
- [[UIApplication sharedApplication].keyWindow addSubview:show];
- self.moneyShowView=show;
- show.hidden=YES;
- [show.knowBtn addTarget:self action:@selector(addBtnClick) forControlEvents:UIControlEventTouchUpInside];
-
- }
-
- - (void)addBtnClick{
- [g_navigation dismissViewController:self animated:YES];
-
- }
-
- - (void)didServerResultSucces:(JXConnection *)aDownload dict:(NSDictionary *)dict array:(NSArray *)array1{
- [SVProgressHUD dismiss];
- if ([aDownload.action isEqualToString:act_GetMyCoin]) {
- NSString * moneyStr = [NSString stringWithFormat:@"%@",dict[@"coin"]];
- _coinStr=moneyStr;
- self.coinTF.text=moneyStr;
- }
- if ([aDownload.action isEqualToString:act_addWithdrawl]) {
-
- self.moneyShowView.hidden=NO;
- }
- }
- - (int)didServerResultFailed:(JXConnection *)aDownload dict:(NSDictionary *)dict{
- [SVProgressHUD dismiss];
- if ([aDownload.action isEqualToString:act_alipayTransfer] || [aDownload.action isEqualToString:act_alipayTransferV1]) {
-
- }
- return show_error;
- }
- - (int)didServerConnectError:(JXConnection *)aDownload error:(NSError *)error{
- [SVProgressHUD dismiss];
- return hide_error;
- }
- @end
|