修复bug

This commit is contained in:
liyuhua
2024-04-03 21:28:30 +08:00
parent 9b86af095e
commit 353a60f525
6 changed files with 34 additions and 6 deletions

View File

@@ -31,7 +31,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

View File

@@ -6,14 +6,14 @@
//
#import <UIKit/UIKit.h>
#import "UserVipInfoVo.h"
#import "NobleInfo.h"
#import "NobleCenterModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPNobleCenterEntranceView : UIView
@property (nonatomic, strong) UserVipInfoVo *vipInfo;
@property (nonatomic, strong) NobleInfo *vipInfo;
@property (nonatomic, strong) NobleCenterModel *nobleInfo;
@end

View File

@@ -90,7 +90,7 @@
}];
}
- (void)setVipInfo:(UserVipInfoVo *)vipInfo {
- (void)setVipInfo:(NobleInfo *)vipInfo {
_vipInfo = vipInfo;
if (vipInfo) {
[self addSubview:self.nobleIconImage];

View File

@@ -6,7 +6,7 @@
//
#import <UIKit/UIKit.h>
#import "NobleInfo.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^CompletionHandler)(NSMutableAttributedString *);
@class UserInfoModel,XPMineHeadView, WalletInfoModel,NobleCenterModel;
@@ -27,6 +27,7 @@ typedef void(^CompletionHandler)(NSMutableAttributedString *);
@property (nonatomic,strong) UserInfoModel *userInfo;
@property (nonatomic, strong) WalletInfoModel *walletInfo;
@property (nonatomic, strong) NobleCenterModel *nobleInfo;
@property(nonatomic,strong) NobleInfo *vipInfo;
///代理
@property (nonatomic,assign) id<XPMineHeadViewDelegate> delegate;
///访客未读数量

View File

@@ -414,7 +414,7 @@
self.levelLabel.attributedText = _userInfo.levelAtt;
self.fansView.number = [NSString stringWithFormat:@"%ld",_userInfo.fansNum];
self.attentionView.number = [NSString stringWithFormat:@"%ld",_userInfo.followNum];
self.nobleEntranceView.vipInfo = userInfo.userVipInfoVO;
}
}
@@ -423,6 +423,11 @@
}
- (void)setNobleInfo:(NobleCenterModel *)nobleInfo {
self.nobleEntranceView.nobleInfo = nobleInfo;
}
- (void)setVipInfo:(NobleInfo *)vipInfo{
_vipInfo = vipInfo;
self.nobleEntranceView.vipInfo = _vipInfo;
}
- (NetImageView *)avatarImageView {

View File

@@ -15,9 +15,12 @@
#import "StatisticsServiceHelper.h"
#import "YUMIConstant.h"
#import "Api+Room.h"
#import "Api+NobleCenter.h"
#import "Api+RoomSetting.h"
#import "AccountInfoStorage.h"
#import "ClientConfig.h"
#import "NobleCenterModel.h"
#import "NobleInfo.h"
///Model
#import "XPMineItemModel.h"
#import "UserInfoModel.h"
@@ -26,6 +29,7 @@
#import "HomeBannerInfoModel.h"
#import "XPMineFuntionItemModel.h"
#import "WalletInfoModel.h"
///P
#import "XPMineProtocol.h"
#import "XPMinePresent.h"
@@ -129,6 +133,24 @@ UIKIT_EXTERN NSString *kRequestRicket;
[super viewDidAppear:animated];
if([AccountInfoStorage instance].isRequestRicket == YES)return;
[self.presenter getUserInfo];
[Api nobleCenterLevelList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200){
NobleCenterModel *model = [NobleCenterModel modelWithDictionary:data.data];
NobleInfo *vipInfo ;
for (int index = 0; index < model.vipInfos.count; index++) {
NobleInfo *tagInfo = [model.vipInfos safeObjectAtIndex1:index];
if (model.currLevel > 0){
if (tagInfo.vipLevel == model.currLevel) {
vipInfo = tagInfo;
break;
}
}
}
self.headView.vipInfo = vipInfo;
}
}];
}
#pragma mark-