feat: 更新 UI
This commit is contained in:
@@ -165,8 +165,8 @@
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
self.badgeView.nim_right = isMSRTL() ? 15 + self.badgeView.mj_w : self.nim_width - 15;
|
||||
self.badgeView.nim_top = 20;
|
||||
self.badgeView.nim_right = isMSRTL() ? 35 + self.badgeView.mj_w : self.nim_width - 35;
|
||||
self.badgeView.nim_top = 4;
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#import "SessionListCell.h"
|
||||
#import "SessionDiscoverNewTableViewCell.h"
|
||||
#import "SessionViewController.h"
|
||||
#import "XPMineFriendEmptyTableViewCell.h"
|
||||
|
||||
#import "ClientConfig.h"
|
||||
#import "Api+Mine.h"
|
||||
@@ -151,11 +152,11 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 92.f;
|
||||
return self.recentSessions.count == 0 ? (KScreenHeight - 200 - kNavigationHeight) : 92.f;
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return YES;
|
||||
return self.recentSessions.count == 0 ? NO : YES;
|
||||
}
|
||||
|
||||
- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
@@ -174,18 +175,27 @@ NSString * const kMessageShowReadDotKey = @"kMessageShowReadDotKey";
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
return self.recentSessions.count;
|
||||
return self.recentSessions.count == 0 ? 1 : self.recentSessions.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
static NSString * cellId = @"cellId";
|
||||
SessionListCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[SessionListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
|
||||
if (self.recentSessions.count == 0) {
|
||||
XPMineFriendEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineFriendEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
|
||||
}
|
||||
cell.emptyTitle = YMLocalizedString(@"XPMineAttentionViewController0");
|
||||
return cell;
|
||||
} else {
|
||||
static NSString * cellId = @"cellId";
|
||||
SessionListCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[SessionListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
|
||||
}
|
||||
NIMRecentSession *recent = [self.recentSessions xpSafeObjectAtIndex:indexPath.row];
|
||||
[cell renderWithSession:recent];
|
||||
return cell;
|
||||
}
|
||||
NIMRecentSession *recent = [self.recentSessions xpSafeObjectAtIndex:indexPath.row];
|
||||
[cell renderWithSession:recent];
|
||||
return cell;
|
||||
}
|
||||
#pragma mark - NIMConversationManagerDelegate
|
||||
- (void)didLoadAllRecentSessionCompletion {
|
||||
|
@@ -7,10 +7,14 @@
|
||||
|
||||
#import "XPMineMedalsTableViewCell.h"
|
||||
#import "MedalModel.h"
|
||||
#import <QGVAPWrapView.h>
|
||||
#import "XPRoomGiftAnimationParser.h"
|
||||
|
||||
@interface XPMineMedalCell : UICollectionViewCell
|
||||
|
||||
@property (nonatomic, strong) NetImageView *imageView;
|
||||
@property (nonatomic, strong) VAPView *vapView;
|
||||
@property (nonatomic, strong) XPRoomGiftAnimationParser *vapParser;
|
||||
|
||||
@end
|
||||
|
||||
@@ -30,10 +34,30 @@
|
||||
[_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.contentView addSubview:self.vapView];
|
||||
[self.vapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (VAPView *)vapView {
|
||||
if (!_vapView) {
|
||||
_vapView = [[VAPView alloc] init];
|
||||
_vapView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _vapView;
|
||||
}
|
||||
|
||||
- (XPRoomGiftAnimationParser *)vapParser {
|
||||
if (!_vapParser) {
|
||||
_vapParser = [[XPRoomGiftAnimationParser alloc] init];
|
||||
}
|
||||
return _vapParser;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface XPMineMedalsTableViewCell() <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
@@ -84,6 +108,20 @@
|
||||
UserMedalModel *userMedal = [self.medalsDataSource xpSafeObjectAtIndex:indexPath.row];
|
||||
if (userMedal) {
|
||||
cell.imageView.imageUrl = userMedal.picUrl;
|
||||
|
||||
NSString *resourcePath = [userMedal.picUrl stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
if (resourcePath.length > 0) {
|
||||
NSString *encodingUrl = [resourcePath stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
@kWeakify(cell);
|
||||
[cell.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
@kStrongify(cell);
|
||||
if (videoUrl.length) {
|
||||
[cell.vapView setMute:YES];
|
||||
[cell.vapView playHWDMP4:videoUrl repeatCount:-1 delegate:nil];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
}
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
@@ -91,7 +129,7 @@
|
||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake(80, 80);
|
||||
return CGSizeMake(140, 140);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
@@ -102,7 +140,7 @@
|
||||
layout.minimumInteritemSpacing = 10;
|
||||
layout.minimumLineSpacing = 10;
|
||||
_medalsCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
||||
collectionViewLayout:layout];
|
||||
collectionViewLayout:layout];
|
||||
_medalsCollectionView.backgroundColor = [UIColor clearColor];
|
||||
_medalsCollectionView.delegate = self;
|
||||
_medalsCollectionView.dataSource = self;
|
||||
|
@@ -8,10 +8,12 @@
|
||||
#import "XPMineNobleCardTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <QGVAPWrapView.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "NetImageView.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XPRoomGiftAnimationParser.h"
|
||||
///Model
|
||||
#import "NobleCardModel.h"
|
||||
|
||||
@@ -25,6 +27,8 @@
|
||||
@property (nonatomic, strong) UIImageView *userCardBackImageView;
|
||||
///卡片外边框
|
||||
@property (nonatomic, strong) NetImageView *nobleImageView;
|
||||
@property (nonatomic, strong) VAPView *vapView;
|
||||
@property (nonatomic, strong) XPRoomGiftAnimationParser *vapParser;
|
||||
///名字
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
///剩余天数
|
||||
@@ -55,6 +59,8 @@
|
||||
[self.mainView addSubview:self.useButton];
|
||||
[self.mainView addSubview:self.userCardBackImageView];
|
||||
[self.mainView addSubview:self.nobleImageView];
|
||||
[self.contentView addSubview:self.vapView];
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -98,6 +104,10 @@
|
||||
make.bottom.mas_equalTo(self.userCardBackImageView);
|
||||
make.centerX.mas_equalTo(self.mainView);
|
||||
}];
|
||||
|
||||
[self.vapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.nobleImageView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - private
|
||||
@@ -122,6 +132,22 @@
|
||||
[_useButton setTitleColor:[DJDKMIMOMColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
[_useButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor], [DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
NSString *resourcePath = [nobleCardModel.pic stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
if (resourcePath.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *encodingUrl = [resourcePath stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
@kWeakify(self);
|
||||
[self.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
@kStrongify(self);
|
||||
if (videoUrl.length) {
|
||||
[self.vapView setMute:YES];
|
||||
[self.vapView playHWDMP4:videoUrl repeatCount:-1 delegate:nil];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,4 +228,20 @@
|
||||
}
|
||||
return _userCardBackImageView;;
|
||||
}
|
||||
|
||||
- (VAPView *)vapView {
|
||||
if (!_vapView) {
|
||||
_vapView = [[VAPView alloc] init];
|
||||
_vapView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _vapView;
|
||||
}
|
||||
|
||||
- (XPRoomGiftAnimationParser *)vapParser {
|
||||
if (!_vapParser) {
|
||||
_vapParser = [[XPRoomGiftAnimationParser alloc] init];
|
||||
}
|
||||
return _vapParser;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -45,11 +45,20 @@
|
||||
[self showLoading];
|
||||
[self.presenter getExchangeDiamondInformation];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - XPIncomeRecordProtocol
|
||||
-(void)getExchangeDiamondInformation:(XPExchangeDiamondsModel *)model{
|
||||
[self hideHUD];
|
||||
self.model = model;
|
||||
self.exchangeView.model = self.model;
|
||||
|
||||
[self.exchangeView showKeyboard];
|
||||
}
|
||||
- (void)confirmExchangeDiamondSuccessWithDiamondNum:(NSString *)diamondNum goldNum:(NSString *)goldNum{
|
||||
[self hideHUD];
|
||||
|
@@ -23,15 +23,10 @@ typedef void(^ExchangeDiamondsItemViewHandle)(NSString *goldNum,NSString *diamon
|
||||
@interface XPExchangeDiamondsView : UIView
|
||||
@property (nonatomic,weak) id<XPExchangeDiamondsViewDelegate> delegate;
|
||||
@property (nonatomic,strong) XPExchangeDiamondsModel *model;
|
||||
|
||||
- (void)showKeyboard;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************************************华丽分割线***************************************************************/
|
||||
|
||||
@interface XPExchangeDiamondsItemView : UIView
|
||||
@@ -42,6 +37,7 @@ typedef void(^ExchangeDiamondsItemViewHandle)(NSString *goldNum,NSString *diamon
|
||||
@property (nonatomic,strong) XPExchangeDiamondsModel *model;
|
||||
@property (nonatomic,copy) NSString *count;
|
||||
-(instancetype)initWithFrame:(CGRect)frame type:(IncomeRecordViewType)type;
|
||||
-(void)becomeResponder;
|
||||
-(void)resignResponder;
|
||||
@end
|
||||
|
||||
|
@@ -33,30 +33,35 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)showKeyboard {
|
||||
[self.myDiamondsView becomeResponder];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
[self addSubview:self.myGoldView];
|
||||
[self addSubview:self.myDiamondsView];
|
||||
[self addSubview:self.myGoldView];
|
||||
|
||||
[self addSubview:self.confirmBtn];
|
||||
|
||||
@kWeakify(self)
|
||||
self.myGoldView.inputCounthandle = ^(NSString *_Nonnull goldNum,NSString *_Nonnull diamondNum) {
|
||||
@kStrongify(self)
|
||||
if(goldNum.integerValue == 0 && diamondNum.integerValue == 0){
|
||||
self.confirmBtn.enabled = NO;
|
||||
self.myGoldView.text = @"";
|
||||
self.myDiamondsView.text = @"";
|
||||
return;
|
||||
}
|
||||
self.chooseType = IncomeRecord_Gold;
|
||||
self.confirmBtn.enabled = YES;
|
||||
self.goldNum = goldNum;
|
||||
self.diamondNum = diamondNum;
|
||||
self.myDiamondsView.count = diamondNum;
|
||||
|
||||
};
|
||||
// self.myGoldView.inputCounthandle = ^(NSString *_Nonnull goldNum,NSString *_Nonnull diamondNum) {
|
||||
// @kStrongify(self)
|
||||
// if(goldNum.integerValue == 0 && diamondNum.integerValue == 0){
|
||||
// self.confirmBtn.enabled = NO;
|
||||
// self.myGoldView.text = @"";
|
||||
// self.myDiamondsView.text = @"";
|
||||
// return;
|
||||
// }
|
||||
// self.chooseType = IncomeRecord_Gold;
|
||||
// self.confirmBtn.enabled = YES;
|
||||
// self.goldNum = goldNum;
|
||||
// self.diamondNum = diamondNum;
|
||||
// self.myDiamondsView.count = diamondNum;
|
||||
//
|
||||
// };
|
||||
self.myDiamondsView.inputCounthandle = ^(NSString *_Nonnull goldNum,NSString *_Nonnull diamondNum) {
|
||||
@kStrongify(self)
|
||||
if(goldNum.integerValue == 0 && diamondNum.integerValue == 0){
|
||||
@@ -69,7 +74,7 @@
|
||||
self.confirmBtn.enabled = YES;
|
||||
self.goldNum = goldNum;
|
||||
self.diamondNum = diamondNum;
|
||||
self.myGoldView.count = goldNum;
|
||||
self.myGoldView.count = diamondNum;
|
||||
self.chooseType = IncomeRecord_Diamond;
|
||||
|
||||
};
|
||||
@@ -240,6 +245,11 @@
|
||||
-(void)resignResponder{
|
||||
[_numberView resignFirstResponder];
|
||||
}
|
||||
|
||||
-(void)becomeResponder {
|
||||
[_numberView becomeFirstResponder];
|
||||
}
|
||||
|
||||
-(void)setText:(NSString *)text{
|
||||
_text = text;
|
||||
_numberView.text = _text;
|
||||
@@ -258,13 +268,13 @@
|
||||
|
||||
}
|
||||
NSInteger count = textField.text.integerValue;
|
||||
if(self.type == IncomeRecord_Gold){
|
||||
NSString *goldNum = [NSString stringWithFormat:@"%.0f",ceilf(count / _model.rate)];
|
||||
if(self.inputCounthandle){
|
||||
self.inputCounthandle(goldNum, textField.text);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// if(self.type == IncomeRecord_Gold){
|
||||
// NSString *goldNum = [NSString stringWithFormat:@"%.0f",ceilf(count / _model.rate)];
|
||||
// if(self.inputCounthandle){
|
||||
// self.inputCounthandle(goldNum, textField.text);
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
NSString *diamondNum = [NSString stringWithFormat:@"%.0f",floorf(count * _model.rate)];
|
||||
if(self.inputCounthandle){
|
||||
self.inputCounthandle(textField.text,diamondNum);
|
||||
@@ -311,12 +321,16 @@
|
||||
_numberView = [[XPTextField alloc]initWithFrame:CGRectZero];
|
||||
_numberView.keyboardType = UIKeyboardTypeNumberPad;
|
||||
_numberView.isValidation = YES;
|
||||
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc]initWithString:YMLocalizedString(@"XPExchangeDiamondsView6") attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightMedium],NSForegroundColorAttributeName:[UIColor colorWithWhite:1 alpha:0.6]}];
|
||||
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:(self.type == IncomeRecord_Diamond) ? YMLocalizedString(@"XPExchangeDiamondsView6") : YMLocalizedString(@"XPExchangeDiamondsView7")
|
||||
attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightMedium],
|
||||
NSForegroundColorAttributeName:[UIColor colorWithWhite:1 alpha:0.6]}];
|
||||
_numberView.attributedPlaceholder = attStr;
|
||||
_numberView.font = kFontMedium(15);
|
||||
_numberView.textColor = [UIColor whiteColor];
|
||||
// _numberView.textAlignment = NSTextAlignmentRight;
|
||||
[_numberView addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
|
||||
if (self.type == IncomeRecord_Gold) {
|
||||
_numberView.userInteractionEnabled = NO;
|
||||
}
|
||||
}
|
||||
return _numberView;
|
||||
}
|
||||
|
@@ -259,7 +259,7 @@ typedef enum : NSUInteger {
|
||||
return 90;
|
||||
break;
|
||||
case Medal:
|
||||
return 70;
|
||||
return 140;
|
||||
break;
|
||||
case Gifts:
|
||||
return [XPMineGiftsTableViewCell cellHeight:self.isGiftsSectionExpand
|
||||
|
@@ -797,6 +797,7 @@
|
||||
|
||||
#pragma mark - Load Data from API
|
||||
- (void)setupData {
|
||||
[self showLoading];
|
||||
[self loadUserInfo];
|
||||
[self loadWalletInfo];
|
||||
}
|
||||
@@ -815,6 +816,12 @@
|
||||
|
||||
[self loadVIPCenterInfo];
|
||||
[self updatePurchaseArea];
|
||||
} else {
|
||||
if (msg.length > 0) {
|
||||
[self showErrorToast:msg];
|
||||
} else {
|
||||
[self hideHUD];
|
||||
}
|
||||
}
|
||||
} uid:uid];
|
||||
}
|
||||
@@ -862,6 +869,14 @@
|
||||
[self configIdentificationCards];
|
||||
[self configExclusivePrivilegesArea];
|
||||
[self updatePurchaseArea];
|
||||
|
||||
[self hideHUD];
|
||||
} else {
|
||||
if (msg.length > 0) {
|
||||
[self showErrorToast:msg];
|
||||
} else {
|
||||
[self hideHUD];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -915,7 +930,7 @@
|
||||
|
||||
#pragma mark - TYCyclePagerView Delegate & DataSource
|
||||
- (NSInteger)numberOfItemsInPagerView:(TYCyclePagerView *)pageView {
|
||||
return 9;
|
||||
return self.vipModel.vipInfos.count;//9;
|
||||
}
|
||||
|
||||
- (TYCyclePagerViewLayout *)layoutForPagerView:(TYCyclePagerView *)pageView {
|
||||
@@ -1046,7 +1061,6 @@
|
||||
_vipCardCyclePager.collectionView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
|
||||
_vipCardCyclePager.backgroundColor = [UIColor clearColor];
|
||||
_vipCardCyclePager.backgroundView = nil;
|
||||
_vipCardCyclePager.layer.borderWidth = 1;
|
||||
_vipCardCyclePager.isInfiniteLoop = NO;
|
||||
_vipCardCyclePager.autoScrollInterval = -1;
|
||||
_vipCardCyclePager.dataSource = self;
|
||||
|
@@ -355,7 +355,7 @@ return view;\
|
||||
[self.namePlateView addSubview:self.nameplateImageView];
|
||||
[self.namePlateView addSubview:self.nameplateLabel];
|
||||
[self.nameplateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(30);
|
||||
make.height.mas_equalTo(20);
|
||||
make.top.mas_equalTo(0);
|
||||
make.width.mas_equalTo(80);
|
||||
}];
|
||||
@@ -389,7 +389,7 @@ return view;\
|
||||
make.width.mas_equalTo(54);
|
||||
}];
|
||||
[self.namePlateView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(30);
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(80);
|
||||
}];
|
||||
}
|
||||
|
@@ -67,6 +67,7 @@
|
||||
#import "XPLittleGameRoomOpenView.h"
|
||||
#import "PISwitchingEnvironmentVC.h"
|
||||
#import "XPGameOrdersListViewController.h"
|
||||
#import "VIPCenterViewController.h"
|
||||
|
||||
|
||||
UIKIT_EXTERN NSString *kRequestTicket;
|
||||
@@ -297,8 +298,10 @@ UIKIT_EXTERN NSString *kRequestTicket;
|
||||
break;
|
||||
case XPMineItemType_Noble_Center:
|
||||
{
|
||||
XPNobleCenterViewController *nobleCenterVC = [[XPNobleCenterViewController alloc] init];
|
||||
[self.navigationController pushViewController:nobleCenterVC animated:YES];
|
||||
VIPCenterViewController *vc = [[VIPCenterViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
// XPNobleCenterViewController *nobleCenterVC = [[XPNobleCenterViewController alloc] init];
|
||||
// [self.navigationController pushViewController:nobleCenterVC animated:YES];
|
||||
}
|
||||
break;
|
||||
case XPMineItemType_FansTeam: {
|
||||
|
@@ -47,9 +47,9 @@
|
||||
UIImageView *headDress_1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"home_rank_Headdress_first"]];
|
||||
UIImageView *headDress_2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"home_rank_Headdress_second"]];
|
||||
UIImageView *headDress_3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"home_rank_Headdress_second"]];
|
||||
headDress_1.contentMode = UIViewContentModeScaleAspectFit;
|
||||
headDress_2.contentMode = UIViewContentModeScaleAspectFit;
|
||||
headDress_3.contentMode = UIViewContentModeScaleAspectFit;
|
||||
headDress_1.contentMode = UIViewContentModeScaleAspectFill;
|
||||
headDress_2.contentMode = UIViewContentModeScaleAspectFill;
|
||||
headDress_3.contentMode = UIViewContentModeScaleAspectFill;
|
||||
|
||||
[self.contentView addSubview:headDress_3];
|
||||
[self.contentView addSubview:headDress_2];
|
||||
@@ -58,22 +58,22 @@
|
||||
[headDress_1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.contentView).offset(2);
|
||||
make.top.mas_equalTo(self.contentView).offset(3);
|
||||
make.width.mas_equalTo(62);
|
||||
make.height.mas_equalTo(62);
|
||||
make.width.mas_equalTo(kGetScaleWidth(62));
|
||||
make.height.mas_equalTo(kGetScaleWidth(62));
|
||||
}];
|
||||
|
||||
[headDress_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView).offset(-5);
|
||||
make.leading.mas_equalTo(self.contentView).offset(3);
|
||||
make.width.mas_equalTo(55);
|
||||
make.height.mas_equalTo(55);
|
||||
make.width.mas_equalTo(kGetScaleWidth(55));
|
||||
make.height.mas_equalTo(kGetScaleWidth(55));
|
||||
}];
|
||||
|
||||
[headDress_3 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.contentView).offset(-5);
|
||||
make.trailing.mas_equalTo(self.contentView).offset(-3);
|
||||
make.width.mas_equalTo(55);
|
||||
make.height.mas_equalTo(55);
|
||||
make.width.mas_equalTo(kGetScaleWidth(55));
|
||||
make.height.mas_equalTo(kGetScaleWidth(55));
|
||||
}];
|
||||
|
||||
[self.contentView insertSubview:self.avatar_1 belowSubview:headDress_1];
|
||||
@@ -83,19 +83,19 @@
|
||||
[self.avatar_1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView).offset(13);
|
||||
make.centerX.mas_equalTo(headDress_1);
|
||||
make.width.height.mas_equalTo(38);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(38));
|
||||
}];
|
||||
|
||||
[self.avatar_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(headDress_2).offset(-9);
|
||||
make.centerX.mas_equalTo(headDress_2);
|
||||
make.width.height.mas_equalTo(38);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(38));
|
||||
}];
|
||||
|
||||
[self.avatar_3 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(headDress_3).offset(-9);
|
||||
make.centerX.mas_equalTo(headDress_3);
|
||||
make.width.height.mas_equalTo(38);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(38));
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
} else {
|
||||
_bgImageView.layer.cornerRadius = kGetScaleWidth(12);
|
||||
@kWeakify(self);
|
||||
[_bgImageView loadImageWithUrl: _itemModel.icon completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
[_bgImageView loadImageWithUrl:_itemModel.icon completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
self.bgImageView.layer.cornerRadius = kGetScaleWidth(0);
|
||||
}];
|
||||
|
@@ -14,8 +14,6 @@
|
||||
#import "Api+Gift.h"
|
||||
#import "XPGiftStorage.h"
|
||||
|
||||
#import "VIPCenterViewController.h"
|
||||
|
||||
@interface XPHomePagingViewController () <UIPageViewControllerDelegate, UIPageViewControllerDataSource>
|
||||
|
||||
@property (nonatomic, strong) UIView *topControlView;
|
||||
@@ -173,12 +171,6 @@
|
||||
}
|
||||
|
||||
- (void)didTapSearchButton {
|
||||
#if DEBUG
|
||||
VIPCenterViewController *vc = [[VIPCenterViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
#endif
|
||||
|
||||
XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init];
|
||||
searchVC.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController presentViewController:searchVC
|
||||
|
@@ -43,7 +43,8 @@
|
||||
#import "XPMineUserInfoViewController.h"
|
||||
#import "SessionViewController.h"
|
||||
|
||||
|
||||
#import <QGVAPWrapView.h>
|
||||
#import "XPRoomGiftAnimationParser.h"
|
||||
|
||||
@interface XPUserCardViewController ()<UICollectionViewDelegate, UICollectionViewDataSource,XPUserCardProtocol>
|
||||
///上面点击的view
|
||||
@@ -58,6 +59,8 @@
|
||||
@property (nonatomic,strong) UIView * userInfoView;
|
||||
///VIP资料卡头饰
|
||||
@property (nonatomic, strong) NetImageView *nobleImageView;
|
||||
@property (nonatomic, strong) VAPView *vapView;
|
||||
@property (nonatomic, strong) XPRoomGiftAnimationParser *vapParser;
|
||||
///模糊效果
|
||||
@property (strong, nonatomic) UIVisualEffectView *effectView;
|
||||
///头像背景
|
||||
@@ -153,7 +156,8 @@
|
||||
|
||||
[self.backView addSubview:self.stackView];
|
||||
[self.view addSubview:self.nobleImageView];
|
||||
|
||||
[self.view addSubview:self.vapView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.userInfoView];
|
||||
[self.stackView addArrangedSubview:self.skillCardView];
|
||||
[self.stackView addArrangedSubview:self.collectionView];
|
||||
@@ -220,6 +224,9 @@
|
||||
make.trailing.mas_equalTo(self.backView).offset(nobleMargin*0.5);
|
||||
make.leading.mas_equalTo(self.backView).mas_offset(-nobleMargin*0.5);
|
||||
}];
|
||||
[self.vapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.nobleImageView);
|
||||
}];
|
||||
[self.skillCardView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(self.userInfoView);
|
||||
make.height.mas_equalTo(0);
|
||||
@@ -239,7 +246,8 @@
|
||||
}];
|
||||
///用户信息的子view
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.userInfoView);
|
||||
make.top.leading.right.mas_equalTo(self.userInfoView);
|
||||
make.height.mas_equalTo(110);
|
||||
}];
|
||||
|
||||
[self.effectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -520,16 +528,40 @@
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
self.targetUserInfo = userInfo;
|
||||
self.avatarImageView.imageUrl = userInfo.avatar;
|
||||
self.backImageView.imageUrl = userInfo.avatar;
|
||||
self.nobleImageView.imageUrl = userInfo.userInfoCardPic;
|
||||
|
||||
if (userInfo.userVipInfoVO.vipLevel>0 && userInfo.userVipInfoVO.userCardBG.length > 0) {
|
||||
self.backImageView.imageUrl = [userInfo.userVipInfoVO.userCardBG stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
self.effectView.hidden = YES;
|
||||
self.backImageView.clipsToBounds = NO;
|
||||
[self.backImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(180);
|
||||
}];
|
||||
} else {
|
||||
self.backImageView.layer.masksToBounds = YES;
|
||||
self.backImageView.layer.cornerRadius = 25;
|
||||
self.backImageView.imageUrl = userInfo.avatar;
|
||||
}
|
||||
|
||||
NSString *resourcePath = [userInfo.userInfoCardPic stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
if (resourcePath.length > 0) {
|
||||
NSString *encodingUrl = [resourcePath stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
|
||||
@kWeakify(self);
|
||||
[self.vapParser parseWithURL:encodingUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
@kStrongify(self);
|
||||
if (videoUrl.length) {
|
||||
[self.vapView setMute:YES];
|
||||
[self.vapView playHWDMP4:videoUrl repeatCount:-1 delegate:nil];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
}
|
||||
|
||||
self.nobleIconImageView.imageUrl = userInfo.userVipInfoVO.vipIcon;
|
||||
if (userInfo.userVipInfoVO && userInfo.userVipInfoVO.vipIcon) {//VIPicon
|
||||
[self.nobleIconImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(30);
|
||||
}];
|
||||
// [self.nickLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.leading.mas_equalTo(self.nobleIconImageView.mas_trailing).mas_offset(2);
|
||||
// }];
|
||||
}
|
||||
NSString * nick = userInfo.nick;
|
||||
// if (nick.length > 20) {
|
||||
@@ -598,7 +630,6 @@
|
||||
make.height.mas_equalTo(30);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
self.skillCardView.dataArray = userInfo.absCardPics;
|
||||
}
|
||||
@@ -1222,8 +1253,6 @@
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[NetImageView alloc] init];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.layer.cornerRadius = 25;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
}
|
||||
@@ -1500,4 +1529,20 @@
|
||||
return _pickHeartButton;
|
||||
}
|
||||
|
||||
- (VAPView *)vapView {
|
||||
if (!_vapView) {
|
||||
_vapView = [[VAPView alloc] init];
|
||||
_vapView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _vapView;
|
||||
}
|
||||
|
||||
- (XPRoomGiftAnimationParser *)vapParser {
|
||||
if (!_vapParser) {
|
||||
_vapParser = [[XPRoomGiftAnimationParser alloc] init];
|
||||
_vapView.userInteractionEnabled = NO;
|
||||
}
|
||||
return _vapParser;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -28,6 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///隐身访问主页
|
||||
@property (nonatomic,assign) BOOL lookHomepageHide;
|
||||
|
||||
@property (nonatomic, copy) NSString *userCardBG;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -3200,6 +3200,7 @@ ineHeadView12" = "الحمل";
|
||||
"XPExchangeDiamondsView2" = "عدد الألماس غير كافٍ";
|
||||
"XPIncomeRecordGoldDetailsVC0" = "تفاصيل الألماس";
|
||||
"XPExchangeDiamondsView6"="يرجى إدخال …";
|
||||
"XPExchangeDiamondsView7"="الرجاء إدخال عدد الماسات...";
|
||||
///XPNobleCenterMyNobleView.m
|
||||
"XPNobleCenterMyNobleView0" = "المستوى الحالي";
|
||||
"XPNobleCenterMyNobleView1" = "لقد تم الوصول إلى أعلى مستوى VIP قابل للإستخدام";
|
||||
|
@@ -2992,6 +2992,7 @@
|
||||
"XPExchangeDiamondsView4"="The number of Coins for exchange cannot exceed %ld";
|
||||
"XPExchangeDiamondsView5"="Exchange successful";
|
||||
"XPExchangeDiamondsView6"="Please enter...";
|
||||
"XPExchangeDiamondsView7"="Please enter the number of diamonds...";
|
||||
"XPIncomeRecordCoinsDetailsView0"="No data available";
|
||||
"XPIncomeRecordCoinsDetailsView1"="Total Coins flow in the current room: %@ diamonds";
|
||||
|
||||
|
@@ -2634,6 +2634,7 @@
|
||||
"XPExchangeDiamondsView4"="兑换金币数不能超过%ld钻";
|
||||
"XPExchangeDiamondsView5"="兑换成功";
|
||||
"XPExchangeDiamondsView6"="請輸入...";
|
||||
"XPExchangeDiamondsView7"="請輸入鑽石數量...";
|
||||
"XPIncomeRecordGoldDetailsView0"="暂没有数据";
|
||||
"XPIncomeRecordGoldDetailsView1"="当前房间总计金币流水:%@金币";
|
||||
|
||||
|
@@ -2627,6 +2627,7 @@
|
||||
"XPExchangeDiamondsView4"="兌換金幣數不能超過%ld鉆";
|
||||
"XPExchangeDiamondsView5"="兌換成功";
|
||||
"XPExchangeDiamondsView6"="請輸入...";
|
||||
"XPExchangeDiamondsView7"="請輸入鑽石數量...";
|
||||
"XPIncomeRecordGoldDetailsView0"="暫沒有數據";
|
||||
"XPIncomeRecordGoldDetailsView1"="當前房間總計金幣流水:%@金幣";
|
||||
|
||||
|
Reference in New Issue
Block a user