diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index ffe13d55..d9a39d1c 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -1075,7 +1075,6 @@ E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846C126FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m */; }; E8B846C526FDB41A00A777FE /* XPMineUserInfolbumPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846C426FDB41A00A777FE /* XPMineUserInfolbumPresenter.m */; }; E8B846C726FDB45000A777FE /* XPMineUserInfoAlbumProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8B846C626FDB44100A777FE /* XPMineUserInfoAlbumProtocol.h */; }; - E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846CE26FDD96100A777FE /* XPMineRechageHeadView.m */; }; E8B846D326FDDBE600A777FE /* XPMineRechargeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D226FDDBE600A777FE /* XPMineRechargeTableViewCell.m */; }; E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D526FDE01B00A777FE /* XPMineRechargePresenter.m */; }; E8B846D826FDE17300A777FE /* XPMineRechargeProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */; }; @@ -3253,8 +3252,6 @@ E8B846C326FDB41A00A777FE /* XPMineUserInfolbumPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineUserInfolbumPresenter.h; sourceTree = ""; }; E8B846C426FDB41A00A777FE /* XPMineUserInfolbumPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineUserInfolbumPresenter.m; sourceTree = ""; }; E8B846C626FDB44100A777FE /* XPMineUserInfoAlbumProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineUserInfoAlbumProtocol.h; sourceTree = ""; }; - E8B846CD26FDD96100A777FE /* XPMineRechageHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechageHeadView.h; sourceTree = ""; }; - E8B846CE26FDD96100A777FE /* XPMineRechageHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechageHeadView.m; sourceTree = ""; }; E8B846D126FDDBE600A777FE /* XPMineRechargeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeTableViewCell.h; sourceTree = ""; }; E8B846D226FDDBE600A777FE /* XPMineRechargeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeTableViewCell.m; sourceTree = ""; }; E8B846D426FDE01B00A777FE /* XPMineRechargePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargePresenter.h; sourceTree = ""; }; @@ -8066,17 +8063,6 @@ path = UploadImage; sourceTree = ""; }; - E8B846CC26FDD93D00A777FE /* Recharge */ = { - isa = PBXGroup; - children = ( - E8B846CD26FDD96100A777FE /* XPMineRechageHeadView.h */, - E8B846CE26FDD96100A777FE /* XPMineRechageHeadView.m */, - E89DA67327009ACD008483C1 /* XPMineRechargeNavView.h */, - E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */, - ); - path = Recharge; - sourceTree = ""; - }; E8B846D026FDDBCD00A777FE /* Recharge */ = { isa = PBXGroup; children = ( @@ -8930,7 +8916,6 @@ children = ( E8C219F62948525500344FC5 /* AnchorLevel */, 9BBC02882786E0060007C24B /* NobleCenter */, - E8B846CC26FDD93D00A777FE /* Recharge */, E88B5CC226FB429C00DA9178 /* MineInfo */, E88B5CAA26FB168200DA9178 /* Teenager */, E8E70D8126F2F51A00F03460 /* XPMineHeadView.h */, diff --git a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@2x.png b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@2x.png index 3b58de91..7848ec88 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@2x.png and b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@3x.png b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@3x.png index ad33ad21..562571d8 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@3x.png and b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/mine_recharge_choose_normal@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@2x.png b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@2x.png index 468ad026..ce44e118 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@2x.png and b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@3x.png b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@3x.png index a666e99d..9e9dbd62 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@3x.png and b/xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/mine_recharge_choose_select@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@2x.png b/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@2x.png index abc3787a..7145e7e4 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@2x.png and b/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@3x.png b/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@3x.png index 7cb6c5a7..1c333eda 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@3x.png and b/xplan-ios/Assets.xcassets/Mine/mine_recharge_coin_bg.imageset/mine_recharge_coin_bg@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@2x.png b/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@2x.png index c850278e..911511d5 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@2x.png and b/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@3x.png b/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@3x.png index a5c60616..52b72ecf 100644 Binary files a/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@3x.png and b/xplan-ios/Assets.xcassets/Mine/mine_recharge_header_bg.imageset/mine_recharge_header_bg@3x.png differ diff --git a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseChargeListTableViewCell.m b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseChargeListTableViewCell.m index a664528f..2a39eac1 100644 --- a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseChargeListTableViewCell.m +++ b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseChargeListTableViewCell.m @@ -14,7 +14,7 @@ ///Model #import "EnterpriseRechargeListInfoModel.h" ///View -#import "XPEnterpriseChargeListCollectionViewCell.h" +#import "XPEnterpriseHalfCollectionViewCell.h" #import "XPEnterpriseRechargeHeaderView.h" @interface XPEnterpriseChargeListTableViewCell () @@ -24,6 +24,8 @@ @property (nonatomic,strong) XPEnterpriseRechargeHeaderView *infoView; ///列表 @property (nonatomic,strong) UICollectionView *collectionView; +///显示充值限制 +@property (nonatomic,strong) UILabel *titleLabel; ///当前选中的 @property (nonatomic,strong) EnterpriseRechargeInfoModel *selectInfo; @end @@ -44,22 +46,31 @@ [self.contentView addSubview:self.backImageView]; [self.contentView addSubview:self.infoView]; [self.contentView addSubview:self.collectionView]; + [self.contentView addSubview:self.titleLabel]; } - (void)initSubViewConstraints { + CGFloat kscale = 260.0/ 375.0; [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.top.left.mas_equalTo(self); - make.height.mas_equalTo(250); + make.left.right.top.mas_equalTo(self); + make.height.mas_equalTo(KScreenWidth * kscale); }]; [self.infoView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.top.mas_equalTo(self.contentView); - make.height.mas_equalTo(190 + kSafeAreaTopHeight); + make.centerX.mas_equalTo(self); + make.width.mas_equalTo(375); + make.top.mas_equalTo(self).offset(92); + make.height.mas_equalTo(106); }]; [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.infoView.mas_bottom); + make.top.mas_equalTo(self.infoView.mas_bottom).offset(15); make.left.right.mas_equalTo(self.contentView); + make.bottom.mas_equalTo(self.titleLabel.mas_top).offset(-12); + }]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.contentView).inset(30); make.bottom.mas_equalTo(self.contentView).offset(-15); }]; } @@ -69,7 +80,7 @@ } - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - XPEnterpriseChargeListCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseChargeListCollectionViewCell class]) forIndexPath:indexPath]; + XPEnterpriseHalfCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class]) forIndexPath:indexPath]; EnterpriseRechargeInfoModel * info = [self.rechargeList objectAtIndex:indexPath.row]; if ([info.chargeProdId isEqualToString:self.selectInfo.chargeProdId]) { info.isSelect = YES; @@ -112,16 +123,16 @@ - (UICollectionView *)collectionView{ if (!_collectionView) { UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - layout.itemSize = CGSizeMake((CGFloat)(KScreenWidth - 15 * 2 - 10 * 2) / 3.0, 80); + layout.itemSize = CGSizeMake((CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 3) / 3.0, 64); layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15); - layout.minimumLineSpacing = 10; - layout.minimumInteritemSpacing = 10; + 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:[XPEnterpriseChargeListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseChargeListCollectionViewCell class])]; + [_collectionView registerClass:[XPEnterpriseHalfCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class])]; } return _collectionView; } @@ -144,4 +155,16 @@ return _backImageView; } +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.font = [UIFont systemFontOfSize:14]; + _titleLabel.textColor = [ThemeColor secondTextColor]; + _titleLabel.text = @"未成年禁止充值消费!请勿轻易相信各类刷单、退款等信息,以免上当受骗!"; + _titleLabel.numberOfLines = 2; + _titleLabel.textAlignment = NSTextAlignmentCenter; + } + return _titleLabel; +} + @end diff --git a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseHalfCollectionViewCell.m b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseHalfCollectionViewCell.m index 14dc42a7..96294ea5 100644 --- a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseHalfCollectionViewCell.m +++ b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/Cell/XPEnterpriseHalfCollectionViewCell.m @@ -57,7 +57,7 @@ }]; [self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.backView.mas_centerX).offset(11); + make.centerX.mas_equalTo(self.backView.mas_centerX).offset(11); make.bottom.mas_equalTo(self.backView.mas_centerY).offset(-1.5); }]; diff --git a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeFootView.m b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeFootView.m index c44a7047..9427952c 100644 --- a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeFootView.m +++ b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeFootView.m @@ -87,7 +87,7 @@ _privacyLable = [[YYLabel alloc] init]; NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"已阅读并同意"]; attString.yy_color = [ThemeColor secondTextColor]; - attString.yy_font = [UIFont systemFontOfSize:14]; + attString.yy_font = [UIFont systemFontOfSize:12]; 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) { @@ -107,7 +107,7 @@ - (UILabel *)descriptionLabel { if (!_descriptionLabel) { _descriptionLabel = [[UILabel alloc] init]; - _descriptionLabel.font = [UIFont systemFontOfSize:14]; + _descriptionLabel.font = [UIFont systemFontOfSize:12]; _descriptionLabel.textColor = [ThemeColor appMainColor]; _descriptionLabel.text = @"如有任何问题请咨询客服,魔力号:88001"; _descriptionLabel.textAlignment = NSTextAlignmentCenter; diff --git a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeHeaderView.m b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeHeaderView.m index 1a4de7f0..38db6f0e 100644 --- a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeHeaderView.m +++ b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/SubViews/XPEnterpriseRechargeHeaderView.m @@ -101,7 +101,7 @@ _coinLabel = [[UILabel alloc] init]; _coinLabel.text = @"我的钻石"; _coinLabel.font = [UIFont systemFontOfSize:13]; - _coinLabel.textColor = [UIColor whiteColor]; + _coinLabel.textColor = [ThemeColor mainTextColor]; } return _coinLabel; } @@ -109,8 +109,8 @@ - (UILabel *)amountLabel { if (!_amountLabel) { _amountLabel = [[UILabel alloc] init]; - _amountLabel.font = [UIFont boldSystemFontOfSize:36]; - _amountLabel.textColor = [ThemeColor appMainColor]; + _amountLabel.font = [UIFont systemFontOfSize:24 weight:UIFontWeightMedium]; + _amountLabel.textColor = [ThemeColor mainTextColor]; _amountLabel.textAlignment = NSTextAlignmentCenter; } return _amountLabel; diff --git a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/XPMineRechargeViewController.m b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/XPMineRechargeViewController.m index d8e5956b..f6c14284 100644 --- a/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/XPMineRechargeViewController.m +++ b/xplan-ios/Main/Mine/View/EnterpriseRecharge/View/XPMineRechargeViewController.m @@ -132,17 +132,17 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0) { - CGFloat wallInfoHeight = (kSafeAreaTopHeight + 190); + CGFloat wallInfoHeight = 211 + 72; if (self.datasource.count > 0) { CGFloat listHeight= 0; int page = self.datasource.count % 3; int line = (int)self.datasource.count / 3; if (page == 0) { - listHeight = 80 * line + (line - 1) * 10; + listHeight = 64 * line + (line - 1) * 8; } else { - listHeight = (line + 1) * 80 + line * 10; + listHeight = (line + 1) * 64 + line * 8; } - return (listHeight + wallInfoHeight + 15); + return (listHeight + wallInfoHeight); } else { return wallInfoHeight; } @@ -343,8 +343,8 @@ - (UIButton *)backButton { if (!_backButton) { _backButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateNormal]; - [_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateSelected]; + [_backButton setImage:[UIImage imageNamed:@"common_nav_back"] forState:UIControlStateNormal]; + [_backButton setImage:[UIImage imageNamed:@"common_nav_back"] forState:UIControlStateSelected]; [_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside]; } return _backButton; @@ -354,7 +354,7 @@ if (!_titleLabel) { _titleLabel = [[UILabel alloc] init]; _titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium]; - _titleLabel.textColor = [UIColor whiteColor]; + _titleLabel.textColor = [ThemeColor mainTextColor]; _titleLabel.textAlignment = NSTextAlignmentCenter; _titleLabel.text = @"我的账户"; } @@ -365,7 +365,7 @@ if (!_incomeButton) { _incomeButton = [UIButton buttonWithType:UIButtonTypeCustom]; [_incomeButton setTitle:@"我的收益" forState:UIControlStateNormal]; - [_incomeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [_incomeButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal]; _incomeButton.titleLabel.font = [UIFont systemFontOfSize:13]; [_incomeButton addTarget:self action:@selector(incomeButtonAction:) forControlEvents:UIControlEventTouchUpInside]; } diff --git a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechageHeadView.h b/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechageHeadView.h deleted file mode 100644 index bbfabd2b..00000000 --- a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechageHeadView.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// XPMineRechageHeadView.h -// xplan-ios -// -// Created by 冯硕 on 2021/9/24. -// - -#import - -NS_ASSUME_NONNULL_BEGIN -@class WalletInfoModel; -@interface XPMineRechageHeadView : UIView -///钱包信息 -@property (nonatomic,strong) WalletInfoModel *walletInfo; -@end - -NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechageHeadView.m b/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechageHeadView.m deleted file mode 100644 index 48347f2e..00000000 --- a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechageHeadView.m +++ /dev/null @@ -1,138 +0,0 @@ -// -// XPMineRechageHeadView.m -// xplan-ios -// -// Created by 冯硕 on 2021/9/24. -// - -#import "XPMineRechageHeadView.h" -///Third -#import -///Tool -#import "ThemeColor.h" -#import "XPMacro.h" -///Model -#import "WalletInfoModel.h" - -@interface XPMineRechageHeadView () -///大的背景 -@property (nonatomic,strong) UIImageView *backImageView; -///底部的背景 -@property (nonatomic,strong) UIImageView *bottomBackImg; -///显示钻石图标 -@property (nonatomic,strong) UIImageView *coinImageView; -///显示我的钻石 -@property (nonatomic,strong) UILabel *coinLabel; -///显示钻石数 -@property (nonatomic,strong) UILabel *amountLabel; - -@end - - -@implementation XPMineRechageHeadView - -- (instancetype)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - [self initView]; - [self initContrations]; - } - return self; -} - -#pragma mark - Private Method -- (void)initView { - [self addSubview:self.backImageView]; - [self.backImageView addSubview:self.bottomBackImg]; - [self.bottomBackImg addSubview:self.coinImageView]; - [self.bottomBackImg addSubview:self.coinLabel]; - [self.bottomBackImg addSubview:self.amountLabel]; -} - -- (void)initContrations { - self.frame = CGRectMake(0, 0, KScreenWidth, 190 + kSafeAreaTopHeight); - [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self); - }]; - - [self.bottomBackImg mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.bottom.mas_equalTo(self.backImageView); - make.height.mas_equalTo(110); - }]; - - [self.coinImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(21, 21)); - make.top.mas_equalTo(self.bottomBackImg).offset(23); - make.right.mas_equalTo(self.coinLabel.mas_left).offset(-4); - }]; - - [self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerY.mas_equalTo(self.coinImageView); - make.centerX.mas_equalTo(self.bottomBackImg.mas_centerX).offset(12); - }]; - - [self.amountLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.mas_equalTo(self.bottomBackImg); - make.top.mas_equalTo(self.coinImageView.mas_bottom).offset(1); - }]; -} - -#pragma mark - Getters And Setters -- (void)setWalletInfo:(WalletInfoModel *)walletInfo { - _walletInfo = walletInfo; - if (_walletInfo) { - self.amountLabel.text = walletInfo.diamonds; - } -} - -- (UIImageView *)backImageView { - if (!_backImageView) { - _backImageView = [[UIImageView alloc] init]; - _backImageView.userInteractionEnabled = YES; - _backImageView.image = [UIImage imageNamed:@"mine_recharge_header_bg"]; - _backImageView.layer.masksToBounds = YES; - _backImageView.contentMode = UIViewContentModeScaleAspectFill; - } - return _backImageView; -} - -- (UIImageView *)bottomBackImg { - if (!_bottomBackImg) { - _bottomBackImg = [[UIImageView alloc] init]; - _bottomBackImg.userInteractionEnabled = YES; - _bottomBackImg.image = [UIImage imageNamed:@"mine_recharge_coin_bg"]; - _bottomBackImg.layer.masksToBounds = YES; - _bottomBackImg.contentMode = UIViewContentModeScaleAspectFit; - } - return _bottomBackImg; -} - -- (UIImageView *)coinImageView { - if (!_coinImageView) { - _coinImageView = [[UIImageView alloc] init]; - _coinImageView.userInteractionEnabled = YES; - _coinImageView.image = [UIImage imageNamed:@"common_diamond"]; - } - return _coinImageView; -} - -- (UILabel *)coinLabel { - if (!_coinLabel) { - _coinLabel = [[UILabel alloc] init]; - _coinLabel.text = @"我的钻石"; - _coinLabel.font = [UIFont systemFontOfSize:13]; - _coinLabel.textColor = [UIColor whiteColor]; - } - return _coinLabel; -} - -- (UILabel *)amountLabel { - if (!_amountLabel) { - _amountLabel = [[UILabel alloc] init]; - _amountLabel.font = [UIFont boldSystemFontOfSize:36]; - _amountLabel.textColor = [ThemeColor appMainColor]; - _amountLabel.textAlignment = NSTextAlignmentCenter; - } - return _amountLabel; -} - -@end diff --git a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechargeNavView.h b/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechargeNavView.h deleted file mode 100644 index 88c744b6..00000000 --- a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechargeNavView.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// XPMineRechargeNavView.h -// xplan-ios -// -// Created by 冯硕 on 2021/9/26. -// - -#import - -NS_ASSUME_NONNULL_BEGIN -@class XPMineRechargeNavView; -@protocol XPMineRechargeNavViewDelegate -///点击了返回按钮 -- (void)xPMineRechargeNavView:(XPMineRechargeNavView *)view didClickBackButton:(UIButton *)sender; -@end -@interface XPMineRechargeNavView : UIView -///代理 -@property (nonatomic,weak) id delegate; -@end - -NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechargeNavView.m b/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechargeNavView.m deleted file mode 100644 index 4f656a31..00000000 --- a/xplan-ios/Main/Mine/View/SubViews/Recharge/XPMineRechargeNavView.m +++ /dev/null @@ -1,82 +0,0 @@ -// -// XPMineRechargeNavView.m -// xplan-ios -// -// Created by 冯硕 on 2021/9/26. -// - -#import "XPMineRechargeNavView.h" -///Third -#import -///Tool -#import "ThemeColor.h" -#import "UIButton+EnlargeTouchArea.h" - -@interface XPMineRechargeNavView () -///返回按钮 -@property (nonatomic,strong) UIButton *backButton; -///显示文本 -@property (nonatomic,strong) UILabel *titleLabel; -@end - -@implementation XPMineRechargeNavView - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self initSubViews]; - [self initSubViewConstraints]; - } - return self; -} -#pragma mark - Response -- (void)backButtonAction:(UIButton *)sender { - if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineRechargeNavView:didClickBackButton:)]) { - [self.delegate xPMineRechargeNavView:self didClickBackButton:sender]; - } -} - -#pragma mark - Private Method -- (void)initSubViews { - self.backgroundColor = [UIColor clearColor]; - [self addSubview:self.backButton]; - [self addSubview:self.titleLabel]; -} - -- (void)initSubViewConstraints { - [self.backButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(15); - make.centerY.equalTo(self.mas_bottom).mas_offset(-22); - }]; - - [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.mas_equalTo(self); - make.centerY.equalTo(self.mas_bottom).mas_offset(-22); - }]; -} - -#pragma mark - Getters And Setters -- (UIButton *)backButton { - if (!_backButton) { - _backButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateNormal]; - _backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; - [_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - [_backButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10]; - } - return _backButton; -} - - -- (UILabel *)titleLabel { - if (!_titleLabel) { - _titleLabel = [[UILabel alloc] init]; - _titleLabel.textAlignment = NSTextAlignmentCenter; - _titleLabel.font = [UIFont systemFontOfSize:15]; - _titleLabel.text = @"账户"; - _titleLabel.textColor = [UIColor whiteColor]; - } - return _titleLabel; -} - -@end