Commit b8414d4b by suolong

修复部分bug

parent 7ce0c345
Showing with 172 additions and 63 deletions
...@@ -437,6 +437,9 @@ NSString * const kEVENT_RECHARGE_OFFICIAL_PAGE_RETURN = @"officialrecharge_retur ...@@ -437,6 +437,9 @@ NSString * const kEVENT_RECHARGE_OFFICIAL_PAGE_RETURN = @"officialrecharge_retur
- (void)popViewController { - (void)popViewController {
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
if (self.onClickBackHandle) {
self.onClickBackHandle();
}
if (self.from == FUSFromChattingCall) { if (self.from == FUSFromChattingCall) {
[[NSNotificationCenter defaultCenter] postNotificationName:FUSChatNotificationKeys.fus_RECHARGE_BACK_TO_CONVERSATION object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:FUSChatNotificationKeys.fus_RECHARGE_BACK_TO_CONVERSATION object:nil];
......
...@@ -2028,7 +2028,7 @@ ...@@ -2028,7 +2028,7 @@
"重新传送密码成功" = "重新傳送密碼成功"; "重新传送密码成功" = "重新傳送密碼成功";
"[分享]" = "[分享["; "[分享]" = "[分享]";
"WEBP资源加载出错" = "WEBP資源加載出錯"; "WEBP资源加载出错" = "WEBP資源加載出錯";
...@@ -3430,3 +3430,94 @@ ...@@ -3430,3 +3430,94 @@
"昨日" = "昨日"; "昨日" = "昨日";
"直播总时长:%ld小时" = "直播總時長:%ld小時";
"进入陪伴" = "進入陪伴";
"马上储值进入陪伴" = "馬上儲值進入陪伴";
"试看%ldS" = "試看%ldS";
"您可陪伴%ld分钟,%ld/分钟" = "您可陪伴%ld分鐘,%ld/分鐘";
"%ld/分钟" = "%ld/分鐘";
"结束试看" = "結束試看";
"试看" = "試看";
"请选择礼物" = "請選擇禮物";
"添加互动" = "添加互動";
"互动描述" = "互動描述";
"例如:做鬼脸" = "例如:做鬼臉";
"绑定礼物" = "綁定禮物";
"礼物数量" = "禮物數量";
"请输入互动描述" = "請輸入互動描述";
"请绑定互动礼物" = "請綁定互動禮物";
"仅限中文、英文、空格" = "僅限中文、英文、空格";
"互动描述过长,请重新输入" = "互動描述過長,請重新輸入";
"重新开播" = "重新開播";
"礼物互动设置" = "禮物互動設置";
"请至少添加或激活一种互动选项" = "請至少添加或激活一種互動選項";
"互动内容数量已达上限" = "互動內容數量已達上限";
"互动内容" = "互動內容";
"新增表演" = "新增表演";
"礼物互动" = "禮物互動";
"打开开关后,直播间内展示对应互动所需送出的礼物" = "打開開關後,直播間內展示對應互動所需送出的禮物";
"确认删除该礼物互动吗?" = "確認刪除該禮物互動嗎?";
"设置贴纸文字" = "設置貼紙文字";
"付费屋" = "付費屋";
"玩家需付费观看" = "玩家需付費觀看";
"抢当MVP" = "搶當MVP";
"支持主播" = "支持主播";
"进入限时表演" = "進入限時表演";
"购票支持" = "購票支持";
"已集票数 %zd 张!" = "已集票數 %zd 張!";
"还差 %zd 张!" = "還差 %zd 張!";
"限时表演" = "限時表演";
"请先取消集票" = "請先取消集票";
"请先完成限时表演" = "請先完成限時表演";
"已开启限时表演" = "已開啟限時表演";
"集票进行中" = "集票進行中";
"已集票数 0 张!" = "已集票數 0 張!";
"取消集票" = "取消集票";
"表演中" = "表演中";
"表演结束倒数" = "表演結束倒數";
"已集票满 50 张!" = "已集票滿 50 張!";
"确定取消集票?" = "確定取消集票?";
"继续集票" = "繼續集票";
"直接开始" = "直接開始";
"已集票数:--/--" = "已集票數:--/--";
"票的贡献" = "票の貢獻";
"活动须知" = "活動須知";
"你持有张数" = "你持有張數";
"MVP持有张数" = "MVP持有張數";
"精彩限时表演中" = "精彩限時表演中";
"已集票数:" = "已集票數:";
"请输入直播主题" = "請輸入直播主題";
"设置主播主题" = "設置主播主題";
"贴纸" = "貼紙";
"每日16:00,来找我一起玩吧。" = "每日16:00,來找我一起玩吧。";
"集票数量" = "集票數量";
"开启集票" = "開啟集票";
"最低%zd张" = "最低%zd張";
"最高%zd张" = "最高%zd張";
"票已集齐,请开始表演!" = "票已集齊,請開始表演!";
"开始表演" = "開始表演";
"确定取消表演?" = "確定取消表演?";
"继续表演" = "繼續表演";
"后自动取消" = "後自動取消";
"表演结束倒计时:--:--" = "表演結束倒計時:--:--";
"展示实力" = "展示實力";
"表演结束倒计时:%02ld:%02ld" = "表演結束倒計時:%02ld:%02ld";
"確認" = "確認";
"互动" = "互動";
"暂无" = "暫無";
"陪伴中" = "陪伴中";
"试看中" = "試看中";
"本场收入:" = "本場收入:";
"陪伴中:" = "陪伴中:";
"人" = "人";
"试看中:" = "試看中:";
"%zd人在陪伴" = "%zd人在陪伴";
"下次计费" = "下次計費";
"已陪伴:%ld 分钟" = "已陪伴:%ld 分鐘";
"您可继续陪伴 %ld 分钟" = "您可繼續陪伴 %ld 分鐘";
"表演结束" = "表演結束";
"本场票数" = "本場票數";
"集票失败" = "集票失敗";
"张票已全部退回" = "張票已全部退回";
"
...@@ -147,7 +147,6 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20; ...@@ -147,7 +147,6 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
} }
- (void)fus_requestGiftListForPopView { - (void)fus_requestGiftListForPopView {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"正在加载礼物..."] autoDismiss:NO];
NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid ?: @""; NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid ?: @"";
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @""; NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @""; NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
...@@ -156,7 +155,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20; ...@@ -156,7 +155,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_dismissDialog]; [FUSDialogView fus_dismissDialog];
if (dataList.count == 0) { if (dataList.count == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"暂无可用礼物"]];
return; return;
} }
weakSelf.addPopView.giftList = dataList; weakSelf.addPopView.giftList = dataList;
...@@ -165,7 +164,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20; ...@@ -165,7 +164,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
} failure:^(NSString * _Nonnull msg, NSInteger code) { } failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_dismissDialog]; [FUSDialogView fus_dismissDialog];
[FUSDialogView fus_showDialog:(msg.length ? msg : [NSString fus_localString:@"礼物加载失败"])]; [FUSDialogView fus_showDialog:msg];
}); });
}]; }];
} }
...@@ -194,15 +193,11 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20; ...@@ -194,15 +193,11 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @""; NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @""; NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
NSString *sid = item.sid ?: @""; NSString *sid = item.sid ?: @"";
if (sid.length == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"数据异常,无法删除"]];
return;
}
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_requestGiftInteractManageDelWithUid:uid roomId:roomId channelId:channelId sid:sid succeed:^{ [FUSLiveHttpHelper fus_requestGiftInteractManageDelWithUid:uid roomId:roomId channelId:channelId sid:sid succeed:^{
[weakSelf fus_fetchManageList]; [weakSelf fus_fetchManageList];
} failure:^(NSString *msg, NSInteger code) { } failure:^(NSString *msg, NSInteger code) {
NSString *toast = ([msg length] ? msg : [NSString fus_localString:@"删除失败"] ); NSString *toast = msg;
[FUSDialogView fus_showDialog:toast]; [FUSDialogView fus_showDialog:toast];
}]; }];
} }
...@@ -221,10 +216,6 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20; ...@@ -221,10 +216,6 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @""; NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @""; NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
NSString *sid = item.sid ?: @""; NSString *sid = item.sid ?: @"";
if (sid.length == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"数据异常,无法更新状态"]];
return;
}
NSInteger wantStatus = isOn ? 1 : 0; NSInteger wantStatus = isOn ? 1 : 0;
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_requestGiftInteractManageUpdateStatusWithUid:uid roomId:roomId channelId:channelId sid:sid status:wantStatus succeed:^(NSInteger serverStatus) { [FUSLiveHttpHelper fus_requestGiftInteractManageUpdateStatusWithUid:uid roomId:roomId channelId:channelId sid:sid status:wantStatus succeed:^(NSInteger serverStatus) {
......
...@@ -21,7 +21,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -21,7 +21,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 用户信息 /// 用户信息
@property (nonatomic, strong) FUSOnlineUserModel *userModel; @property (nonatomic, strong) FUSOnlineUserModel *userModel;
/// 0 陪伴中 1试看中
@property (nonatomic, assign) NSInteger listType;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -177,6 +177,14 @@ ...@@ -177,6 +177,14 @@
}]; }];
} }
- (void)setListType:(NSInteger)listType
{
_listType = listType;
self.fireImageView.hidden = listType == 0 ? NO : YES;
self.fireLabel.hidden = listType == 0 ? NO : YES;
}
- (void)setUserModel:(FUSOnlineUserModel *)userModel { - (void)setUserModel:(FUSOnlineUserModel *)userModel {
_userModel = userModel; _userModel = userModel;
......
...@@ -614,33 +614,10 @@ ...@@ -614,33 +614,10 @@
- (void)ffupdateToolView2TypesPKState:(FUSPKState)pkState { - (void)ffupdateToolView2TypesPKState:(FUSPKState)pkState {
NSMutableArray *toolTypesList = [[NSMutableArray alloc] init]; NSMutableArray *toolTypesList = [[NSMutableArray alloc] init];
FUSRoomInfoModel *roomInfoModel = FUSLiveHelper.shareInstance.roomInfoModel;
/// 限时表演进行中判定:重连恢复后 roomScopeType 可能不是 Open,这里要额外兜住展示入口
BOOL inShowTimeRound = (roomInfoModel.collectTicket == 1 || roomInfoModel.liveScope == 5);
/// 连麦房仅保留基础设置,不显示 PK / 限时表演入口
if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) { if (FUSLiveHelper.shareInstance.liveRoomType == FUSRoomTypeLinkMic) {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting)/*,@(FFLiveBottomToolTypeRoomScope), @(FFLiveBottomToolTypeNovaBuild)*/]]; [toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime)/*,@(FFLiveBottomToolTypeRoomScope), @(FFLiveBottomToolTypeNovaBuild)*/]];
} else { } else {
/// 私享屋:默认不展示限时表演;若当前回合已在限时表演中,则强制补回入口,避免“恢复直播后按钮丢失” [toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime),@(FUSLiveBottomToolTypePK)/*,@(FUSLiveBottomToolTypeRoomScope), @(FUSLiveBottomToolTypeNovaBuild)*/]];
if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypePassword) {
if (inShowTimeRound) {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime), @(FUSLiveBottomToolTypePK)]];
} else {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting), @(FUSLiveBottomToolTypePK)]];
}
}
else {
/// 公开屋始终显示限时表演入口;其他房型仅在“限时表演进行中”时显示入口
if (FUSLiveHelper.shareInstance.roomScopeType == FUSLiveRoomScopeTypeOpen) {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime), /*@(FUSLiveBottomToolTypeRoomScope),*/@(FUSLiveBottomToolTypePK)/*, @(FUSLiveBottomToolTypeNovaBuild)*/]];
} else {
if (inShowTimeRound) {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime),@(FUSLiveBottomToolTypePK)]];
} else {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting), /*@(FUSLiveBottomToolTypeRoomScope),*/@(FUSLiveBottomToolTypePK)/*, @(FUSLiveBottomToolTypeNovaBuild)*/]];
}
}
}
// [toolTypesList appendObjects:@[@(FFLiveBottomToolTypeLiveSetting),@(FFLiveBottomToolTypeRoomSetting), @(FFLiveBottomToolTypeRoomScope),@(FFLiveBottomToolTypeBeautySticker), @(FFLiveBottomToolTypeNovaBuild)]]; // [toolTypesList appendObjects:@[@(FFLiveBottomToolTypeLiveSetting),@(FFLiveBottomToolTypeRoomSetting), @(FFLiveBottomToolTypeRoomScope),@(FFLiveBottomToolTypeBeautySticker), @(FFLiveBottomToolTypeNovaBuild)]];
} }
......
...@@ -168,7 +168,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10; ...@@ -168,7 +168,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
self.topTitleLabel = [[UILabel alloc] init]; self.topTitleLabel = [[UILabel alloc] init];
self.topTitleLabel.font = [UIFont fus_themeFont:12]; self.topTitleLabel.font = [UIFont fus_themeFont:12];
self.topTitleLabel.textColor = [UIColor colorWithWhite:1 alpha:0.85]; self.topTitleLabel.textColor = [UIColor colorWithWhite:1 alpha:0.85];
self.topTitleLabel.text = [NSString fus_localString:@"我是昵称"];
self.topTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail; self.topTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[self.topTitleLabel setContentCompressionResistancePriority:UILayoutPriorityDefaultLow forAxis:UILayoutConstraintAxisHorizontal]; [self.topTitleLabel setContentCompressionResistancePriority:UILayoutPriorityDefaultLow forAxis:UILayoutConstraintAxisHorizontal];
[self.topTicketInfoContainerView addSubview:self.topTitleLabel]; [self.topTicketInfoContainerView addSubview:self.topTitleLabel];
...@@ -240,13 +239,11 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10; ...@@ -240,13 +239,11 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
self.themeLabel.pauseInterval = 1.5; self.themeLabel.pauseInterval = 1.5;
self.themeLabel.labelSpacing = 20; self.themeLabel.labelSpacing = 20;
[self.themeLabel observeApplicationNotifications]; [self.themeLabel observeApplicationNotifications];
self.themeLabel.text = [NSString fus_localString:@"我是表演主题表演主题"];
[self.blurView.contentView addSubview:self.themeLabel]; [self.blurView.contentView addSubview:self.themeLabel];
self.remainingLabel = [[UILabel alloc] init]; self.remainingLabel = [[UILabel alloc] init];
self.remainingLabel.font = [UIFont fus_themeFont:12]; self.remainingLabel.font = [UIFont fus_themeFont:12];
self.remainingLabel.textColor = [UIColor colorWithWhite:1 alpha:0.85]; self.remainingLabel.textColor = [UIColor colorWithWhite:1 alpha:0.85];
self.remainingLabel.text = [NSString fus_localString:@"还差 49 张!"];
[self.blurView.contentView addSubview:self.remainingLabel]; [self.blurView.contentView addSubview:self.remainingLabel];
self.countdownIconView = [[UIImageView alloc] init]; self.countdownIconView = [[UIImageView alloc] init];
...@@ -815,8 +812,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10; ...@@ -815,8 +812,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
self.actionHandler(); self.actionHandler();
return; return;
} }
[FUSDialogView fus_showDialog:[NSString fus_localString:@"功能开发中"]];
return;
} }
if (self.cancelHandler) { if (self.cancelHandler) {
[FUSAlertView showAlertWithTitle:nil [FUSAlertView showAlertWithTitle:nil
...@@ -830,7 +825,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10; ...@@ -830,7 +825,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
}]; }];
return; return;
} }
[FUSDialogView fus_showDialog:[NSString fus_localString:@"功能开发中"]];
} }
/// 根据展示模式调整布局(主播端/用户端差异) /// 根据展示模式调整布局(主播端/用户端差异)
......
...@@ -162,7 +162,6 @@ static const NSInteger kFUSShowTimeTicketMax = 50; ...@@ -162,7 +162,6 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
self.tipLabel.textAlignment = NSTextAlignmentCenter; self.tipLabel.textAlignment = NSTextAlignmentCenter;
self.tipLabel.font = [UIFont fus_themeFont:12]; self.tipLabel.font = [UIFont fus_themeFont:12];
self.tipLabel.textColor = [UIColor colorWithHex:@"#9AA0A6"]; self.tipLabel.textColor = [UIColor colorWithHex:@"#9AA0A6"];
self.tipLabel.text = [NSString fus_localString:@"集得足够票数,可开启限时表演(10分钟)"];
[self.contentView addSubview:self.tipLabel]; [self.contentView addSubview:self.tipLabel];
CGFloat btnH = 44; CGFloat btnH = 44;
......
...@@ -35,16 +35,14 @@ ...@@ -35,16 +35,14 @@
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundColor = UIColor.whiteColor; self.tableView.backgroundColor = UIColor.whiteColor;
self.tableView.rowHeight = 64; self.tableView.rowHeight = 64;
/// 默认展示空态占位:覆盖未主动调用 fus_updateContributionList: 的页面场景
self.tableView.tableFooterView = self.emptyView; self.tableView.tableFooterView = self.emptyView;
[self.tableView registerClass:FUSLiveShowTimeTicketContributionCell.class forCellReuseIdentifier:NSStringFromClass(FUSLiveShowTimeTicketContributionCell.class)]; [self.tableView registerClass:FUSLiveShowTimeTicketContributionCell.class forCellReuseIdentifier:NSStringFromClass(FUSLiveShowTimeTicketContributionCell.class)];
[self addSubview:self.tableView]; [self addSubview:self.tableView];
self.emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 320)]; self.emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 200)];
self.emptyView.contentAligment = FUSEmptyViewAligmentCenter; self.emptyView.contentAligment = FUSEmptyViewAligmentCenter;
[self.emptyView fus_setEmptyViewIcon:UIImage.fus_emptyImg title:[NSString fus_localString:@"空空如也"] buttonTittle:nil]; [self.emptyView fus_setEmptyViewIcon:UIImage.fus_emptyImg title:[NSString fus_localString:@"空空如也"] buttonTittle:nil];
self.emptyView.imageScale = 0.3; self.emptyView.imageScale = 0.3;
self.emptyView.contentVerticalOffset = -10;
self.emptyView.backgroundColor = UIColor.clearColor; self.emptyView.backgroundColor = UIColor.clearColor;
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -55,9 +53,7 @@ ...@@ -55,9 +53,7 @@
} }
- (void)setContributionList:(NSArray<FUSShowRoomUserContributeModel *> *)contributionList { - (void)setContributionList:(NSArray<FUSShowRoomUserContributeModel *> *)contributionList {
/// copy 保证外部可变数组传入时不会被后续修改影响 UI 展示
_contributionList = [contributionList copy] ?: @[]; _contributionList = [contributionList copy] ?: @[];
/// 统一空态处理:无数据展示“展位图”,有数据恢复普通 footer
if (_contributionList.count > 0) { if (_contributionList.count > 0) {
self.tableView.tableFooterView = [[UIView alloc] init]; self.tableView.tableFooterView = [[UIView alloc] init];
} else { } else {
......
...@@ -60,7 +60,7 @@ static NSInteger const kFUSLiveShowTimeAudienceEntryNoticeViewTag = 90917003; ...@@ -60,7 +60,7 @@ static NSInteger const kFUSLiveShowTimeAudienceEntryNoticeViewTag = 90917003;
self.titleLabel.font = [UIFont fus_themeMediumFont:17]; self.titleLabel.font = [UIFont fus_themeMediumFont:17];
self.titleLabel.textColor = [UIColor colorWithHex:@"#2A2A2A"]; self.titleLabel.textColor = [UIColor colorWithHex:@"#2A2A2A"];
self.titleLabel.textAlignment = NSTextAlignmentCenter; self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = [NSString fus_localString:@"活動須知"]; self.titleLabel.text = [NSString fus_localString:@"活动须知"];
[self.cardView addSubview:self.titleLabel]; [self.cardView addSubview:self.titleLabel];
self.contentLabel = [[UILabel alloc] initWithFrame:CGRectZero]; self.contentLabel = [[UILabel alloc] initWithFrame:CGRectZero];
......
...@@ -93,6 +93,15 @@ if (@available(iOS 11.0, *)) {height = height + UIView.fus_SafeBottom;}\ ...@@ -93,6 +93,15 @@ if (@available(iOS 11.0, *)) {height = height + UIView.fus_SafeBottom;}\
*/ */
- (void)fus_jumpToGiftPageWithGCId:(NSString *)gcId GiftId:(NSString *)giftId; - (void)fus_jumpToGiftPageWithGCId:(NSString *)gcId GiftId:(NSString *)giftId;
/**
跳转到指定礼物,并按外部传入数量预设礼物面板的赠送数量
@param gcId 礼物分类ID(可空)
@param giftId 礼物ID
@param giftNum 预设礼物数量(小于等于0时内部按1兜底)
*/
- (void)fus_jumpToGiftPageWithGCId:(NSString *)gcId GiftId:(NSString *)giftId giftNum:(NSInteger)giftNum;
/// 打开背包面板 /// 打开背包面板
/// - Parameters: /// - Parameters:
/// - pageType: FUSLiveGiftPageType类型背包某一个面板,none为自动根据gid选择 /// - pageType: FUSLiveGiftPageType类型背包某一个面板,none为自动根据gid选择
......
...@@ -1298,6 +1298,29 @@ static FUSLiveGiftView *giftView = nil; ...@@ -1298,6 +1298,29 @@ static FUSLiveGiftView *giftView = nil;
// } // }
// } // }
} }
- (void)fus_jumpToGiftPageWithGCId:(NSString *)gcId GiftId:(NSString *)giftId giftNum:(NSInteger)giftNum {
if ([NSString isNullWithString:giftId]) {
return;
}
NSInteger safeGiftNum = MAX(1, giftNum);
if (![FUSGiftDataCenter sharedCenter].sendGiftInfoDic) {
[FUSGiftDataCenter sharedCenter].sendGiftInfoDic = [NSMutableDictionary dictionary];
}
self.sendGiftInfoDic[@"gid"] = giftId;
self.sendGiftInfoDic[@"num"] = [@(safeGiftNum) description];
NSString *safeGiftId = [giftId copy];
NSString *safeGCId = [gcId copy];
NSString *safeGiftNumText = [@(safeGiftNum) description];
dispatch_block_t applyJumpAndNum = ^{
[self fus_jumpToGiftPageWithGCId:safeGCId GiftId:safeGiftId];
[self fus_setupGiftNum:safeGiftNumText];
};
applyJumpAndNum();
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.35 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
applyJumpAndNum();
});
}
/// 跳到礼物面板某个分类的礼物 /// 跳到礼物面板某个分类的礼物
-(void)fus_JumpToCategory:(FUSLiveGiftCategoryDataModel *)model index:(NSInteger)i gid:(NSString *)giftId{ -(void)fus_JumpToCategory:(FUSLiveGiftCategoryDataModel *)model index:(NSInteger)i gid:(NSString *)giftId{
for (NSInteger j = 0; j < model.giftDataArr.count; j++) { for (NSInteger j = 0; j < model.giftDataArr.count; j++) {
......
...@@ -3721,7 +3721,7 @@ BDAlphaPlayerMetalViewDelegate ...@@ -3721,7 +3721,7 @@ BDAlphaPlayerMetalViewDelegate
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAudience) { if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAudience) {
[[FUSLiveGiftView shareGiftView] fus_giftViewShowOnView:superView currentVC:[weakSelf getViewController] animation:YES toUid:[FUSLiveHelper shareInstance].roomInfoModel.roomId liveType:FUSGiftViewTypeAudience micLinkingUsers:weakSelf.linkMicroView.micListArr]; [[FUSLiveGiftView shareGiftView] fus_giftViewShowOnView:superView currentVC:[weakSelf getViewController] animation:YES toUid:[FUSLiveHelper shareInstance].roomInfoModel.roomId liveType:FUSGiftViewTypeAudience micLinkingUsers:weakSelf.linkMicroView.micListArr];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[FUSLiveGiftView shareGiftView] fus_jumpToGiftPageWithGCId:nil GiftId:item.giftId]; [[FUSLiveGiftView shareGiftView] fus_jumpToGiftPageWithGCId:nil GiftId:item.giftId giftNum:item.giftNum];
}); });
} }
}; };
......
...@@ -161,7 +161,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen ...@@ -161,7 +161,7 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
UILabel *nicknameLabel = self.nicknameLabels[i]; UILabel *nicknameLabel = self.nicknameLabels[i];
NSString *nickname = model.userNickname ?: @""; NSString *nickname = model.userNickname ?: @"";
nicknameLabel.text = fus_substringComposedToLength(nickname, 4); nicknameLabel.text = nickname;
CBAutoScrollLabel *taskLabel = self.taskLabels[i]; CBAutoScrollLabel *taskLabel = self.taskLabels[i];
NSString *task = model.name ?: @""; NSString *task = model.name ?: @"";
...@@ -206,11 +206,9 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen ...@@ -206,11 +206,9 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
CGFloat avatarSize = 18; CGFloat avatarSize = 18;
CGFloat avatarX = padding; CGFloat avatarX = padding;
CGFloat avatarRight = avatarX + avatarSize + 4; CGFloat avatarRight = avatarX + avatarSize + 4;
CGFloat nicknameW = 30; CGFloat textX = avatarRight;
CGFloat nicknameX = avatarRight;
CGFloat textX = nicknameX;
CGFloat buttonX = CGRectGetWidth(self.bounds) - padding - buttonSize; CGFloat buttonX = CGRectGetWidth(self.bounds) - padding - buttonSize;
CGFloat textW = buttonX - textX - 6; CGFloat textW = buttonX - textX - 2;
CGFloat lineGap = 1; CGFloat lineGap = 1;
CGFloat rowGap = 6; CGFloat rowGap = 6;
if (textW < 0) { if (textW < 0) {
......
...@@ -61,6 +61,9 @@ ...@@ -61,6 +61,9 @@
@implementation FUSPayRoomCompanionPopView @implementation FUSPayRoomCompanionPopView
static CGFloat const kFUSPayRoomCompanionNormalHeight = 108.0;
static CGFloat const kFUSPayRoomCompanionRechargeDefaultHeight = 160.0;
+ (FUSPayRoomCompanionPopView *)fus_showWithRootView:(UIView *)rootView + (FUSPayRoomCompanionPopView *)fus_showWithRootView:(UIView *)rootView
payRoomData:(FUSPayRoomFrostedGlassDataModel *)payRoomData payRoomData:(FUSPayRoomFrostedGlassDataModel *)payRoomData
{ {
...@@ -79,7 +82,7 @@ ...@@ -79,7 +82,7 @@
} }
CGFloat viewW = 120; CGFloat viewW = 120;
CGFloat viewH = (displayCompanionData.isEnough == 0 ? 160 : 123); CGFloat viewH = (displayCompanionData.isEnough == 0 ? kFUSPayRoomCompanionRechargeDefaultHeight : kFUSPayRoomCompanionNormalHeight);
CGFloat viewX = 10; CGFloat viewX = 10;
CGFloat viewY = UIView.fus_SafeTop + 205; CGFloat viewY = UIView.fus_SafeTop + 205;
FUSPayRoomCompanionPopView *popView = [[FUSPayRoomCompanionPopView alloc] initWithFrame:CGRectMake(viewX, viewY, viewW, viewH)]; FUSPayRoomCompanionPopView *popView = [[FUSPayRoomCompanionPopView alloc] initWithFrame:CGRectMake(viewX, viewY, viewW, viewH)];
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
if (self) { if (self) {
self.backgroundColor = UIColor.clearColor; self.backgroundColor = UIColor.clearColor;
self.clipsToBounds = NO; self.clipsToBounds = NO;
self.normalHeight = 123; self.normalHeight = kFUSPayRoomCompanionNormalHeight;
CGFloat arrowW = 14; CGFloat arrowW = 14;
self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width - arrowW, self.height)]; self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width - arrowW, self.height)];
...@@ -194,6 +197,7 @@ ...@@ -194,6 +197,7 @@
self.rechargeBtn.hidden = YES; self.rechargeBtn.hidden = YES;
[self.contentView addSubview:self.rechargeBtn]; [self.contentView addSubview:self.rechargeBtn];
self.normalHeight = ceil(CGRectGetMaxY(self.priceLabel.frame) + contentPadding);
CGFloat requiredHeight = CGRectGetMaxY(self.rechargeBtn.frame) + contentPadding; CGFloat requiredHeight = CGRectGetMaxY(self.rechargeBtn.frame) + contentPadding;
self.rechargeHeight = MAX(self.normalHeight, requiredHeight); self.rechargeHeight = MAX(self.normalHeight, requiredHeight);
if (self.height < self.rechargeHeight) { if (self.height < self.rechargeHeight) {
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
NSString *primaryTitle = ([NSString isNull:viewModel.primaryButtonTitle] ? [NSString fus_localString:@"进入陪伴"] : viewModel.primaryButtonTitle); NSString *primaryTitle = ([NSString isNull:viewModel.primaryButtonTitle] ? [NSString fus_localString:@"进入陪伴"] : viewModel.primaryButtonTitle);
[self.primaryButton setTitle:primaryTitle forState:UIControlStateNormal]; [self.primaryButton setTitle:primaryTitle forState:UIControlStateNormal];
NSString *trialTitle = ([NSString isNull:viewModel.trialButtonTitle] ? [NSString fus_localString:@"试看20S"] : viewModel.trialButtonTitle); NSString *trialTitle = viewModel.trialButtonTitle;
[self.trialButton setTitle:trialTitle forState:UIControlStateNormal]; [self.trialButton setTitle:trialTitle forState:UIControlStateNormal];
[self fus_updateBottomTipWithText:viewModel.bottomTipText]; [self fus_updateBottomTipWithText:viewModel.bottomTipText];
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
@property (nonatomic, strong) NSMutableArray<FUSOnlineUserModel *> *userList; @property (nonatomic, strong) NSMutableArray<FUSOnlineUserModel *> *userList;
@property (nonatomic, strong) NSMutableSet<NSString *> *userIdSet; @property (nonatomic, strong) NSMutableSet<NSString *> *userIdSet;
@property (nonatomic, assign) NSInteger page; @property (nonatomic, assign) NSInteger page;
/// 0 陪伴中 1试看中
@property (nonatomic, assign) NSInteger listType; @property (nonatomic, assign) NSInteger listType;
@end @end
...@@ -183,6 +184,7 @@ ...@@ -183,6 +184,7 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
FUSAudienceTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[FUSAudienceTableViewCell cellIdentifer] forIndexPath:indexPath]; FUSAudienceTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[FUSAudienceTableViewCell cellIdentifer] forIndexPath:indexPath];
cell.userModel = self.userList[indexPath.row]; cell.userModel = self.userList[indexPath.row];
cell.listType = self.listType;
return cell; return cell;
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
[self.bgBtn addTarget:self action:@selector(fus_dismissView) forControlEvents:UIControlEventTouchUpInside]; [self.bgBtn addTarget:self action:@selector(fus_dismissView) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:self.bgBtn]; [self addSubview:self.bgBtn];
self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_screenH, UIView.fus_screenW, 582)]; self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_screenH, UIView.fus_screenW, 550)];
self.contentView.backgroundColor = UIColor.whiteColor; self.contentView.backgroundColor = UIColor.whiteColor;
[self.contentView addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(16, 16)]; [self.contentView addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(16, 16)];
[self addSubview:self.contentView]; [self addSubview:self.contentView];
......
...@@ -243,7 +243,20 @@ ...@@ -243,7 +243,20 @@
- (void)fus_clickStatsAction:(UIButton *)sender forEvent:(UIEvent *)event { - (void)fus_clickStatsAction:(UIButton *)sender forEvent:(UIEvent *)event {
UIView *rootView = [[FUSLiveHelper shareInstance].currentFunctionView fus_viewWithLayer:FUSLiveFunctionLayerManualPopView]; UIView *rootView = [[FUSLiveHelper shareInstance].currentFunctionView fus_viewWithLayer:FUSLiveFunctionLayerManualPopView];
[FUSPayRoomViewerPopView fus_showWithRootView:rootView startIndex:0]; FUSPayRoomViewerPopView *popView = [FUSPayRoomViewerPopView fus_showWithRootView:rootView startIndex:0];
popView.clickUserHandler = ^(NSDictionary * _Nonnull userDict) {
NSString *uid = [NSString stringWithObject:userDict[@"uid"]];
if ([NSString isNull:uid]) {
uid = [NSString stringWithObject:userDict[@"userId"]];
}
if ([NSString isNull:uid]) {
uid = [NSString stringWithObject:userDict[@"id"]];
}
if ([NSString isNull:uid]) {
return;
}
[FUSRouter.userRouter fus_enterUserZone:uid isFromLiveRoomChat:NO];
};
} }
- (void)fus_updateWithPayRoomPayload:(NSDictionary *)payload { - (void)fus_updateWithPayRoomPayload:(NSDictionary *)payload {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment