IVTGainsViewController.m 2.19 KB
//
//  IVTGainsViewController.m
//  IVTMeLiveTwo
//
//  Created by xrg on 16/9/29.
//  Copyright © 2016年 QLQ. All rights reserved.
//

#import "IVTGainsViewController.h"
#import "ExchangeViewController.h"
@interface IVTGainsViewController ()

@end

@implementation IVTGainsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self setNavigationBar];
    [self initUI];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

- (void)setNavigationBar{
    self.navigationItem.title = @"我的收益";
}

- (void)initUI
{
    
    self.miTangTotal.text = [NSString stringWithFormat:@"%ld",[[IVTAccountTool getMeCoinBalance] integerValue]];
    
    self.canWithdrawTotal.text = [NSString stringWithFormat:@"可领取的收益为%.f元,请与客服联系领取",[[IVTAccountTool getMeCoinBalance] integerValue] *[[IVTAccountTool getAppInfoByType:2] floatValue]];
     
    self.canExchangeTotal.text = [NSString stringWithFormat:@"可兑换数量为%.f中国币",[[IVTAccountTool getMeCoinBalance] integerValue] * [[IVTAccountTool getAppInfoByType:7] floatValue]];
    
}

// 提现
- (IBAction)withdrawTotalFunc:(id)sender {
    UIAlertView * alertV = [[UIAlertView alloc] initWithTitle:@"领取收益红包" message:@"请与客服联系" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];;
    [alertV show];
}

//  兑换
- (IBAction)exchangeTotalFunc:(id)sender {
    ExchangeViewController * exchangeVC = [[ExchangeViewController alloc] init];
    exchangeVC.accountNumberEdit = ^(NSString *nickNameString){
        _miTangTotal.text = nickNameString;
    };
    [self.navigationController pushViewController:exchangeVC animated:YES];
}

- (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.
}
*/

@end