IVTGainsViewController.m
2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// 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