Commit 35d5628c by pierce

气的贡献页面

parent 8a3815a4
Showing with 510 additions and 46 deletions
......@@ -2789,3 +2789,5 @@
"群发私信" = "群發私信";
"团战周排名" = "團戰週排名";
"の贡献" = "の貢獻";
......@@ -892,6 +892,9 @@ typedef id<FUSVideoPlayerProtocal> FUSStreamPlayer;
设置视频帧回调开关
*/
- (void)fus_setVideoframeCallBackOpen:(BOOL)open forUid:(NSString *)uid {
if ([NSString isNullWithString:uid]) {
return;
}
if (open) {
[_videoFrameCallBackIdSet addObject:uid];
} else {
......
......@@ -842,6 +842,12 @@
BEEAB26E2D34CC60008CD059 /* FUSLiveStartBeautyFavoritesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB2562D34CC60008CD059 /* FUSLiveStartBeautyFavoritesView.swift */; };
BEEAB26F2D34CC60008CD059 /* FUSLiveStartContentThemeEditView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB25F2D34CC60008CD059 /* FUSLiveStartContentThemeEditView.swift */; };
BEEAB2702D34CC60008CD059 /* FUSLiveStartBeautySetItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB2572D34CC60008CD059 /* FUSLiveStartBeautySetItemView.swift */; };
BEEAB2772D34FAF8008CD059 /* FUSShowRoomUserContributionListView.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEAB2752D34FAF8008CD059 /* FUSShowRoomUserContributionListView.h */; };
BEEAB2782D34FAF8008CD059 /* FUSShowRoomUserContributeCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEAB2722D34FAF8008CD059 /* FUSShowRoomUserContributeCell.h */; };
BEEAB2792D34FAF8008CD059 /* FUSShowRoomUserContributeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB2732D34FAF8008CD059 /* FUSShowRoomUserContributeCell.m */; };
BEEAB27A2D34FAF8008CD059 /* FUSShowRoomUserContributionListView.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB2762D34FAF8008CD059 /* FUSShowRoomUserContributionListView.m */; };
BEEAB27E2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEAB27C2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.h */; };
BEEAB27F2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB27D2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.m */; };
BEF675F12C6B156500A670FB /* 1_First_Kill_Animation_1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BEF673B22C6B156500A670FB /* 1_First_Kill_Animation_1@3x.png */; };
BEF675F22C6B156500A670FB /* 1_First_Kill_Animation_2@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BEF673B32C6B156500A670FB /* 1_First_Kill_Animation_2@3x.png */; };
BEF675F32C6B156500A670FB /* 1_First_Kill_Animation_3@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BEF673B42C6B156500A670FB /* 1_First_Kill_Animation_3@3x.png */; };
......@@ -2239,6 +2245,12 @@
BEEAB2602D34CC60008CD059 /* FUSLiveStartContentWarningView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveStartContentWarningView.swift; sourceTree = "<group>"; };
BEEAB2612D34CC60008CD059 /* FUSLiveStartSetPrivacyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveStartSetPrivacyView.swift; sourceTree = "<group>"; };
BEEAB2622D34CC60008CD059 /* FUSLiveStartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveStartView.swift; sourceTree = "<group>"; };
BEEAB2722D34FAF8008CD059 /* FUSShowRoomUserContributeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSShowRoomUserContributeCell.h; sourceTree = "<group>"; };
BEEAB2732D34FAF8008CD059 /* FUSShowRoomUserContributeCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSShowRoomUserContributeCell.m; sourceTree = "<group>"; };
BEEAB2752D34FAF8008CD059 /* FUSShowRoomUserContributionListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSShowRoomUserContributionListView.h; sourceTree = "<group>"; };
BEEAB2762D34FAF8008CD059 /* FUSShowRoomUserContributionListView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSShowRoomUserContributionListView.m; sourceTree = "<group>"; };
BEEAB27C2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSShowRoomUserContributeModel.h; sourceTree = "<group>"; };
BEEAB27D2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSShowRoomUserContributeModel.m; sourceTree = "<group>"; };
BEF673B22C6B156500A670FB /* 1_First_Kill_Animation_1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_First_Kill_Animation_1@3x.png"; sourceTree = "<group>"; };
BEF673B32C6B156500A670FB /* 1_First_Kill_Animation_2@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_First_Kill_Animation_2@3x.png"; sourceTree = "<group>"; };
BEF673B42C6B156500A670FB /* 1_First_Kill_Animation_3@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_First_Kill_Animation_3@3x.png"; sourceTree = "<group>"; };
......@@ -4184,6 +4196,7 @@
BED657A62C5B745D00668116 /* FunctionView */ = {
isa = PBXGroup;
children = (
BEEAB2712D34F8DF008CD059 /* PopularListView */,
BEEAB2502D337F87008CD059 /* AnchorReward */,
BEB504712D2E8FD100EA6E6F /* LiveThemeView */,
BED655C12C5B745D00668116 /* Activity */,
......@@ -4617,6 +4630,19 @@
path = AnchorReward;
sourceTree = "<group>";
};
BEEAB2712D34F8DF008CD059 /* PopularListView */ = {
isa = PBXGroup;
children = (
BEEAB2722D34FAF8008CD059 /* FUSShowRoomUserContributeCell.h */,
BEEAB2732D34FAF8008CD059 /* FUSShowRoomUserContributeCell.m */,
BEEAB2752D34FAF8008CD059 /* FUSShowRoomUserContributionListView.h */,
BEEAB2762D34FAF8008CD059 /* FUSShowRoomUserContributionListView.m */,
BEEAB27C2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.h */,
BEEAB27D2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.m */,
);
path = PopularListView;
sourceTree = "<group>";
};
BEF673CD2C6B156500A670FB /* 1_First_Kill_Animation */ = {
isa = PBXGroup;
children = (
......@@ -5612,6 +5638,7 @@
BED659FA2C5B745F00668116 /* FUSPKMainSendGiftListView.h in Headers */,
BE189E152C733B460008418B /* FSREnterdictActiveMotorEffectView.h in Headers */,
00A51A5F2CAA5AA700B26212 /* FUSRoomQuickChatListModel.h in Headers */,
BEEAB27E2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.h in Headers */,
BED659C12C5B745F00668116 /* FUSEmitterViewCell.h in Headers */,
BE189DAB2C733B450008418B /* FSRMotorEffectSettingBackpackModel.h in Headers */,
BED659AE2C5B745F00668116 /* FUSLiveGameListView.h in Headers */,
......@@ -5644,6 +5671,8 @@
BED65A6C2C5B745F00668116 /* FUSRoomGuideFoucsAndCardView.h in Headers */,
BED658EA2C5B745E00668116 /* FUSLiveBeautyParameterView.h in Headers */,
BED658CB2C5B745E00668116 /* FUSContributeModel.h in Headers */,
BEEAB2772D34FAF8008CD059 /* FUSShowRoomUserContributionListView.h in Headers */,
BEEAB2782D34FAF8008CD059 /* FUSShowRoomUserContributeCell.h in Headers */,
BED658C22C5B745E00668116 /* FUSProgressActivityView.h in Headers */,
BED6588E2C5B745E00668116 /* FUSStreamModel.h in Headers */,
BED658862C5B745E00668116 /* FUSLiveStreamModel.h in Headers */,
......@@ -6740,6 +6769,8 @@
00B28CA92D2FBFEC0008476B /* FUSVideoEndNewViewNewFansCell.swift in Sources */,
00B28CAA2D2FBFEC0008476B /* FUSVideoEndRankTipsView.swift in Sources */,
00B28CAB2D2FBFEC0008476B /* FUSVideoEndV2View.swift in Sources */,
BEEAB2792D34FAF8008CD059 /* FUSShowRoomUserContributeCell.m in Sources */,
BEEAB27A2D34FAF8008CD059 /* FUSShowRoomUserContributionListView.m in Sources */,
00B28CAC2D2FBFEC0008476B /* FUSVideoEndLiveScoreSheetView.swift in Sources */,
00B28CAD2D2FBFEC0008476B /* FUSVideoEndViewHeaderView.swift in Sources */,
00B28CAE2D2FBFEC0008476B /* FUSVideoEndNewViewNewFansClubCell.swift in Sources */,
......@@ -6912,6 +6943,7 @@
BED65A062C5B745F00668116 /* FUSPKAnchorTypeSelectView.m in Sources */,
BED659F92C5B745F00668116 /* FUSPKMainResultView.m in Sources */,
00B28C9C2D2FBF3E0008476B /* FUSLiveEndModel.m in Sources */,
BEEAB27F2D34FC4D008CD059 /* FUSShowRoomUserContributeModel.m in Sources */,
BED658D52C5B745E00668116 /* FUSLiveContributeSegmentView.m in Sources */,
BED65A1B2C5B745F00668116 /* FUSPkWinningStreakView.swift in Sources */,
BED6586A2C5B745E00668116 /* FUSZhaixinRecommendedViewController.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_contribute_icon_score@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_contribute_icon_score@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_contribute_icon_title@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_contribute_icon_title@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -456,7 +456,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
//
// [weakSelf ffshowLiveLoadingViewWithType:liveLoadingDismiss];
// [BFModule(StatisticService) logEventWithReqtype:FFUserBehaviorEvent.broadcaststop];
// [FFAlertView showAlertWithTitle:nil message:[NSString localString:@"发生错误,请重新开播"] cancelButtonTitle:[NSString localString:@"重新开播"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {
// [FFAlertView showAlertWithTitle:nil message:[NSString fus_localString:@"发生错误,请重新开播"] cancelButtonTitle:[NSString fus_localString:@"重新开播"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {
// [weakSelf initPushPrepareView];
// [weakSelf.liveFunctionView removeFromSuperview];
// }];
......
......@@ -961,6 +961,18 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)fus_getLiveBeforeInfosWithSucceed:(void (^)(NSDictionary *publicizeConfig, NSDictionary *gasStationConfig))succeed
failure:(void (^)(NSString *, int))failure;
///获取人气值贡献用户列表
/// @param roomId 房间id
/// @param channelId 直播场次ID
/// @param page 页码
/// @param succeed 成功回调
/// @param failure 失败回调
+ (void)fus_requestLiveContributeList:(NSString *)roomId
channelId:(NSString *)channelId
page:(NSInteger)page
succeed:(void (^)(NSDictionary *dataDict, int code))succeed
failure:(void (^)(NSString *, NSInteger))failure;
@end
NS_ASSUME_NONNULL_END
......@@ -2641,4 +2641,30 @@
}];
}
///获取人气值贡献用户列表
/// @param roomId 房间id
/// @param channelId 直播场次ID
/// @param page 页码
/// @param succeed 成功回调
/// @param failure 失败回调
+ (void)fus_requestLiveContributeList:(NSString *)roomId
channelId:(NSString *)channelId
page:(NSInteger)page
succeed:(void (^)(NSDictionary *dataDict, int code))succeed
failure:(void (^)(NSString *, NSInteger))failure {
if ([NSString isNull:roomId]
|| [NSString isNull:channelId]) {
return;
}
NSDictionary *params = @{@"roomId":roomId,@"channelId":channelId,@"page":@(page)};
[FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_Live_Popularity_Contribute_List params:params success:succeed failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) failure(dataDict[@"msg"],code);
}];
}
@end
......@@ -72,7 +72,7 @@ import UIKit
// let levelmodel = Mediator.DataCenter?.levelModel(level)
// self.vipLevelImageView.setWebImage(levelmodel?.icon)
// self.userNameLabel.textColor = UIColor.hexColor(levelmodel?.color ?? "FFFFFF")
// self.userHeaderImageView.ya_setupIcon(withFacePath: self.cellModel?.face ?? "", level:level)
// self.userHeaderImageView.fus_setupIcon(withFacePath: self.cellModel?.face ?? "", level:level)
//
// } else {
self.userHeaderImageView.fus_setupIcon(withFacePath: self.cellModel?.face ?? "", level:0)
......
......@@ -54,7 +54,7 @@ import UIKit
// let levelmodel = Mediator.DataCenter?.levelModel(level)
// self.vipLevelImageView.setWebImage(levelmodel?.icon)
// self.userNameLabel.textColor = UIColor.hexColor(levelmodel?.color ?? "FFFFFF")
// self.userHeaderImageView.ya_setupIcon(withFacePath: self.cellModel?.face ?? "", level:level)
// self.userHeaderImageView.fus_setupIcon(withFacePath: self.cellModel?.face ?? "", level:level)
//
// } else {
hideVipView()
......
......@@ -67,7 +67,7 @@ import UIKit
self.userNameLabel.text = self.cellModel?.nickname
// if let fansLevelImageView = self.fansLevelImageView as? FFLiveChatFansGroupNameViewType{
// fansLevelImageView.ya_setup(withGroupName: groupName, level: self.cellModel?.grade ?? 0, type: self.cellModel?.groupValue.styleType ?? 0, superGroup: false)
// fansLevelImageView.fus_setup(withGroupName: groupName, level: self.cellModel?.grade ?? 0, type: self.cellModel?.groupValue.styleType ?? 0, superGroup: false)
// }
let totalDay = "\(model.dau)"
......
......@@ -66,7 +66,7 @@ import UIKit
[.liveScore]]
}
// bgImageView.image = LiveRoomBundle.imageNamed("live_endView_bg")
// bgImageView.image = FUSShowRoomCenterBunble.imageNamed("live_endView_bg")
bgImageView.setWebImageWithSubURLString(FUSSwiftCacheDataShare.share.userInfo.value?.face)
self.addSubview(bgImageView)
bgImageView.snp.makeConstraints { make in
......
......@@ -175,7 +175,7 @@ import UIKit
self.backgroundImageView.contentMode = .scaleAspectFill
self.backgroundImageView.isUserInteractionEnabled = true
// self.backgroundImageView.image = LiveRoomBundle.imageNamed("live_endView_fireFlyBg")
// self.backgroundImageView.image = FUSShowRoomCenterBunble.imageNamed("live_endView_fireFlyBg")
self.backgroundImageView.backgroundColor = .white.withAlphaComponent(0.13)
self.backgroundImageView.layer.cornerRadius = 9
self.backgroundImageView.layer.masksToBounds = true
......
......@@ -63,6 +63,7 @@
#import "FUSWKWebView.h"
#import "SLActionSheet.h"
#import "FUSLiveTimeRecordView.h"
#import "FUSShowRoomUserContributionListView.h"
#import "FUSLiveTreasureBoxListIconView.h"
#import "FUSLiveTreasureBoxGrabView.h"
......@@ -144,7 +145,7 @@ UIGestureRecognizerDelegate
/**
热力值榜单弹出视图
*/
@property (nonatomic, strong) FUSPopularListView *popularPopView;
@property (nonatomic, weak) FUSShowRoomUserContributionListView *contributionListView;
/**
活动 View
......@@ -1914,7 +1915,7 @@ UIGestureRecognizerDelegate
}
[weakSelf.userInfoView fus_dismissUserInfoViewWithAnimate:YES];
[weakSelf.popularPopView fus_dismissViewAnimation:YES];
[weakSelf.contributionListView fus_hideViewWithAnim];
[weakSelf.bottomToolView fus_dismissMessageBoxView];
[weakSelf.halfWebManager fus_removeAllWebView];
......@@ -2191,8 +2192,6 @@ UIGestureRecognizerDelegate
[self.userListViewModel recieveSomeoneEnterRoomWithSocketModel:messageModel messageDict:dict];
self.popularPopView.roomModel = [FUSLiveHelper shareInstance].roomInfoModel;
// LJ代码,FSR前缀的VC逻辑都不用管
if ([dict[@"FsrEffectRecommond"] boolValue]) {
FSRShowRoomEffectRecommondViewController *vc = [FSRShowRoomEffectRecommondViewController fsr_createVC];
......@@ -2228,8 +2227,6 @@ UIGestureRecognizerDelegate
[FUSLiveHelper shareInstance].liveRoomType == FUSRoomTypeLinkMic) {
[_headView fus_headViewAnchorOffline:YES];
}
self.popularPopView.roomModel = [FUSLiveHelper shareInstance].roomInfoModel;
}
/**
......@@ -5021,7 +5018,7 @@ UIGestureRecognizerDelegate
[[FUSLiveGiftView shareGiftView] fus_dismissWithAnimate:NO needUpload:NO];
// [[FUSLiveGiftView shareGiftView] fus_resetGiftView]; //放到setup functionview上面
[_popularPopView fus_dismissViewAnimation:NO];
[self.contributionListView fus_hideViewWithAnim];
[self.activityView fus_cleanActivityView];
[self.activityView fus_updateActivityViewHeight:0];
......@@ -6168,44 +6165,15 @@ UIGestureRecognizerDelegate
{
if (FUSConfig.sharedInstanced.devConfigs.appStatus) return;
__weak typeof(self) weakSelf = self;
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_ROOM_HOTRANK label:nil parameters:nil];
// 避免重复显示
if (_popularPopView.isOnShow == YES) return;
_popularPopView = [[FUSPopularListView alloc] initWithFrame:UIView.fus_screenFrame];
// 为弹出框的控件赋值
_popularPopView.roomModel = [[FUSLiveHelper shareInstance] roomInfoModel];
// 点击用户跳转到对应空间
_popularPopView.userClickBlock = ^(NSString *uid){
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) return;
[FUSRouter.userRouter fus_enterUserZone:uid];
};
// 点击自己弹出资料卡
_popularPopView.selfClickBlock = ^{
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeAnchor) return;
FUSRoomUserInfoModel *userInfoModel = [[FUSRoomUserInfoModel alloc] init];
[userInfoModel fus_setValueWithModel:[FUSLiveHelper shareInstance].roomInfoModel];
// [weakSelf.userInfoView fus_showWithUID:[FUSLiveHelper shareInstance].roomInfoModel.owner withModel:userInfoModel];
[weakSelf.userInfoView fus_showUserInfoViewWithUserInfoViewType:FUSUserInfoViewTypeLive userInfoModel:userInfoModel shouldRequestData:YES];
};
// 点击榜单说明
_popularPopView.boardDescriptionClickBlock = ^{
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_ROOM_HOT_RANK_EXPLAINATION];
FUSWKWebViewController *boardDescriptionVc = [[FUSWKWebViewController alloc]init];
NSString *lang = FUSLocalizationHelper.fus_currentLanguage.languageID;
NSString *explaintionUrlString = [NSString stringWithFormat:@"%@?lang=%@",FUSShowRoomWebURLs.fus_BOARD_README_HEATING_POWER,lang];
boardDescriptionVc.webUrlString = explaintionUrlString;
[[weakSelf getViewController].navigationController pushViewController:boardDescriptionVc animated:YES];
};
// 实现 dismiss 回调
[_popularPopView setDismissHandler:^{
if (self.contributionListView) return;
self.contributionListView = [FUSShowRoomUserContributionListView fus_showContributionListView];
[self.contributionListView setHandleDismissViewAction:^{
[[FUSLiveHelper shareInstance] fus_setupScrollToSwitchRoomEnable:YES];
}];
[[FUSLiveHelper shareInstance] fus_setupScrollToSwitchRoomEnable:NO];
[_popularPopView fus_showViewWithSuperView:[self fus_viewWithLayer:FUSLiveFunctionLayerManualPopView]];
}
- (void)fus_headViewLikeSucceed {
......
......@@ -196,7 +196,7 @@
[[FUSLiveHelper shareInstance].currentFunctionView fus_dismissPKStyleViewAnimated:YES];
// 改变按钮状态
[[FUSLiveHelper shareInstance].currentFunctionView fus_changeLivePKBtnState:FUSLivePKBtnStateStartPK];
// 取消PKya_cancelPKWithType
// 取消PKfus_cancelPKWithType
if (self.PKBtnStateModel.curType.integerValue == 3) {
[FUSTalkingData fus_trackEvent:FUSLiveEventTrackParams.fus_EVENT_LIVEROOM_PK_CANCEL_PK label:@"" parameters:@{@"type":@"randommatch"}];
[[FUSLiveHelper shareInstance].currentFunctionView fus_stopPKMatchingTimer];
......
//
// FUSShowRoomUserContributeCell.h
// LiveRoom
//
// Created by pierce on 2024/10/9.
//
#import <UIKit/UIKit.h>
#import "FUSShowRoomUserContributeModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSShowRoomUserContributeCell : UITableViewCell
/**
cell 的reuse id
*/
+ (NSString *)cellIdentifer;
- (void)ff_setupModel:(FUSShowRoomUserContributeModel *)model;
@end
NS_ASSUME_NONNULL_END
//
// FUSShowRoomUserContributeModel.h
// FUSShowRoomModule
//
// Created by pierce on 2025/1/13.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSShowRoomUserContributeModel : FUSBaseModel
/// 用户ID
@property (nonatomic, copy) NSString *uid;
/// 真实用户ID
@property (nonatomic, copy) NSString *realUid;
/// 用户昵称
@property (nonatomic, copy) NSString *nickname;
/// 头像
@property (nonatomic, copy) NSString *face;
/// 在线等级
@property (nonatomic, assign) NSInteger lev;
/// 富豪等级
@property (nonatomic, assign) NSInteger level;
/// 真实富豪等级
@property (nonatomic, assign) NSInteger realLevel;
/// 富豪权限
@property (nonatomic, copy) NSDictionary *privilege;
/// 数据类型(1:rich、2:VIP、3:使者)
@property (nonatomic, assign) NSInteger type;
/// rich排名
@property (nonatomic, assign) NSInteger richRank;
/// 性别
@property (nonatomic ,assign) NSInteger sex;
/// 性别
@property (nonatomic ,assign) NSInteger age;
/// 座驾信息
/// mid number 座驾ID
/// icon String 座驾ICON
@property (nonatomic, copy) NSDictionary *vehicle;
/// 是否隐身
@property (nonatomic, assign) NSInteger inHide;
/// 是否付费
@property (nonatomic, assign) NSInteger inPay;
//是否是新人
@property (nonatomic, assign) NSInteger isnew;
/// 是否新人
@property (nonatomic, assign) NSInteger inNew;
/// 贡献值
@property (nonatomic, assign) NSInteger total;
@end
NS_ASSUME_NONNULL_END
//
// FUSShowRoomUserContributeModel.m
// FUSShowRoomModule
//
// Created by pierce on 2025/1/13.
//
#import "FUSShowRoomUserContributeModel.h"
@implementation FUSShowRoomUserContributeModel
@end
//
// FUSShowRoomUserContributionListView.h
// LiveRoom
//
// Created by pierce on 2024/10/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSShowRoomUserContributionListView : UIView
@property (nonatomic, copy) void(^handleDismissViewAction)(void);
+ (FUSShowRoomUserContributionListView *)fus_showContributionListView;
- (void)fus_hideViewWithAnim;
@end
NS_ASSUME_NONNULL_END
//
// FUSShowRoomUserContributionListView.m
// LiveRoom
//
// Created by pierce on 2024/10/10.
//
#import "FUSShowRoomUserContributionListView.h"
#import "FUSShowRoomUserContributeCell.h"
#import <FUSCommon/FUSCommon.h>
#import "FUSLiveHttpHelper.h"
@interface FUSShowRoomUserContributionListView () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UIButton *bgTabBtn;
@property (nonatomic, strong) UIView *contentView;
@property (nonatomic, strong) UIButton *titleBtn;
@property (nonatomic, strong) UIButton *closeBtn;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray<FUSShowRoomUserContributeModel *> *dataList;
@property (nonatomic, strong) NSMutableDictionary<NSString *, FUSShowRoomUserContributeModel *> *userDict;
@property (nonatomic, assign) NSInteger page;
@property (nonatomic, strong) FUSEmptyView *emptyView;
@end
@implementation FUSShowRoomUserContributionListView
+ (FUSShowRoomUserContributionListView *)fus_showContributionListView {
UIView *rootView = [FUSLiveHelper.shareInstance.currentFunctionView fus_viewWithLayer:FUSLiveFunctionLayerManualPopView];
FUSShowRoomUserContributionListView *view = [[FUSShowRoomUserContributionListView alloc] initWithFrame:rootView.bounds];
[rootView addSubview:view];
[view fus_showViewWithAnim];
return view;
}
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
_dataList = [NSMutableArray array];
_userDict = [NSMutableDictionary dictionary];
self.bgTabBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.bgTabBtn.frame = self.bounds;
[self.bgTabBtn addTarget:self action:@selector(fus_hideViewWithAnim) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:self.bgTabBtn];
self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, self.height, self.width, 614)];
[self.contentView addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(15, 15)];
self.contentView.backgroundColor = UIColor.fus_appBGColor;
[self addSubview:self.contentView];
self.closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.closeBtn.frame = CGRectMake(self.width - 44, 0, 44, 50);
[self.closeBtn setImage:[FUSShowRoomCenterBunble imageNamed:@"share_icon_close"] forState:UIControlStateNormal];
[self.closeBtn addTarget:self action:@selector(fus_hideViewWithAnim) forControlEvents:UIControlEventTouchUpInside];
[self.contentView addSubview:self.closeBtn];
self.titleBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[self.titleBtn setImage:[FUSShowRoomCenterBunble imageNamed:@"live_contribute_icon_title"] forState:UIControlStateNormal];
[self.titleBtn setTitle:[NSString fus_localString:@"の贡献"] forState:UIControlStateNormal];
[self.titleBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal];
self.titleBtn.titleLabel.font = [UIFont fus_themeBoldFont:16];
self.titleBtn.userInteractionEnabled = NO;
[self.titleBtn sizeToFit];
self.titleBtn.x = 20;
self.titleBtn.centerY = self.closeBtn.centerY;
[self.contentView addSubview:self.titleBtn];
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 4)];
lineView.backgroundColor = UIColor.fus_textColorRich;
lineView.layer.cornerRadius = 2;
lineView.layer.masksToBounds = YES;
lineView.centerX = self.titleBtn.centerX;
lineView.y = self.titleBtn.bottom;
[self.contentView addSubview:lineView];
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.closeBtn.bottom, self.width, self.height - self.closeBtn.bottom) style:UITableViewStylePlain];
_tableView.backgroundColor = [UIColor clearColor];
_tableView.delegate = self;
_tableView.dataSource = self;
[_tableView registerClass:[FUSShowRoomUserContributeCell class] forCellReuseIdentifier:[FUSShowRoomUserContributeCell cellIdentifer]];
_tableView.backgroundColor = [UIColor clearColor];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.tableFooterView = [[UIView alloc] init];
_tableView.rowHeight = 50;
if (@available(iOS 11.0, *)) {
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
_tableView.estimatedRowHeight = 0;
_tableView.estimatedSectionHeaderHeight = 0;
_tableView.estimatedSectionFooterHeight = 0;
}
if (@available(iOS 13.0, *)) {
_tableView.automaticallyAdjustsScrollIndicatorInsets = NO;
}
if (@available(iOS 15.0, *)) {
_tableView.sectionHeaderTopPadding = 0;
}
[self ff_reloadData];
[self.contentView addSubview:self.tableView];
self.page = 1;
__weak typeof(self) weakSelf = self;
_tableView.mj_header = [FUSRefreshHeader headerWithRefreshingBlock:^{
[weakSelf ff_reloadData];
}];
_tableView.mj_footer = [FUSRefreshAutoFooter footerWithRefreshingBlock:^{
[weakSelf ff_reloadUserList];
}];
}
return self;
}
- (void)fus_showViewWithAnim {
[UIView animateWithDuration:0.3 animations:^{
self.contentView.y = self.height - self.contentView.height;
}];
}
- (void)fus_hideViewWithAnim {
[UIView animateWithDuration:0.3 animations:^{
self.contentView.y = self.height;
} completion:^(BOOL finished) {
if (self.handleDismissViewAction) {
self.handleDismissViewAction();
}
[self removeFromSuperview];
}];
}
- (FUSEmptyView *)emptyView{
if (!_emptyView) {
_emptyView = [[FUSEmptyView alloc] initWithFrame:CGRectMake(20, 0, self.width, self.tableView.height)];
_emptyView.backgroundColor = [UIColor clearColor];
[_emptyView fus_setEmptyViewIcon:UIImage.fus_emptyImg title:[NSString fus_localString:@"空空如也"] buttonTittle:nil];
}
return _emptyView;
}
- (void)ff_preloadUserListIfNeeded {
if (self.dataList.count == 0) {
[self ff_reloadData];
}
}
- (void)ff_reloadData {
self.page = 1;
[self ff_reloadUserList];
}
- (void)ff_reloadUserList {
[FUSLiveHttpHelper fus_requestLiveContributeList:FUSLiveHelper.shareInstance.roomInfoModel.roomId channelId:FUSLiveHelper.shareInstance.roomInfoModel.channelId page:self.page succeed:^(NSDictionary * _Nonnull dataDict, int code) {
NSArray *dataList = dataDict[@"dataList"];
NSInteger allTotal = [dataDict[@"allTotal"] integerValue];
NSInteger page = [dataDict[@"page"] integerValue];
NSInteger pageSize = [dataDict[@"pageSize"] integerValue];
if (page == 1) {
[self.dataList removeAllObjects];
[self.userDict removeAllObjects];
}
for (NSDictionary *item in dataList) {
FUSShowRoomUserContributeModel *model = [FUSShowRoomUserContributeModel fus_modelWithDict:item];
if (self.userDict[model.uid] == nil) {
[self.dataList addObject:model];
[self.userDict setValue:model forKey:model.uid];
}
}
if (self.dataList.count == 0) {
self.tableView.tableHeaderView = self.emptyView;
} else {
self.tableView.tableHeaderView = nil;
}
[self.tableView.mj_header endRefreshing];
[self.tableView.mj_footer endRefreshing];
self.page += 1;
[self.tableView reloadData];
} failure:^(NSString * _Nonnull msg, NSInteger code) {
[self.tableView.mj_header endRefreshing];
[self.tableView.mj_footer endRefreshing];
[FUSDialogView fus_showDialog:msg];
}];
}
#pragma mark - UITableViewDelegate, UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataList.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
FUSShowRoomUserContributeCell *cell = [tableView dequeueReusableCellWithIdentifier:[FUSShowRoomUserContributeCell cellIdentifer] forIndexPath:indexPath];
FUSShowRoomUserContributeModel *model = nil;
model = self.dataList[indexPath.row];
[cell ff_setupModel:model];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
FUSRoomUserInfoModel *model = [[FUSRoomUserInfoModel alloc] init];
FUSShowRoomUserContributeModel *userModel = nil;
userModel = self.dataList[indexPath.row];
[model fus_setValueWithDict:userModel.fus_getDictionary];
model.uid = userModel.uid;
model.isHide = [NSString stringWithFormat:@"%ld",userModel.inHide];
//TODO:跳转: added By Pidan
[self fus_hideViewWithAnim];
}
@end
......@@ -315,6 +315,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 开播前或恢复直播调用
+ (NSString *)fus_URL_Live_Before_GetLiveInfo;
/// 获取人气值贡献用户列表
+ (NSString *)fus_URL_Live_Popularity_Contribute_List;
#pragma mark -- PK
// 房间PK信息
+ (NSString *)fus_URL_LIVE_PK_ROOM_PK_INFO;
......
......@@ -572,6 +572,11 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/live/before/getLiveInfo"];
}
/// 获取人气值贡献用户列表
+ (NSString *)fus_URL_Live_Popularity_Contribute_List {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/live/popularity/devote/getList"];
}
#pragma mark -- PK
// 房间PK信息
+ (NSString *)fus_URL_LIVE_PK_ROOM_PK_INFO {
......
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