个播PK中显示魅力值,离线模式下魅力值修复

This commit is contained in:
chenguilong
2022-05-16 20:46:30 +08:00
parent 2478bbcfae
commit 4901e76159
4 changed files with 29 additions and 4 deletions

View File

@@ -35,7 +35,7 @@
#define mcWidth (40 + 5) #define mcWidth (40 + 5)
#define mcHeight (mcWidth + 6 + 12) #define mcHeight (mcWidth + 6 + 12)
// 3 padding 30 // 3 padding 30
#define paddingH 28 #define paddingH 35
// //
#define marginW 50 #define marginW 50
@@ -72,7 +72,7 @@
} }
- (CGFloat)hightForStageView { - (CGFloat)hightForStageView {
return 306; return topMargin + ownerHeight + paddingH + mcHeight + 10;
} }
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid { - (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {

View File

@@ -41,6 +41,11 @@
#pragma mark - MicroViewProtocol #pragma mark - MicroViewProtocol
- (void)showGiftValueMode:(BOOL)isGiftValue { - (void)showGiftValueMode:(BOOL)isGiftValue {
self.giftValueView.hidden = YES; self.giftValueView.hidden = YES;
if (self.position != -1) {
self.giftValueView.hidden = YES;
} else {
self.giftValueView.hidden = !isGiftValue;
}
} }
/// ///
@@ -114,6 +119,15 @@
- (void)configUser:(UserInfoModel *)userInfo { - (void)configUser:(UserInfoModel *)userInfo {
[super configUser:userInfo]; [super configUser:userInfo];
self.sexImageView.hidden = YES; self.sexImageView.hidden = YES;
if (self.position == -1) {
[self.giftValueView removeFromSuperview];
}
[self addSubview:self.giftValueView];
[self.giftValueView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(16);
make.top.mas_equalTo(self.stackView.mas_bottom).mas_offset(10);
make.centerX.mas_equalTo(self.avatarImageView);
}];
} }
#pragma mark - getter #pragma mark - getter

View File

@@ -451,7 +451,11 @@
if (self.userInfo && self.userInfo.uid > 0) { if (self.userInfo && self.userInfo.uid > 0) {
XPWebViewController * webVC = [[XPWebViewController alloc] init]; XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid]; webVC.roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
webVC.url = [NSString stringWithFormat:@"%@?uid=%ld", URLWithType(kRoomCharmRankURL), self.microModel.userInfo.uid]; if (self.roomInfo.leaveMode && self.userInfo.uid == self.roomInfo.uid) { ///
webVC.url = [NSString stringWithFormat:@"%@?uid=%ld", URLWithType(kRoomCharmRankURL), self.microModel.userInfo.uid ? self.microModel.userInfo.uid : self.roomInfo.uid];
} else {
webVC.url = [NSString stringWithFormat:@"%@?uid=%ld", URLWithType(kRoomCharmRankURL), self.microModel.userInfo.uid];
}
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES]; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES];
} }
} }

View File

@@ -192,7 +192,13 @@
[view configMicQueue:self.micQueue]; [view configMicQueue:self.micQueue];
[view configMicroView:model]; [view configMicroView:model];
[view showLeaveMode:i == 0 && leaveMode]; [view showLeaveMode:i == 0 && leaveMode];
if (model.userInfo == nil || !roomInfo.showGiftValue) [view resetGiftValue]; if (leaveMode && i == 0) {
if (!roomInfo.showGiftValue) {//
[view resetGiftValue];
}
} else {
if (model.userInfo == nil || !roomInfo.showGiftValue) [view resetGiftValue];
}
[view showGiftValueMode:roomInfo.showGiftValue]; [view showGiftValueMode:roomInfo.showGiftValue];
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) { if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open; selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
@@ -292,6 +298,7 @@
} }
microQueueChanged = YES; microQueueChanged = YES;
} }
[self initGiftValue];
} }
break; break;