Commit b8414d4b by suolong

修复部分bug

parent 7ce0c345
Showing with 282 additions and 170 deletions
......@@ -437,6 +437,9 @@ NSString * const kEVENT_RECHARGE_OFFICIAL_PAGE_RETURN = @"officialrecharge_retur
- (void)popViewController {
[self.navigationController popViewControllerAnimated:YES];
if (self.onClickBackHandle) {
self.onClickBackHandle();
}
if (self.from == FUSFromChattingCall) {
[[NSNotificationCenter defaultCenter] postNotificationName:FUSChatNotificationKeys.fus_RECHARGE_BACK_TO_CONVERSATION object:nil];
......
......@@ -2028,7 +2028,7 @@
"重新传送密码成功" = "重新傳送密碼成功";
"[分享]" = "[分享[";
"[分享]" = "[分享]";
"WEBP资源加载出错" = "WEBP資源加載出錯";
......@@ -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;
}
- (void)fus_requestGiftListForPopView {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"正在加载礼物..."] autoDismiss:NO];
NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid ?: @"";
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
......@@ -156,7 +155,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_dismissDialog];
if (dataList.count == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"暂无可用礼物"]];
return;
}
weakSelf.addPopView.giftList = dataList;
......@@ -165,7 +164,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[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;
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
NSString *sid = item.sid ?: @"";
if (sid.length == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"数据异常,无法删除"]];
return;
}
__weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_requestGiftInteractManageDelWithUid:uid roomId:roomId channelId:channelId sid:sid succeed:^{
[weakSelf fus_fetchManageList];
} failure:^(NSString *msg, NSInteger code) {
NSString *toast = ([msg length] ? msg : [NSString fus_localString:@"删除失败"] );
NSString *toast = msg;
[FUSDialogView fus_showDialog:toast];
}];
}
......@@ -221,10 +216,6 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 20;
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
NSString *sid = item.sid ?: @"";
if (sid.length == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"数据异常,无法更新状态"]];
return;
}
NSInteger wantStatus = isOn ? 1 : 0;
__weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_requestGiftInteractManageUpdateStatusWithUid:uid roomId:roomId channelId:channelId sid:sid status:wantStatus succeed:^(NSInteger serverStatus) {
......
......@@ -1085,10 +1085,6 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
return;
}
if (action == FUSLiveShowTimeAudienceEntryMainViewActionEnter) {
if (!buyGetDataModel) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"数据加载中,请稍后"]];
return;
}
NSInteger buyNum = [strongSelf fus_ticketShowBuyNumWithBuyGetDataModel:buyGetDataModel selectedOptionIndex:selectedOptionIndex];
[strongSelf fus_requestTicketShowUserBuyAndEnterRoomWithRoomId:currentRoomId channelId:channelId roundId:roundId buyNum:buyNum entryView:weakEntryView password:password behaviorSrc:behaviorSrc otherInfo:otherInfo];
return;
......@@ -1165,10 +1161,6 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
return;
}
if (action == FUSLiveShowTimeAudienceEntryMainViewActionEnter) {
if (!buyGetDataModel) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"数据加载中,请稍后"]];
return;
}
NSInteger buyNum = [strongSelf fus_ticketShowBuyNumWithBuyGetDataModel:buyGetDataModel selectedOptionIndex:selectedOptionIndex];
[strongSelf fus_requestTicketShowUserBuyAndEnterRoomWithRoomId:currentRoomId channelId:safeChannelId roundId:safeRoundId buyNum:buyNum entryView:weakEntryView password:@"" behaviorSrc:@"" otherInfo:nil];
return;
......@@ -1242,10 +1234,7 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
behaviorSrc:(NSString *)behaviorSrc
otherInfo:(NSDictionary * __nullable)otherInfo
{
if ([NSString isNull:roomId] || [NSString isNull:channelId] || [NSString isNull:roundId] || buyNum <= 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
[FUSLoadingView fus_showProgressViewWithMessage:@""];
__weak typeof(self) weakSelf = self;
......@@ -1265,7 +1254,7 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
[FUSLoadingView fus_dismissProgressView];
/// 房間類型變化,請重新進入
if (code == -20124) {
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"房间类型变化,请重新进入"] : msg)];
[FUSDialogView fus_showDialog:msg];
[weakEntryView fus_dismissAnimated:YES];
[FUSLiveHelper fus_quitLiveWithCompletion:nil];
return;
......@@ -1321,6 +1310,48 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
}
}
FUSPayRoomEntryMainViewModel *viewModel = [strongSelf fus_buildPayRoomEntryViewModelWithDataModel:dataModel];
NSInteger previewTime = dataModel.payRoomConfigData.previewTime;
strongSelf.payRoomCompanionPayloadModel = nil;
dispatch_async(dispatch_get_main_queue(), ^{
UIView *rootView = strongSelf.liveVC.view ?: [UIViewController fus_topViewController].view;
NSString *channelId = [dataModel.roomData.channelId description] ?: @"";
NSString *roundId = [dataModel.roomData.roundId description] ?: @"";
[strongSelf.liveVC fus_setupScrollEnable:NO];
strongSelf.liveVC.backgroundImageView.hidden = YES;
[strongSelf.currentFunctionView fus_hideAllFunctionLayers];
strongSelf.liveVC.liveFunctionView.hidden = YES;
__weak typeof(strongSelf) weakStrongSelf = strongSelf;
__block __weak FUSPayRoomEntryMainView *weakEntryView = nil;
FUSPayRoomEntryMainView *entryView = [FUSPayRoomEntryMainView fus_showOnView:rootView viewModel:viewModel actionHandler:^(FUSPayRoomEntryMainViewAction action) {
__strong typeof(weakStrongSelf) strongSelf = weakStrongSelf;
if (!strongSelf) {
return;
}
if (action == FUSPayRoomEntryMainViewActionDismiss) {
[FUSLiveHelper fus_quitLiveWithCompletion:nil];
return;
}
if (action == FUSPayRoomEntryMainViewActionTrial) {
[strongSelf fus_requestPayRoomPreviewWithUid:uid roomId:roomId channelId:channelId roundId:roundId previewSeconds:previewTime entryView:weakEntryView];
return;
}
if (action == FUSPayRoomEntryMainViewActionPrimary) {
[strongSelf fus_requestPayRoomPayViewingWithUid:uid roomId:roomId channelId:channelId roundId:roundId entryView:weakEntryView];
return;
}
}];
weakEntryView = entryView;
});
} failure:^(NSString *msg, NSInteger code) {
}];
}
- (FUSPayRoomEntryMainViewModel *)fus_buildPayRoomEntryViewModelWithDataModel:(FUSPayRoomFrostedGlassDataModel *)dataModel {
FUSPayRoomEntryMainViewModel *viewModel = [[FUSPayRoomEntryMainViewModel alloc] init];
NSString *introduce = [dataModel.roomData.introduce description];
NSString *nick = [dataModel.roomData.nickName description];
......@@ -1348,8 +1379,6 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
BOOL diamondEnough = (dataModel.userData.isDiamondEnough > 0);
viewModel.primaryButtonTitle = (diamondEnough ? [NSString fus_localString:@"进入陪伴"] : [NSString fus_localString:@"马上储值进入陪伴"]);
strongSelf.payRoomCompanionPayloadModel = nil;
viewModel.trialButtonHidden = (previewTime <= 0);
if (previewTime > 0) {
viewModel.trialButtonTitle = [NSString stringWithFormat:[NSString fus_localString:@"试看%ldS"], (long)previewTime];
......@@ -1358,38 +1387,42 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
if (pricePerMinute > 0) {
viewModel.bottomTipText = (canCompanionTime > 0 ? [NSString stringWithFormat:[NSString fus_localString:@"您可陪伴%ld分钟,%ld/分钟"], (long)canCompanionTime, (long)pricePerMinute] : [NSString stringWithFormat:[NSString fus_localString:@"%ld/分钟"], (long)pricePerMinute]);
}
return viewModel;
}
dispatch_async(dispatch_get_main_queue(), ^{
UIView *rootView = strongSelf.liveVC.view ?: [UIViewController fus_topViewController].view;
NSString *channelId = [dataModel.roomData.channelId description] ?: @"";
NSString *roundId = [dataModel.roomData.roundId description] ?: @"";
[strongSelf.liveVC fus_setupScrollEnable:NO];
strongSelf.liveVC.backgroundImageView.hidden = YES;
[strongSelf.currentFunctionView fus_hideAllFunctionLayers];
strongSelf.liveVC.liveFunctionView.hidden = YES;
__weak typeof(strongSelf) weakStrongSelf = strongSelf;
__block __weak FUSPayRoomEntryMainView *weakEntryView = nil;
FUSPayRoomEntryMainView *entryView = [FUSPayRoomEntryMainView fus_showOnView:rootView viewModel:viewModel actionHandler:^(FUSPayRoomEntryMainViewAction action) {
__strong typeof(weakStrongSelf) strongSelf = weakStrongSelf;
if (!strongSelf) {
- (void)fus_refreshPayRoomEntryViewIfNeeded:(FUSPayRoomEntryMainView *)entryView
uid:(NSString *)uid
roomId:(NSString *)roomId {
if (!entryView) {
return;
}
if (action == FUSPayRoomEntryMainViewActionDismiss) {
[FUSLiveHelper fus_quitLiveWithCompletion:nil];
__weak typeof(self) weakSelf = self;
__weak FUSPayRoomEntryMainView *weakEntryView = entryView;
[FUSLiveHttpHelper fus_requestGetPayRoomFrostedGlassDataWithUid:(uid ?: @"") RoomId:(roomId ?: @"") succeed:^(NSDictionary *dataDict) {
__strong typeof(weakSelf) strongSelf = weakSelf;
__strong FUSPayRoomEntryMainView *strongEntryView = weakEntryView;
if (!strongSelf || !strongEntryView) {
return;
}
if (action == FUSPayRoomEntryMainViewActionTrial) {
[strongSelf fus_requestPayRoomPreviewWithUid:uid roomId:roomId channelId:channelId roundId:roundId previewSeconds:previewTime entryView:weakEntryView];
return;
NSDictionary *payload = ([dataDict[@"data"] isKindOfClass:NSDictionary.class] ? dataDict[@"data"] : dataDict);
FUSPayRoomFrostedGlassDataModel *dataModel = [FUSPayRoomFrostedGlassDataModel fus_modelWithDict:(payload ?: @{})];
if (strongSelf.roomInfoModel) {
NSString *newChannelId = [dataModel.roomData.channelId description];
NSString *newRoundId = [dataModel.roomData.roundId description];
if (![NSString isNull:newChannelId]) {
strongSelf.roomInfoModel.channelId = newChannelId;
}
if (action == FUSPayRoomEntryMainViewActionPrimary) {
[strongSelf fus_requestPayRoomPayViewingWithUid:uid roomId:roomId channelId:channelId roundId:roundId entryView:weakEntryView];
if (![NSString isNull:newRoundId]) {
strongSelf.roomInfoModel.roundId = newRoundId;
}
}
FUSPayRoomEntryMainViewModel *viewModel = [strongSelf fus_buildPayRoomEntryViewModelWithDataModel:dataModel];
dispatch_async(dispatch_get_main_queue(), ^{
__strong FUSPayRoomEntryMainView *innerEntryView = weakEntryView;
if (!innerEntryView) {
return;
}
}];
weakEntryView = entryView;
[innerEntryView fus_updateWithViewModel:viewModel];
});
} failure:^(NSString *msg, NSInteger code) {
}];
......@@ -1517,7 +1550,7 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
dispatch_async(dispatch_get_main_queue(), ^{
/// 房間類型變化,請重新進入
if (code == -20124) {
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"房间类型变化,请重新进入"] : msg)];
[FUSDialogView fus_showDialog:msg];
[weakEntryView fus_dismissAnimated:YES];
[FUSLiveHelper fus_quitLiveWithCompletion:nil];
return;
......@@ -1558,7 +1591,7 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
dispatch_async(dispatch_get_main_queue(), ^{
/// 房間類型變化,請重新進入
if (code == -20124) {
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"房间类型变化,请重新进入"] : msg)];
[FUSDialogView fus_showDialog:msg];
[weakEntryView fus_dismissAnimated:YES];
[FUSLiveHelper fus_quitLiveWithCompletion:nil];
return;
......@@ -1574,6 +1607,11 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"宝石不足"] : msg)];
[FUSRechargeViewController fus_showRechargeViewControllerForRootVC:[UIViewController fus_topViewController] from:FUSFromLiveRoom rechargePageFrom:FUSRechargePageFromGEMsLack backHandler:^{
[[FUSLiveHelper shareInstance].currentFunctionView fus_autoShowFirstChargeViewWhenBackFromRechargeIfNeeded];
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
[strongSelf fus_refreshPayRoomEntryViewIfNeeded:weakEntryView uid:uid roomId:roomId];
}];
return;
}
......
......@@ -21,7 +21,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 用户信息
@property (nonatomic, strong) FUSOnlineUserModel *userModel;
/// 0 陪伴中 1试看中
@property (nonatomic, assign) NSInteger listType;
@end
NS_ASSUME_NONNULL_END
......@@ -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 {
_userModel = userModel;
......
......@@ -614,33 +614,10 @@
- (void)ffupdateToolView2TypesPKState:(FUSPKState)pkState {
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) {
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting)/*,@(FFLiveBottomToolTypeRoomScope), @(FFLiveBottomToolTypeNovaBuild)*/]];
[toolTypesList appendObjects:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime)/*,@(FFLiveBottomToolTypeRoomScope), @(FFLiveBottomToolTypeNovaBuild)*/]];
} else {
/// 私享屋:默认不展示限时表演;若当前回合已在限时表演中,则强制补回入口,避免“恢复直播后按钮丢失”
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:@[@(FUSLiveBottomToolTypeLiveSetting),@(FUSLiveBottomToolTypeRoomSetting),@(FUSLiveBottomToolTypeShowTime),@(FUSLiveBottomToolTypePK)/*,@(FUSLiveBottomToolTypeRoomScope), @(FUSLiveBottomToolTypeNovaBuild)*/]];
// [toolTypesList appendObjects:@[@(FFLiveBottomToolTypeLiveSetting),@(FFLiveBottomToolTypeRoomSetting), @(FFLiveBottomToolTypeRoomScope),@(FFLiveBottomToolTypeBeautySticker), @(FFLiveBottomToolTypeNovaBuild)]];
}
......
......@@ -170,10 +170,6 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}
FUSLiveShowTimeTicketActionPopView *strongPopView = weakPopView;
NSInteger buyNum = (strongPopView ? [strongPopView fus_purchaseTicketCountForOption:option] : -1);
if (buyNum <= 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前购票数据未就绪"]];
return;
}
[FUSLoadingView fus_showProgressViewWithMessage:@""];
[FUSLiveHttpHelper fus_ticketShowUserBuyWithRoomId:roomId channelId:channelId roundId:roundId num:buyNum succeed:^(FUSTicketShowUserBuyResultModel * _Nonnull model) {
......@@ -196,7 +192,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}];
return;
}
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"购票失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
};
......@@ -354,7 +350,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
});
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
NSString *toastMsg = ([NSString isNull:msg] ? [NSString fus_localString:@"取消失败"] : msg);
NSString *toastMsg = msg;
[FUSDialogView fus_showDialog:toastMsg];
});
}];
......@@ -375,10 +371,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
NSString *roomId = roomInfoModel.roomId;
NSString *channelId = roomInfoModel.channelId;
NSString *roundId = self.showTimeRoundId;
if ([NSString isNull:roomId] || [NSString isNull:channelId] || [NSString isNull:roundId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前回合信息异常"]];
return;
}
FUSLiveShowTimeTicketContributionPopView *popView = [FUSLiveShowTimeTicketContributionPopView fus_showOnView:containerView];
[popView fus_updateTotalCount:0];
......@@ -399,7 +392,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"获取失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
}
......@@ -508,6 +501,8 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}
if (dataType == 9999) {
dispatch_async(dispatch_get_main_queue(), ^{
FUSLiveHelper.shareInstance.roomInfoModel.collectTicket = 0;
FUSLiveHelper.shareInstance.roomInfoModel.liveScope = 0;
[self fus_destroyShowTimeFrostedIfNeeded];
[self fus_resetShowTimeStateValues];
[self fus_restoreBottomToolButtonsAfterShowTimeIfNeeded];
......@@ -630,18 +625,11 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}
NSString *cancelRoundId = cancelSelf.showTimeRoundId;
if ([NSString isNull:cancelRoundId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前回合信息异常"]];
return;
}
FUSRoomInfoModel *roomInfoModel = FUSLiveHelper.shareInstance.roomInfoModel;
NSString *cancelRoomId = (model.stageData.roomId.length > 0 ? model.stageData.roomId : (model.roomId.length > 0 ? model.roomId : roomInfoModel.roomId));
NSString *cancelChannelId = (model.stageData.channelId.length > 0 ? model.stageData.channelId : (model.channelId.length > 0 ? model.channelId : roomInfoModel.channelId));
if ([NSString isNull:cancelRoomId] || [NSString isNull:cancelChannelId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
[FUSLoadingView fus_showProgressViewWithMessage:@""];
// 取消集票成功后会清掉当前回合与进度缓存,同时重置“待表演触发”状态,避免后续新回合被误判为已触发
......@@ -663,7 +651,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"取消失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
};
......@@ -812,7 +800,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
// 失败也不回滚 showTimeReadyShowStartRequestedRoundId:严格保证“每次集票开启只请求一次”,避免在异常抖动下重复打后端
strongSelf.isRequestingShowTimeReadyShowStart = NO;
NSString *toastMsg = ([NSString isNull:msg] ? [NSString fus_localString:@"进入待表演失败"] : msg);
NSString *toastMsg = msg;
[FUSDialogView fus_showDialog:toastMsg];
});
}];
......@@ -912,7 +900,8 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}
- (void)fus_keyboardWillShow:(NSNotification *)notifi {
if (FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAnchor) {
if (FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAnchor
&& FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAudience) {
return;
}
if (!self.showTimeFrostedView) {
......@@ -925,7 +914,9 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}
-(void)fus_keyboardWillHide:(NSNotification *)notifi{
if (FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor && self.showTimeFrostedView) {
if ((FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAnchor
|| FUSLiveHelper.shareInstance.liveType == FUSLiveTypeAudience)
&& self.showTimeFrostedView) {
NSDictionary *keyBoardInfo = [notifi userInfo];
CGFloat duration = [[keyBoardInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue];
// 键盘收起后恢复默认位置
......@@ -1305,7 +1296,8 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
/// - 正在输入:磨砂条上移到快捷发言上方
/// - 未输入:磨砂条回落到默认底部位置
- (void)fus_updateShowTimeFrostedPositionForChatInputIfNeeded {
if (FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAnchor) {
if (FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAnchor
&& FUSLiveHelper.shareInstance.liveType != FUSLiveTypeAudience) {
return;
}
if (!self.showTimeFrostedView) {
......@@ -1404,17 +1396,11 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
FUSRoomInfoModel *roomInfoModel = FUSLiveHelper.shareInstance.roomInfoModel;
NSString *roomId = roomInfoModel.roomId;
NSString *channelId = roomInfoModel.channelId;
if ([NSString isNull:roomId] || [NSString isNull:channelId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
NSInteger min = config.collectTicketMin.integerValue;
NSInteger max = config.collectTicketMax.integerValue;
if (min <= 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前集票配置异常"]];
return;
}
if (max <= 0) {
max = min;
}
......@@ -1422,11 +1408,6 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
max = min;
}
if (ticketCount < min || ticketCount > max) {
[FUSDialogView fus_showDialog:[NSString stringWithFormat:[NSString fus_localString:@"集票数量需在 %zd~%zd 之间"], (NSInteger)min, (NSInteger)max]];
return;
}
NSString *finalTheme = (themeText.length > 0 ? themeText : [NSString fus_localString:@"限时表演"]);
[FUSLoadingView fus_showProgressViewWithMessage:@""];
[FUSLiveHttpHelper fus_ticketShowCollectTicketToggleWithRoomId:roomId channelId:channelId toggleType:1 roundId:nil ticketTargetNum:ticketCount showTheme:finalTheme succeed:^(FUSTicketShowCollectTicketToggleResultModel * _Nonnull model) {
......@@ -1463,10 +1444,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
return;
}
NSString *cancelRoundId = cancelSelf.showTimeRoundId;
if ([NSString isNull:cancelRoundId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前回合信息异常"]];
return;
}
[FUSLoadingView fus_showProgressViewWithMessage:@""];
[FUSLiveHttpHelper fus_ticketShowCollectTicketToggleWithRoomId:roomId channelId:channelId toggleType:-1 roundId:cancelRoundId ticketTargetNum:0 showTheme:nil succeed:^(FUSTicketShowCollectTicketToggleResultModel * _Nonnull cancelModel) {
dispatch_async(dispatch_get_main_queue(), ^{
......@@ -1486,7 +1464,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"取消失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
};
......@@ -1524,7 +1502,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"开启集票失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
};
......@@ -1534,10 +1512,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
[FUSLiveHttpHelper fus_requestLiveBeforeReadyWithSucceed:^(FUSLiveBeforeReadyModel *model) {
dispatch_async(dispatch_get_main_queue(), ^{
FUSRoomTicketShowConfig *latestConfig = [FUSLiveHelper shareInstance].liveBeforeReadyInfo.ticketShowConfig;
if (latestConfig.collectTicketMin.integerValue <= 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前集票配置异常"]];
return;
}
presentShowTimePopView(latestConfig);
});
} failure:^(NSString * _Nonnull msg, int code) {
......@@ -1564,10 +1539,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
FUSRoomInfoModel *roomInfoModel = FUSLiveHelper.shareInstance.roomInfoModel;
NSString *roomId = roomInfoModel.roomId;
NSString *channelId = roomInfoModel.channelId;
if ([NSString isNull:roomId] || [NSString isNull:channelId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
[FUSLoadingView fus_showProgressViewWithMessage:@""];
[FUSLiveHttpHelper fus_updateLiveThemeTitleWithRoomId:roomId channelId:channelId content:content succeed:^(NSDictionary *dataDict, int code) {
......@@ -1579,7 +1551,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString *msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"设置失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
};
......@@ -1943,17 +1915,11 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
return;
}
NSString *cancelRoundId = cancelSelf.showTimeRoundId;
if ([NSString isNull:cancelRoundId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前回合信息异常"]];
return;
}
FUSRoomInfoModel *currentRoomInfoModel = FUSLiveHelper.shareInstance.roomInfoModel;
NSString *cancelRoomId = [NSString stringWithObject:currentRoomInfoModel.roomId];
NSString *cancelChannelId = [NSString stringWithObject:currentRoomInfoModel.channelId];
if ([NSString isNull:cancelRoomId] || [NSString isNull:cancelChannelId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
[FUSLoadingView fus_showProgressViewWithMessage:@""];
[FUSLiveHttpHelper fus_ticketShowCollectTicketToggleWithRoomId:cancelRoomId channelId:cancelChannelId toggleType:-1 roundId:cancelRoundId ticketTargetNum:0 showTheme:nil succeed:^(FUSTicketShowCollectTicketToggleResultModel * _Nonnull cancelModel) {
dispatch_async(dispatch_get_main_queue(), ^{
......@@ -1975,7 +1941,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"取消失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
};
......@@ -2169,7 +2135,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
NSString *channelId = nil;
NSString *roundId = nil;
if (![self fus_ticketShowResolveIdentifiersWithModel:model roomId:&roomId channelId:&channelId roundId:&roundId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
......@@ -2250,12 +2216,11 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
}
}
}
[FUSDialogView fus_showDialog:[NSString fus_localString:@"已开始表演"]];
});
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"开始表演失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
}
......@@ -2274,7 +2239,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
NSString *channelId = nil;
NSString *roundId = nil;
if (![self fus_ticketShowResolveIdentifiersWithModel:model roomId:&roomId channelId:&channelId roundId:&roundId]) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"当前房间信息异常"]];
return;
}
......@@ -2298,7 +2263,7 @@ static const CGFloat kFUSShowTimeAnchorQuickChatAvoidOffset = 45.0;
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:([NSString isNull:msg] ? [NSString fus_localString:@"取消失败"] : msg)];
[FUSDialogView fus_showDialog:msg];
});
}];
}
......
......@@ -168,7 +168,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
self.topTitleLabel = [[UILabel alloc] init];
self.topTitleLabel.font = [UIFont fus_themeFont:12];
self.topTitleLabel.textColor = [UIColor colorWithWhite:1 alpha:0.85];
self.topTitleLabel.text = [NSString fus_localString:@"我是昵称"];
self.topTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
[self.topTitleLabel setContentCompressionResistancePriority:UILayoutPriorityDefaultLow forAxis:UILayoutConstraintAxisHorizontal];
[self.topTicketInfoContainerView addSubview:self.topTitleLabel];
......@@ -240,13 +239,11 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
self.themeLabel.pauseInterval = 1.5;
self.themeLabel.labelSpacing = 20;
[self.themeLabel observeApplicationNotifications];
self.themeLabel.text = [NSString fus_localString:@"我是表演主题表演主题"];
[self.blurView.contentView addSubview:self.themeLabel];
self.remainingLabel = [[UILabel alloc] init];
self.remainingLabel.font = [UIFont fus_themeFont:12];
self.remainingLabel.textColor = [UIColor colorWithWhite:1 alpha:0.85];
self.remainingLabel.text = [NSString fus_localString:@"还差 49 张!"];
[self.blurView.contentView addSubview:self.remainingLabel];
self.countdownIconView = [[UIImageView alloc] init];
......@@ -815,8 +812,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
self.actionHandler();
return;
}
[FUSDialogView fus_showDialog:[NSString fus_localString:@"功能开发中"]];
return;
}
if (self.cancelHandler) {
[FUSAlertView showAlertWithTitle:nil
......@@ -830,7 +825,6 @@ static const NSInteger kFUSShowTimeCollectSeconds = 60 * 10;
}];
return;
}
[FUSDialogView fus_showDialog:[NSString fus_localString:@"功能开发中"]];
}
/// 根据展示模式调整布局(主播端/用户端差异)
......
......@@ -162,7 +162,6 @@ static const NSInteger kFUSShowTimeTicketMax = 50;
self.tipLabel.textAlignment = NSTextAlignmentCenter;
self.tipLabel.font = [UIFont fus_themeFont:12];
self.tipLabel.textColor = [UIColor colorWithHex:@"#9AA0A6"];
self.tipLabel.text = [NSString fus_localString:@"集得足够票数,可开启限时表演(10分钟)"];
[self.contentView addSubview:self.tipLabel];
CGFloat btnH = 44;
......
......@@ -35,16 +35,14 @@
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundColor = UIColor.whiteColor;
self.tableView.rowHeight = 64;
/// 默认展示空态占位:覆盖未主动调用 fus_updateContributionList: 的页面场景
self.tableView.tableFooterView = self.emptyView;
[self.tableView registerClass:FUSLiveShowTimeTicketContributionCell.class forCellReuseIdentifier:NSStringFromClass(FUSLiveShowTimeTicketContributionCell.class)];
[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 fus_setEmptyViewIcon:UIImage.fus_emptyImg title:[NSString fus_localString:@"空空如也"] buttonTittle:nil];
self.emptyView.imageScale = 0.3;
self.emptyView.contentVerticalOffset = -10;
self.emptyView.backgroundColor = UIColor.clearColor;
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
......@@ -55,9 +53,7 @@
}
- (void)setContributionList:(NSArray<FUSShowRoomUserContributeModel *> *)contributionList {
/// copy 保证外部可变数组传入时不会被后续修改影响 UI 展示
_contributionList = [contributionList copy] ?: @[];
/// 统一空态处理:无数据展示“展位图”,有数据恢复普通 footer
if (_contributionList.count > 0) {
self.tableView.tableFooterView = [[UIView alloc] init];
} else {
......
......@@ -60,7 +60,7 @@ static NSInteger const kFUSLiveShowTimeAudienceEntryNoticeViewTag = 90917003;
self.titleLabel.font = [UIFont fus_themeMediumFont:17];
self.titleLabel.textColor = [UIColor colorWithHex:@"#2A2A2A"];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = [NSString fus_localString:@"活動須知"];
self.titleLabel.text = [NSString fus_localString:@"活动须知"];
[self.cardView addSubview:self.titleLabel];
self.contentLabel = [[UILabel alloc] initWithFrame:CGRectZero];
......
......@@ -93,6 +93,15 @@ if (@available(iOS 11.0, *)) {height = height + UIView.fus_SafeBottom;}\
*/
- (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:
/// - pageType: FUSLiveGiftPageType类型背包某一个面板,none为自动根据gid选择
......
......@@ -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{
for (NSInteger j = 0; j < model.giftDataArr.count; j++) {
......
......@@ -3721,7 +3721,7 @@ BDAlphaPlayerMetalViewDelegate
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];
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
UILabel *nicknameLabel = self.nicknameLabels[i];
NSString *nickname = model.userNickname ?: @"";
nicknameLabel.text = fus_substringComposedToLength(nickname, 4);
nicknameLabel.text = nickname;
CBAutoScrollLabel *taskLabel = self.taskLabels[i];
NSString *task = model.name ?: @"";
......@@ -206,11 +206,9 @@ static NSString *fus_substringComposedToLength(NSString *text, NSUInteger maxLen
CGFloat avatarSize = 18;
CGFloat avatarX = padding;
CGFloat avatarRight = avatarX + avatarSize + 4;
CGFloat nicknameW = 30;
CGFloat nicknameX = avatarRight;
CGFloat textX = nicknameX;
CGFloat textX = avatarRight;
CGFloat buttonX = CGRectGetWidth(self.bounds) - padding - buttonSize;
CGFloat textW = buttonX - textX - 6;
CGFloat textW = buttonX - textX - 2;
CGFloat lineGap = 1;
CGFloat rowGap = 6;
if (textW < 0) {
......
......@@ -61,6 +61,9 @@
@implementation FUSPayRoomCompanionPopView
static CGFloat const kFUSPayRoomCompanionNormalHeight = 108.0;
static CGFloat const kFUSPayRoomCompanionRechargeDefaultHeight = 160.0;
+ (FUSPayRoomCompanionPopView *)fus_showWithRootView:(UIView *)rootView
payRoomData:(FUSPayRoomFrostedGlassDataModel *)payRoomData
{
......@@ -79,7 +82,7 @@
}
CGFloat viewW = 120;
CGFloat viewH = (displayCompanionData.isEnough == 0 ? 160 : 123);
CGFloat viewH = (displayCompanionData.isEnough == 0 ? kFUSPayRoomCompanionRechargeDefaultHeight : kFUSPayRoomCompanionNormalHeight);
CGFloat viewX = 10;
CGFloat viewY = UIView.fus_SafeTop + 205;
FUSPayRoomCompanionPopView *popView = [[FUSPayRoomCompanionPopView alloc] initWithFrame:CGRectMake(viewX, viewY, viewW, viewH)];
......@@ -94,7 +97,7 @@
if (self) {
self.backgroundColor = UIColor.clearColor;
self.clipsToBounds = NO;
self.normalHeight = 123;
self.normalHeight = kFUSPayRoomCompanionNormalHeight;
CGFloat arrowW = 14;
self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width - arrowW, self.height)];
......@@ -194,6 +197,7 @@
self.rechargeBtn.hidden = YES;
[self.contentView addSubview:self.rechargeBtn];
self.normalHeight = ceil(CGRectGetMaxY(self.priceLabel.frame) + contentPadding);
CGFloat requiredHeight = CGRectGetMaxY(self.rechargeBtn.frame) + contentPadding;
self.rechargeHeight = MAX(self.normalHeight, requiredHeight);
if (self.height < self.rechargeHeight) {
......
......@@ -127,7 +127,7 @@
NSString *primaryTitle = ([NSString isNull:viewModel.primaryButtonTitle] ? [NSString fus_localString:@"进入陪伴"] : viewModel.primaryButtonTitle);
[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 fus_updateBottomTipWithText:viewModel.bottomTipText];
......
......@@ -11,6 +11,7 @@
@property (nonatomic, strong) NSMutableArray<FUSOnlineUserModel *> *userList;
@property (nonatomic, strong) NSMutableSet<NSString *> *userIdSet;
@property (nonatomic, assign) NSInteger page;
/// 0 陪伴中 1试看中
@property (nonatomic, assign) NSInteger listType;
@end
......@@ -183,6 +184,7 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
FUSAudienceTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[FUSAudienceTableViewCell cellIdentifer] forIndexPath:indexPath];
cell.userModel = self.userList[indexPath.row];
cell.listType = self.listType;
return cell;
}
......
......@@ -59,7 +59,7 @@
[self.bgBtn addTarget:self action:@selector(fus_dismissView) forControlEvents:UIControlEventTouchUpInside];
[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 addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(16, 16)];
[self addSubview:self.contentView];
......
......@@ -243,7 +243,20 @@
- (void)fus_clickStatsAction:(UIButton *)sender forEvent:(UIEvent *)event {
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 {
......
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