企业包半屏充值

This commit is contained in:
fengshuo
2022-06-08 20:20:25 +08:00
parent 38055bccca
commit c20a48f9db
11 changed files with 935 additions and 7 deletions

View File

@@ -727,9 +727,9 @@
E84150C227747BF700A7F548 /* FirstRechargeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C127747BF700A7F548 /* FirstRechargeModel.m */; };
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */; };
E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */; };
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */ = {isa = PBXBuildFile; fileRef = E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */; };
E84843AF27F59E7E0050D365 /* XPRoomPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */; };
E84843B227F5A0740050D365 /* XPRomPKResultTitleLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */; };
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */ = {isa = PBXBuildFile; fileRef = E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */; };
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */; };
E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E412727EE0A008818C6 /* XPRoomMessageHeaderView.m */; };
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E452727EF9D008818C6 /* XPRoomMessageParser.m */; };
@@ -757,6 +757,9 @@
E852D74728633E92001465ED /* MonentsCommentReplyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D74628633E92001465ED /* MonentsCommentReplyModel.m */; };
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E85410342864155A005CFD9F /* XPMonentDetailPresenter.m */; };
E854103928646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */; };
E854DFD72850AAC20033120D /* XPMineHalfRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E854DFD62850AAC20033120D /* XPMineHalfRechargeViewController.m */; };
E854DFDA2850AC8D0033120D /* XPEnterprisePayTypeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E854DFD92850AC8D0033120D /* XPEnterprisePayTypeView.m */; };
E854DFDD2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E854DFDC2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m */; };
E855514E2805152B005F293F /* XPGuildTimePickView.m in Sources */ = {isa = PBXBuildFile; fileRef = E855514D2805152B005F293F /* XPGuildTimePickView.m */; };
E855515128055581005F293F /* XPGuildTimeMonthPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E855515028055581005F293F /* XPGuildTimeMonthPickerView.m */; };
E855515B280559FE005F293F /* NSDate+DateUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = E855515A280559FE005F293F /* NSDate+DateUtils.m */; };
@@ -2546,12 +2549,12 @@
E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstRechargeRewardModel.m; sourceTree = "<group>"; };
E841ED5F280FB0BD00904808 /* ContentLevelUpgradeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentLevelUpgradeModel.h; sourceTree = "<group>"; };
E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLevelUpgradeModel.m; sourceTree = "<group>"; };
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseTarotPayView.h; sourceTree = "<group>"; };
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseTarotPayView.m; sourceTree = "<group>"; };
E84843AD27F59E7E0050D365 /* XPRoomPKResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKResultView.h; sourceTree = "<group>"; };
E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKResultView.m; sourceTree = "<group>"; };
E84843B027F5A0740050D365 /* XPRomPKResultTitleLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRomPKResultTitleLabel.h; sourceTree = "<group>"; };
E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRomPKResultTitleLabel.m; sourceTree = "<group>"; };
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseTarotPayView.h; sourceTree = "<group>"; };
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseTarotPayView.m; sourceTree = "<group>"; };
E84B0E3D2727EDF6008818C6 /* XPRoomMessageTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageTableViewCell.h; sourceTree = "<group>"; };
E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageTableViewCell.m; sourceTree = "<group>"; };
E84B0E402727EE0A008818C6 /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = "<group>"; };
@@ -2610,6 +2613,12 @@
E8541036286443D8005CFD9F /* XPMonentsDetailProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsDetailProtocol.h; sourceTree = "<group>"; };
E854103728646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsReplyMoreTableViewCell.h; sourceTree = "<group>"; };
E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsReplyMoreTableViewCell.m; sourceTree = "<group>"; };
E854DFD52850AAC20033120D /* XPMineHalfRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineHalfRechargeViewController.h; sourceTree = "<group>"; };
E854DFD62850AAC20033120D /* XPMineHalfRechargeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineHalfRechargeViewController.m; sourceTree = "<group>"; };
E854DFD82850AC8D0033120D /* XPEnterprisePayTypeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterprisePayTypeView.h; sourceTree = "<group>"; };
E854DFD92850AC8D0033120D /* XPEnterprisePayTypeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterprisePayTypeView.m; sourceTree = "<group>"; };
E854DFDB2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseHalfCollectionViewCell.h; sourceTree = "<group>"; };
E854DFDC2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseHalfCollectionViewCell.m; sourceTree = "<group>"; };
E855514C2805152B005F293F /* XPGuildTimePickView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildTimePickView.h; sourceTree = "<group>"; };
E855514D2805152B005F293F /* XPGuildTimePickView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGuildTimePickView.m; sourceTree = "<group>"; };
E855514F28055581005F293F /* XPGuildTimeMonthPickerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildTimeMonthPickerView.h; sourceTree = "<group>"; };
@@ -6511,6 +6520,8 @@
E8FDB61C28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m */,
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */,
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */,
E854DFD52850AAC20033120D /* XPMineHalfRechargeViewController.h */,
E854DFD62850AAC20033120D /* XPMineHalfRechargeViewController.m */,
);
path = View;
sourceTree = "<group>";
@@ -6546,6 +6557,8 @@
E83A2A4E282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.m */,
E83A2A50282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.h */,
E83A2A51282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.m */,
E854DFDB2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.h */,
E854DFDC2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
@@ -6557,6 +6570,8 @@
E83A2A45282F5662002AD58F /* XPEnterpriseRechargeHeaderView.m */,
E83A2A53282F5C50002AD58F /* XPEnterpriseRechargeFootView.h */,
E83A2A54282F5C50002AD58F /* XPEnterpriseRechargeFootView.m */,
E854DFD82850AC8D0033120D /* XPEnterprisePayTypeView.h */,
E854DFD92850AC8D0033120D /* XPEnterprisePayTypeView.m */,
);
path = SubViews;
sourceTree = "<group>";
@@ -9764,6 +9779,7 @@
E8998D8B2859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.m in Sources */,
E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */,
9B2A12D82783F42300CED41B /* XPNoblePrivilegeContentCell.m in Sources */,
E854DFD72850AAC20033120D /* XPMineHalfRechargeViewController.m in Sources */,
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
E81EF6E4279AB92E00FF3EDE /* LittleGameInfoModel.m in Sources */,
9BA3B40B293DCDFD0071DF1C /* XPVersionUpdateModel.m in Sources */,
@@ -9856,6 +9872,7 @@
E80A086527F318620027B30C /* XPRoomPKPlayingView.m in Sources */,
E8E70D9226F2F60C00F03460 /* XPMineItemModel.m in Sources */,
189DD74A26E21D8400AB55B1 /* SSKeychain.m in Sources */,
E854DFDD2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m in Sources */,
E8DACCFE27673F870052092C /* GiftValueInfoModel.m in Sources */,
E8412F9927799249006E1101 /* InviteFansModel.m in Sources */,
E88C72912828EA4E0047FB2B /* Music+CoreDataProperties.m in Sources */,
@@ -9938,6 +9955,7 @@
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */,
E8F6135C291E26BD00E12650 /* NSMutableDictionary+Saft.m in Sources */,
E8E859C428264C2300EE4857 /* HTTPDynamicFileResponse.m in Sources */,
E854DFDA2850AC8D0033120D /* XPEnterprisePayTypeView.m in Sources */,
E8E859D028264C2300EE4857 /* DDData.m in Sources */,
E800162F2803FF6200D6D17A /* GuildPersonIncomeRecordModel.m in Sources */,
9BAC92EE28E6989400147DD8 /* XPRoomActivityPlayView.m in Sources */,

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_recharge_halt_pay_choose@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_recharge_halt_pay_choose@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,16 @@
//
// XPEnterpriseHalfCollectionViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class EnterpriseRechargeInfoModel;
@interface XPEnterpriseHalfCollectionViewCell : UICollectionViewCell
@property (nonatomic,strong) EnterpriseRechargeInfoModel *infoModel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,123 @@
//
// XPEnterpriseHalfCollectionViewCell.m
// xplan-ios
//
// Created by on 2022/6/8.
//
#import "XPEnterpriseHalfCollectionViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
///Model
#import "EnterpriseRechargeListInfoModel.h"
@interface XPEnterpriseHalfCollectionViewCell ()
///
@property (nonatomic,strong) UIView * backView;
///
@property (nonatomic,strong) UIImageView *diamondImageView;
///
@property (nonatomic,strong) UILabel *coinLabel;
///💰
@property (nonatomic,strong) UILabel *moneyLabel;
@end
@implementation XPEnterpriseHalfCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:self.backView];
[self.backView addSubview:self.diamondImageView];
[self.backView addSubview:self.coinLabel];
[self.backView addSubview:self.moneyLabel];
}
- (void)initSubViewConstraints {
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.contentView);
}];
[self.diamondImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20, 20));
make.right.mas_equalTo(self.coinLabel.mas_left).offset(-2);
make.centerY.mas_equalTo(self.coinLabel);
}];
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.backView.mas_centerX).offset(11);
make.bottom.mas_equalTo(self.backView.mas_centerY).offset(-1.5);
}];
[self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backView);
make.top.mas_equalTo(self.backView.mas_centerY).offset(1.5);
}];
}
#pragma mark - Getters And Setters
- (void)setInfoModel:(EnterpriseRechargeInfoModel *)infoModel {
_infoModel = infoModel;
if (_infoModel) {
self.coinLabel.text = [_infoModel.prodName stringByReplacingOccurrencesOfString:@"钻石" withString:@""];
self.moneyLabel.text = [NSString stringWithFormat:@"%.2f元",_infoModel.money.floatValue];
//
if (_infoModel.isSelect) {
self.backView.layer.borderColor = [ThemeColor appMainColor].CGColor;
}else {
self.backView.layer.borderColor = [ThemeColor appCellBackgroundColor].CGColor;
}
}
}
- (UIImageView *)diamondImageView {
if (!_diamondImageView) {
_diamondImageView = [[UIImageView alloc] init];
_diamondImageView.userInteractionEnabled = YES;
_diamondImageView.image = [UIImage imageNamed:@"common_diamond"];
}
return _diamondImageView;
}
- (UILabel *)coinLabel {
if (!_coinLabel) {
_coinLabel = [[UILabel alloc] init];
_coinLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_coinLabel.textColor = [ThemeColor mainTextColor];
}
return _coinLabel;
}
- (UILabel *)moneyLabel {
if (!_moneyLabel) {
_moneyLabel = [[UILabel alloc] init];
_moneyLabel.font = [UIFont systemFontOfSize:12];
_moneyLabel.textColor = [ThemeColor textThirdColor];
_moneyLabel.textAlignment = NSTextAlignmentCenter;
}
return _moneyLabel;
}
- (UIView *)backView {
if (!_backView) {
_backView = [[UIView alloc] init];
_backView.backgroundColor = [ThemeColor appCellBackgroundColor];
_backView.layer.cornerRadius = 10;
_backView.layer.borderWidth = 1.5;
}
return _backView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPEnterprisePayTypeView.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/8.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class EnterPrieseRechargeTypeItemModel;
@interface XPEnterprisePayTypeView : UIView
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *rechargeTypeModel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,102 @@
//
// XPEnterprisePayTypeView.m
// xplan-ios
//
// Created by on 2022/6/8.
//
#import "XPEnterprisePayTypeView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
///Model
#import "EnterPrieseRechargeTypeItemModel.h"
@interface XPEnterprisePayTypeView ()
///logo
@property (nonatomic,strong) UIImageView *logoImageView;
///
@property (nonatomic,strong) UILabel *titleLabel;
///
@property (nonatomic,strong) UIImageView *chooseImageView;
@end
@implementation XPEnterprisePayTypeView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [ThemeColor appCellBackgroundColor];
self.layer.masksToBounds = YES;
self.layer.cornerRadius = 8;
[self addSubview:self.logoImageView];
[self addSubview:self.titleLabel];
[self addSubview:self.chooseImageView];
}
- (void)initSubViewConstraints {
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(28, 28));
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(self).offset(16);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(self.logoImageView.mas_right).offset(16);
}];
[self.chooseImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(24, 24));
make.right.bottom.mas_equalTo(self);
}];
}
#pragma mark - Getters And Setters
- (void)setRechargeTypeModel:(EnterPrieseRechargeTypeItemModel *)rechargeTypeModel {
_rechargeTypeModel = rechargeTypeModel;
if (_rechargeTypeModel) {
_logoImageView.image = [UIImage imageNamed:_rechargeTypeModel.imageName];
_titleLabel.text = _rechargeTypeModel.title;
_chooseImageView.hidden = !_rechargeTypeModel.isSelect;
}
}
- (UIImageView *)logoImageView {
if (!_logoImageView) {
_logoImageView = [[UIImageView alloc] init];
_logoImageView.userInteractionEnabled = YES;
}
return _logoImageView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_titleLabel.textColor = [ThemeColor mainTextColor];
}
return _titleLabel;
}
- (UIImageView *)chooseImageView {
if (!_chooseImageView) {
_chooseImageView = [[UIImageView alloc] init];
_chooseImageView.userInteractionEnabled = YES;
_chooseImageView.image = [UIImage imageNamed:@"mine_recharge_halt_pay_choose"];
_chooseImageView.hidden = YES;
}
return _chooseImageView;
}
@end

View File

@@ -0,0 +1,17 @@
//
// XPMineHalfRechargeViewController.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/8.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMineHalfRechargeViewController : MvpViewController
@property (nonatomic,copy) NSString *roomUid;
@property (nonatomic,weak) UINavigationController *currentNav;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,612 @@
//
// XPMineHalfRechargeViewController.m
// xplan-ios
//
// Created by on 2022/6/8.
//
#import "XPMineHalfRechargeViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <AlipaySDK/AlipaySDK.h>
#import <WXApi.h>
#import <WXApiObject.h>
#import <NIMSDK/NIMSDK.h>
#import <YYText/YYText.h>
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "XPConstant.h"
#import "UIImage+Utils.h"
///Model
#import "EnterpriseRechargeListInfoModel.h"
#import "EnterPrieseRechargeTypeItemModel.h"
#import "AttachmentModel.h"
#import "WalletInfoModel.h"
///P
#import "XPEnterpriseRechargePresenter.h"
#import "XPEnterpriseRechargeProtocol.h"
///View
#import "XPEnterpriseHalfCollectionViewCell.h"
#import "XPEnterprisePayTypeView.h"
#import "XPWebViewController.h"
@interface XPMineHalfRechargeViewController ()<XPEnterpriseRechargeProtocol,UICollectionViewDelegate, UICollectionViewDataSource, NIMSystemNotificationManagerDelegate>
///
@property (nonatomic,strong) NSMutableArray<EnterpriseRechargeInfoModel *> *datasource;
///View
@property (nonatomic,strong) UIView * topView;
///
@property (nonatomic,strong) UIView * contentView;
///
@property (nonatomic,strong) UILabel *titleLabel;
///
@property (nonatomic,strong) UILabel *diamondLabel;
///
@property (nonatomic,strong) UILabel *limitLabel;
///
@property (nonatomic,strong) UICollectionView *collectionView;
///
@property (nonatomic,strong) UILabel *payTypeLabel;
///
@property (nonatomic,strong) UIStackView *payStackView;
///
@property (nonatomic,strong) XPEnterprisePayTypeView *wxPayView;
///
@property (nonatomic,strong) XPEnterprisePayTypeView *aliPayView;
///
@property (nonatomic,strong) UIView *morePayView;
///
@property (nonatomic,strong) UIButton *arrowButton;
///
@property (nonatomic,strong) UILabel *moreLabel;
///
@property (nonatomic,strong) UIButton *rechargeButton;
///
@property (nonatomic,strong) YYLabel *privacyLable;
///
@property (nonatomic,strong) EnterpriseRechargeInfoModel *rechargeInfo;
///
@property (nonatomic,strong) EnterpriseRechargeListInfoModel *listInfo;
///
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
///
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *aliPayItem;
///
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *wxPayItem;
@end
@implementation XPMineHalfRechargeViewController
- (void)dealloc {
[[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self];
}
- (BOOL)isHiddenNavBar {
return YES;
}
- (__kindof id)createPresenter {
return [[XPEnterpriseRechargePresenter alloc] init];
}
- (void)viewDidLayoutSubviews {
self.topView.hidden = NO;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor clearColor];
[[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
[self initData];
[self initSubViews];
[self initSubViewConstraints];
}
#pragma mark - Private Method
- (void)initData {
[self.presenter getUserWalletInfo];
[self.presenter getRechargeList:@"1"];
}
- (void)initSubViews {
[self.view addSubview:self.topView];
[self.view addSubview:self.contentView];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.diamondLabel];
[self.contentView addSubview:self.limitLabel];
[self.contentView addSubview:self.collectionView];
[self.contentView addSubview:self.payTypeLabel];
[self.contentView addSubview:self.payStackView];
[self.contentView addSubview:self.rechargeButton];
[self.contentView addSubview:self.privacyLable];
[self.payStackView addArrangedSubview:self.wxPayView];
[self.payStackView addArrangedSubview:self.aliPayView];
[self.payStackView addArrangedSubview:self.morePayView];
[self.morePayView addSubview:self.moreLabel];
[self.morePayView addSubview:self.arrowButton];
}
- (void)initSubViewConstraints {
[self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self.view);
make.bottom.mas_equalTo(self.contentView.mas_top);
}];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.view);
make.height.mas_equalTo(492 + kSafeAreaBottomHeight);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.contentView).offset(16);
make.centerX.mas_equalTo(self.contentView);
}];
[self.diamondLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).offset(15);
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(20);
make.right.mas_lessThanOrEqualTo(self.limitLabel.mas_left).offset(-5);
}];
[self.limitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.contentView).offset(-15);
make.centerY.mas_equalTo(self.diamondLabel);
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.diamondLabel.mas_bottom).offset(0);
make.left.right.mas_equalTo(self.contentView);
make.height.mas_equalTo(54 * 3 + 8 * 2 + 16 * 2);
}];
[self.payTypeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.diamondLabel);
make.top.mas_equalTo(self.collectionView.mas_bottom).offset(0);
}];
[self.payStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.contentView).inset(15);
make.height.mas_equalTo(48);
make.top.mas_equalTo(self.payTypeLabel.mas_bottom).offset(12);
}];
[self.moreLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.morePayView).offset(-7);
make.centerY.mas_equalTo(self.morePayView);
}];
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(11, 20));
make.centerY.mas_equalTo(self.morePayView);
make.left.mas_equalTo(self.moreLabel.mas_right).offset(3);
}];
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.privacyLable.mas_top).offset(-12);
make.left.right.mas_equalTo(self.view).inset(47);
make.height.mas_equalTo(44);
}];
[self.privacyLable mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.view).offset(-31 - kSafeAreaBottomHeight);
make.centerX.mas_equalTo(self.view);
}];
}
#pragma mark - UICollectionViewDatasource And UICollectionViewDelegate
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.datasource.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPEnterpriseHalfCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class]) forIndexPath:indexPath];
EnterpriseRechargeInfoModel * info = [self.datasource objectAtIndex:indexPath.row];
if ([info.chargeProdId isEqualToString:self.rechargeInfo.chargeProdId]) {
info.isSelect = YES;
} else {
info.isSelect = NO;
}
cell.infoModel = info;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
EnterpriseRechargeInfoModel * infor = [self.datasource objectAtIndex:indexPath.row];
self.rechargeInfo = infor;
[self.collectionView reloadData];
}
}
#pragma mark - XPEnterpriseRechargeProtocol
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
self.diamondLabel.text = [NSString stringWithFormat:@"我的钻石:%@", balanceInfo.diamonds];
}
- (void)getRechargeListSuccess:(EnterpriseRechargeListInfoModel *)info {
self.listInfo = info;
if (info.list.count > 0) {
[self.datasource addObjectsFromArray:info.list];
}
if ((info.defaultPay == RechargeDefaultPayType_ZFB || info.defaultPay == RechargeDefaultPayType_ZFB_WX) && info.bigList.count > 0) {
[self.datasource addObjectsFromArray: info.bigList];
}
if (self.datasource.count > 0) {
self.rechargeInfo = self.datasource.firstObject;
}
switch (info.defaultPay) {
case RechargeDefaultPayType_WX:
{
self.wxPayItem.isSelect = YES;
self.aliPayItem.isSelect = NO;
self.currentItem = self.wxPayItem;
self.morePayView.hidden = NO;
self.aliPayView.hidden = YES;
[self.payStackView insertArrangedSubview:self.wxPayView atIndex:0];
}
break;
case RechargeDefaultPayType_ZFB:
{
self.wxPayItem.isSelect = NO;
self.aliPayItem.isSelect = YES;
self.currentItem = self.aliPayItem;
self.morePayView.hidden = NO;
self.wxPayView.hidden = YES;
[self.payStackView insertArrangedSubview:self.aliPayView atIndex:0];
}
break;
case RechargeDefaultPayType_WX_ZFB:
{
self.wxPayItem.isSelect = YES;
self.aliPayItem.isSelect = NO;
self.currentItem = self.wxPayItem;
self.morePayView.hidden = YES;
self.wxPayView.hidden = NO;
self.aliPayView.hidden = NO;
[self.payStackView insertArrangedSubview:self.wxPayView atIndex:0];
}
break;
case RechargeDefaultPayType_ZFB_WX:
{
self.wxPayItem.isSelect = NO;
self.aliPayItem.isSelect = YES;
self.currentItem = self.aliPayItem;
self.morePayView.hidden = YES;
self.aliPayView.hidden = NO;
self.wxPayView.hidden = NO;
[self.payStackView insertArrangedSubview:self.aliPayView atIndex:0];
}
break;
default:
{
self.wxPayItem.isSelect = NO;
self.aliPayItem.isSelect = YES;
self.currentItem = self.aliPayItem;
self.morePayView.hidden = YES;
self.wxPayView.hidden = YES;
}
break;
}
self.wxPayView.rechargeTypeModel = self.wxPayItem;
self.aliPayView.rechargeTypeModel = self.aliPayItem;
[self.collectionView reloadData];
}
- (void)requestPaySuccess:(id)data payChannel:(NSString *)payChannel {
if ([payChannel isEqualToString:@"alipay_v2"]) {
if ([data isKindOfClass:[NSDictionary class]]) {
if ([[data objectForKey:@"payType"] isEqualToString:@"h5"]) {
[self dismissViewControllerAnimated:NO completion:nil];
XPWebViewController *webView = [[XPWebViewController alloc] init];
webView.url = [data objectForKey:@"orderData"];
[self.currentNav pushViewController:webView animated:YES];
}else if ([[data objectForKey:@"payType"] isEqualToString:@"native"]) {
NSString * signedStr = [data objectForKey:@"orderData"];
NSString * scheme = @"daeplayapp";
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
}];
}
}
} else if ([payChannel isEqualToString:@"alipay"]) {
if ([data isKindOfClass:[NSString class]]) {
NSString * scheme = @"daeplayapp";
NSString * signedStr = [data objectForKey:@"orderData"];
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
}];
}
}else if ([payChannel isEqualToString:@"wx"]){
if ([data isKindOfClass:[NSDictionary class]]) {
PayReq *req = [[PayReq alloc] init];
NSDictionary * dict = data;
NSMutableString *stamp = [dict objectForKey:@"timestamp"];
req.partnerId = [dict objectForKey:@"partnerid"];
req.prepayId = [dict objectForKey:@"prepayid"];
req.nonceStr = [dict objectForKey:@"noncestr"];
req.timeStamp = stamp.intValue;
req.package = @"Sign=WXPay";
req.sign = [dict objectForKey:@"sign"];
[WXApi sendReq:req completion:^(BOOL success) {
if (success) {
NSLog(@"********调起微信支付成功");
}
}];
}
}
}
#pragma mark - NIMSystemNotificationManagerDelegate
- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification {
if (notification.receiverType == NIMSessionTypeP2P) {
AttachmentModel *attachment = [AttachmentModel modelWithJSON:notification.content];
if (attachment.first == CustomMessageType_Account && attachment.second == Custom_Message_Sub_Account_Changed) {
WalletInfoModel * balanceInfo = [WalletInfoModel modelWithDictionary:attachment.data];
self.diamondLabel.text = [NSString stringWithFormat:@"我的钻石:%@", balanceInfo.diamonds];
}
}
}
#pragma mark - Event Response
- (void)tapMoreTypeRecognizer {
switch (self.listInfo.defaultPay) {
case RechargeDefaultPayType_WX:
{
self.aliPayView.hidden = NO;
self.morePayView.hidden = YES;
}
break;
case RechargeDefaultPayType_ZFB:
{
self.wxPayView.hidden = NO;
self.morePayView.hidden = YES;
}
break;
default:
break;
}
}
- (void)dismissHalfRecharge {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)rechargeButtonAction:(UIButton *)sender {
NSString * payType= self.currentItem.type == RechargeType_WX ? @"wx" : @"alipay_v2";
[self.presenter requestPay:self.rechargeInfo.chargeProdId payChannel:payType roomUid:self.roomUid];
}
- (void)tapPayViewRecognizer:(UITapGestureRecognizer *)tap {
XPEnterprisePayTypeView * view = (XPEnterprisePayTypeView *)tap.view;
if (view == self.wxPayView) {
self.wxPayItem.isSelect = YES;
self.aliPayItem.isSelect = NO;
self.currentItem = self.wxPayItem;
} else {
self.wxPayItem.isSelect = NO;
self.aliPayItem.isSelect = YES;
self.currentItem = self.aliPayItem;
}
self.wxPayView.rechargeTypeModel = self.wxPayItem;
self.aliPayView.rechargeTypeModel = self.aliPayItem;
}
#pragma mark - Getters And Setters
- (UICollectionView *)collectionView{
if (!_collectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake((CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 2) / 3.0, 54);
layout.sectionInset = UIEdgeInsetsMake(16, 15, 16, 15);
layout.minimumLineSpacing = 8;
layout.minimumInteritemSpacing = 8;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.dataSource = self;
_collectionView.delegate = self;
_collectionView.backgroundColor = [UIColor clearColor];
_collectionView.scrollEnabled = NO;
[_collectionView registerClass:[XPEnterpriseHalfCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class])];
}
return _collectionView;
}
- (UIView *)topView {
if (!_topView) {
_topView = [[UIView alloc] init];
_topView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
_topView.hidden = YES;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissHalfRecharge)];
[_topView addGestureRecognizer:tap];
}
return _topView;
}
- (UIView *)contentView {
if (!_contentView) {
_contentView = [[UIView alloc] init];
_contentView.backgroundColor = [ThemeColor appBackgroundColor];
CAShapeLayer * layer = [CAShapeLayer layer];
layer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 492) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)].CGPath;
_contentView.layer.mask = layer;
}
return _contentView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
_titleLabel.textColor = [ThemeColor mainTextColor];
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.text = @"充值";
}
return _titleLabel;
}
- (UILabel *)diamondLabel {
if (!_diamondLabel) {
_diamondLabel = [[UILabel alloc] init];
_diamondLabel.font = [UIFont systemFontOfSize:14];
_diamondLabel.textColor = [ThemeColor mainTextColor];
}
return _diamondLabel;
}
- (UILabel *)limitLabel {
if (!_limitLabel) {
_limitLabel = [[UILabel alloc] init];
_limitLabel.font = [UIFont systemFontOfSize:12];
_limitLabel.textColor = [ThemeColor secondTextColor];
_limitLabel.text = @"未成年人禁止充值";
_limitLabel.textAlignment = NSTextAlignmentRight;
}
return _limitLabel;
}
- (UILabel *)payTypeLabel {
if (!_payTypeLabel) {
_payTypeLabel = [[UILabel alloc] init];
_payTypeLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
_payTypeLabel.textColor = [ThemeColor mainTextColor];
_payTypeLabel.text = @"支付方式";
}
return _payTypeLabel;
}
- (UIStackView *)payStackView {
if (!_payStackView) {
_payStackView = [[UIStackView alloc] init];
_payStackView.axis = UILayoutConstraintAxisHorizontal;
_payStackView.distribution = UIStackViewDistributionFillEqually;
_payStackView.alignment = UIStackViewAlignmentFill;
_payStackView.spacing = 13;
}
return _payStackView;
}
- (XPEnterprisePayTypeView *)aliPayView {
if (!_aliPayView) {
_aliPayView = [[XPEnterprisePayTypeView alloc] init];
_aliPayView.rechargeTypeModel = self.aliPayItem;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPayViewRecognizer:)];
[_aliPayView addGestureRecognizer:tap];
}
return _aliPayView;
}
- (XPEnterprisePayTypeView *)wxPayView {
if (!_wxPayView) {
_wxPayView = [[XPEnterprisePayTypeView alloc] init];
_wxPayView.rechargeTypeModel = self.wxPayItem;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPayViewRecognizer:)];
[_wxPayView addGestureRecognizer:tap];
}
return _wxPayView;
}
- (UIView *)morePayView {
if (!_morePayView) {
_morePayView = [[UIView alloc] init];
_morePayView.backgroundColor = [UIColor clearColor];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapMoreTypeRecognizer)];
[_morePayView addGestureRecognizer:tap];
}
return _morePayView;
}
- (UILabel *)moreLabel {
if (!_moreLabel) {
_moreLabel = [[UILabel alloc] init];
_moreLabel.font = [UIFont systemFontOfSize:13];
_moreLabel.textColor = [ThemeColor mainTextColor];
_moreLabel.text = @"展开更多支付方式";
}
return _moreLabel;
}
- (UIButton *)arrowButton {
if (!_arrowButton) {
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
_arrowButton.transform = CGAffineTransformMakeRotation(M_PI / 2);
}
return _arrowButton;
}
- (UIButton *)rechargeButton {
if (!_rechargeButton) {
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_rechargeButton setTitle:@"确认充值" forState:UIControlStateNormal];
_rechargeButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_rechargeButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
[_rechargeButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
_rechargeButton.layer.masksToBounds = YES;
_rechargeButton.layer.cornerRadius = 22;
[_rechargeButton addTarget:self action:@selector(rechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _rechargeButton;
}
- (YYLabel *)privacyLable {
if (!_privacyLable) {
_privacyLable = [[YYLabel alloc] init];
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"已阅读并同意"];
attString.yy_color = [ThemeColor secondTextColor];
attString.yy_font = [UIFont systemFontOfSize:14];
NSMutableAttributedString *rechargeAttString = [[NSMutableAttributedString alloc] initWithString:@"《用户充值协议》" attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
@kWeakify(self);
[rechargeAttString yy_setTextHighlightRange:NSMakeRange(0, rechargeAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@kStrongify(self);
[self dismissViewControllerAnimated:NO completion:nil];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = @"yinyou/modules/rule/rechargeAgreement.html";
[self.currentNav pushViewController:webVC animated:YES];
} longPressAction:nil];
[attString appendAttributedString:rechargeAttString];
_privacyLable.textAlignment = NSTextAlignmentCenter;
_privacyLable.attributedText = attString;
}
return _privacyLable;
}
- (NSMutableArray<EnterpriseRechargeInfoModel *> *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
- (EnterPrieseRechargeTypeItemModel *)aliPayItem {
if (!_aliPayItem) {
EnterPrieseRechargeTypeItemModel * zfbItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
zfbItem.imageName = @"mine_recharge_alipay";
zfbItem.title = @"支付宝";
zfbItem.isSelect = YES;
zfbItem.type = RechargeType_ZFB;
_aliPayItem = zfbItem;
}
return _aliPayItem;
}
- (EnterPrieseRechargeTypeItemModel *)wxPayItem {
if (!_wxPayItem) {
EnterPrieseRechargeTypeItemModel * wxItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
wxItem.imageName = @"mine_recharge_wechat";
wxItem.title = @"微信";
wxItem.type = RechargeType_WX;
_wxPayItem = wxItem;
}
return _wxPayItem;
}
@end

View File

@@ -41,7 +41,7 @@
///P
#import "XPGiftProtocol.h"
///VC
#import "XPMineRechargeViewController.h"
#import "XPMineHalfRechargeViewController.h"
#import "XPWebViewController.h"
#import "XPFirstRechargeViewController.h"
#import "XPNobleCenterViewController.h"
@@ -408,17 +408,19 @@
///
- (void)xPGiftBarViewDidClickRecharge:(XPGiftBarView *)view {
[self dismissViewControllerAnimated:NO completion:^{
XPMineRechargeViewController * rechargeVC = [[XPMineRechargeViewController alloc] init];
XPMineHalfRechargeViewController * rechargeVC = [[XPMineHalfRechargeViewController alloc] init];
rechargeVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
if (self.delegate.getRoomInfo) {
rechargeVC.roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];
}
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:rechargeVC animated:YES];
rechargeVC.currentNav = self.delegate.getCurrentNav ? self.delegate.getCurrentNav : [XCCurrentVCStackManager shareManager].getCurrentVC.navigationController;
[[XCCurrentVCStackManager shareManager].getCurrentVC presentViewController:rechargeVC animated:YES completion:nil];
}];
}
- (void)xPGiftBarViewDidClickFirstRecharge:(XPGiftBarView *)view {
[self dismissViewControllerAnimated:NO completion:^{
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController];
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil];
}];
}