Commit e2dba143 by suolong

互动礼物ui

parent 365c58d3
Showing with 506 additions and 6 deletions
......@@ -32,7 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL strangerState;
/// 虚拟漂流瓶状态(0:开启,1:关闭)
@property (nonatomic, assign) BOOL virtualState;
/// 设置礼物互动开关(0:关闭、1:开启)
@property (nonatomic, assign) BOOL giftinteractionstate;
@end
NS_ASSUME_NONNULL_END
......@@ -14,7 +14,8 @@
/// 互动直播游戏开关(0:关闭、1:开启)
@property (nonatomic, assign) BOOL liveGameState;
/// 礼物互动开关(0:关闭、1:开启)
@property (nonatomic, assign) BOOL giftinteractionstate;
/// 禁止截屏(0:关闭、1:开启)
@property (nonatomic, assign) BOOL screenshotState;
......
......@@ -1334,6 +1334,14 @@
BED6586A2C5B745E00668116 /* FUSZhaixinRecommendedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED655562C5B745D00668116 /* FUSZhaixinRecommendedViewController.m */; };
BED6586B2C5B745E00668116 /* FUSLiveMainViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BED655582C5B745D00668116 /* FUSLiveMainViewController.h */; };
BED6586C2C5B745E00668116 /* FUSLiveMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED655592C5B745D00668116 /* FUSLiveMainViewController.m */; };
BEEF8E4B2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEF8E492F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.h */; };
BEEF8E4C2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEF8E4A2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.m */; };
BEEF8E5A2F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEF8E562F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.h */; };
BEEF8E5B2F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEF8E572F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.m */; };
BEEF8E512F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEF8E4D2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.h */; };
BEEF8E522F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEF8E4E2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.m */; };
BEEF8E532F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEF8E4F2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.h */; };
BEEF8E542F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEF8E502F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.m */; };
BED6586D2C5B745E00668116 /* VELPictureInPictureController.h in Headers */ = {isa = PBXBuildFile; fileRef = BED6555A2C5B745D00668116 /* VELPictureInPictureController.h */; };
BED6586E2C5B745E00668116 /* VELPictureInPictureController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */; };
BED6586F2C5B745E00668116 /* FUSBarrageCardModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BED6555D2C5B745D00668116 /* FUSBarrageCardModel.h */; };
......@@ -3711,6 +3719,14 @@
BED655592C5B745D00668116 /* FUSLiveMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSLiveMainViewController.m; sourceTree = "<group>"; };
BED6555A2C5B745D00668116 /* VELPictureInPictureController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VELPictureInPictureController.h; sourceTree = "<group>"; };
BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VELPictureInPictureController.m; sourceTree = "<group>"; };
BEEF8E492F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveGiftInteractSettingViewController.h; sourceTree = "<group>"; };
BEEF8E4A2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveGiftInteractSettingViewController.m; sourceTree = "<group>"; };
BEEF8E562F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveGiftInteractAddPopView.h; sourceTree = "<group>"; };
BEEF8E572F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveGiftInteractAddPopView.m; sourceTree = "<group>"; };
BEEF8E4D2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveGiftInteractSettingEnableCell.h; sourceTree = "<group>"; };
BEEF8E4E2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveGiftInteractSettingEnableCell.m; sourceTree = "<group>"; };
BEEF8E4F2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSLiveGiftInteractSettingItemCell.h; sourceTree = "<group>"; };
BEEF8E502F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveGiftInteractSettingItemCell.m; sourceTree = "<group>"; };
BED6555D2C5B745D00668116 /* FUSBarrageCardModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSBarrageCardModel.h; sourceTree = "<group>"; };
BED6555E2C5B745D00668116 /* FUSBarrageCardModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSBarrageCardModel.m; sourceTree = "<group>"; };
BED655612C5B745D00668116 /* FUSGiftSendToModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSGiftSendToModel.h; sourceTree = "<group>"; };
......@@ -6554,10 +6570,26 @@
BED655592C5B745D00668116 /* FUSLiveMainViewController.m */,
BED6555A2C5B745D00668116 /* VELPictureInPictureController.h */,
BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */,
BEEF8E492F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.h */,
BEEF8E4A2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.m */,
BEEF8E562F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.h */,
BEEF8E572F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.m */,
BEEF8E552F6F0C7E00A1B2C3 /* cell */,
);
path = Controller;
sourceTree = "<group>";
};
BEEF8E552F6F0C7E00A1B2C3 /* cell */ = {
isa = PBXGroup;
children = (
BEEF8E4D2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.h */,
BEEF8E4E2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.m */,
BEEF8E4F2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.h */,
BEEF8E502F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.m */,
);
path = cell;
sourceTree = "<group>";
};
BED6557E2C5B745D00668116 /* Model */ = {
isa = PBXGroup;
children = (
......@@ -8764,6 +8796,10 @@
BED65A422C5B745F00668116 /* JYEqualCellSpaceFlowLayout.h in Headers */,
BED65A322C5B745F00668116 /* FUSLiveShareToChatView.h in Headers */,
BED6586B2C5B745E00668116 /* FUSLiveMainViewController.h in Headers */,
BEEF8E4B2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.h in Headers */,
BEEF8E5A2F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.h in Headers */,
BEEF8E512F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.h in Headers */,
BEEF8E532F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.h in Headers */,
BE189DC12C733B460008418B /* FSRActiveViewController.h in Headers */,
BED658F72C5B745E00668116 /* FUSLiveChatFastInputCell.h in Headers */,
BED65AAA2C5B745F00668116 /* FUSHomeView.h in Headers */,
......@@ -10918,6 +10954,10 @@
BED659A42C5B745F00668116 /* FUSLinkMicroTableViewCell.m in Sources */,
BED658CA2C5B745E00668116 /* FUSContributeListModel.m in Sources */,
BED6586C2C5B745E00668116 /* FUSLiveMainViewController.m in Sources */,
BEEF8E4C2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.m in Sources */,
BEEF8E5B2F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.m in Sources */,
BEEF8E522F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingEnableCell.m in Sources */,
BEEF8E542F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingItemCell.m in Sources */,
BED659A82C5B745F00668116 /* FUSLinkMicSettingView.m in Sources */,
BED65A3A2C5B745F00668116 /* FUSTreasureBoxInfoModel.m in Sources */,
BED6589E2C5B745E00668116 /* FUSBlurImageView.m in Sources */,
{
"images" : [
{
"filename" : "Live_bottom_addAct.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Live_bottom_addAct@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Live_bottom_addAct@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Live_bottom_delete.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Live_bottom_delete@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Live_bottom_delete@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Live_bottom_down.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Live_bottom_up.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "live_setting_live_giftInteract.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_setting_live_giftInteract@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_setting_live_giftInteract@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
#import <UIKit/UIKit.h>
@class FUSLiveGiftDataModel;
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractAddPopView : UIView
@property (nonatomic, copy) void (^saveHandler)(NSString *desc, FUSLiveGiftDataModel *gift, NSInteger count);
@property (nonatomic, copy, nullable) void (^dismissHandler)(void);
- (void)showInView:(UIView *)view;
- (void)dismiss;
@end
NS_ASSUME_NONNULL_END
#import "FUSBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractSettingViewController : FUSBaseViewController
@end
NS_ASSUME_NONNULL_END
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractSettingEnableCell : UITableViewCell
@property (nonatomic, copy, nullable) void(^switchChangedHandler)(BOOL isOn);
- (void)fus_setupWithEnabled:(BOOL)isEnabled;
@end
NS_ASSUME_NONNULL_END
#import "FUSLiveGiftInteractSettingEnableCell.h"
@interface FUSLiveGiftInteractSettingEnableCell ()
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subTitleLabel;
@property (nonatomic, strong) UISwitch *enableSwitch;
@end
@implementation FUSLiveGiftInteractSettingEnableCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
if (!self) {
return nil;
}
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundColor = UIColor.whiteColor;
self.contentView.backgroundColor = UIColor.whiteColor;
self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
self.titleLabel.font = [UIFont fus_themeFont:16];
self.titleLabel.textColor = [UIColor colorWithHex:@"#22222B"];
self.titleLabel.text = [NSString fus_localString:@"礼物互动"];
[self.contentView addSubview:self.titleLabel];
self.subTitleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
self.subTitleLabel.font = [UIFont fus_themeFont:12];
self.subTitleLabel.textColor = [UIColor fus_textColorLight];
self.subTitleLabel.numberOfLines = 2;
self.subTitleLabel.text = [NSString fus_localString:@"打开开关后,直播间内展示对应互动所需送出的礼物"];
[self.contentView addSubview:self.subTitleLabel];
self.enableSwitch = [[UISwitch alloc] initWithFrame:CGRectZero];
self.enableSwitch.onTintColor = [UIColor colorWithHex:@"#01D9E0"];
[self.enableSwitch addTarget:self action:@selector(onSwitchChanged:) forControlEvents:UIControlEventValueChanged];
[self.contentView addSubview:self.enableSwitch];
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
CGFloat padding = 16;
CGSize switchSize = self.enableSwitch.intrinsicContentSize;
self.enableSwitch.frame = CGRectMake(self.contentView.bounds.size.width - padding - switchSize.width,
(self.contentView.bounds.size.height - switchSize.height) / 2.0,
switchSize.width,
switchSize.height);
CGFloat maxTextW = self.enableSwitch.frame.origin.x - padding - 12;
self.titleLabel.frame = CGRectMake(padding, 12, maxTextW, 20);
self.subTitleLabel.frame = CGRectMake(padding, CGRectGetMaxY(self.titleLabel.frame) + 6, maxTextW, 32);
}
- (void)fus_setupWithEnabled:(BOOL)isEnabled {
[self.enableSwitch setOn:isEnabled animated:NO];
}
- (void)onSwitchChanged:(UISwitch *)sender {
if (self.switchChangedHandler) {
self.switchChangedHandler(sender.isOn);
}
}
@end
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractSettingItemCell : UITableViewCell
@property (nonatomic, copy, nullable) void(^switchChangedHandler)(NSInteger index, BOOL isOn);
@property (nonatomic, copy, nullable) void(^deleteHandler)(NSInteger index);
- (void)fus_setupWithTitle:(NSString *)title
subTitle:(NSString *)subTitle
isOn:(BOOL)isOn
index:(NSInteger)index;
@end
NS_ASSUME_NONNULL_END
#import "FUSLiveGiftInteractSettingItemCell.h"
@interface FUSLiveGiftInteractSettingItemCell ()
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subTitleLabel;
@property (nonatomic, strong) UISwitch *itemSwitch;
@property (nonatomic, strong) UIButton *deleteBtn;
@property (nonatomic, assign) NSInteger itemIndex;
@end
@implementation FUSLiveGiftInteractSettingItemCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
if (!self) {
return nil;
}
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundColor = UIColor.whiteColor;
self.contentView.backgroundColor = UIColor.whiteColor;
self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
self.titleLabel.font = [UIFont fus_themeFont:16];
self.titleLabel.textColor = [UIColor colorWithHex:@"#22222B"];
[self.contentView addSubview:self.titleLabel];
self.subTitleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
self.subTitleLabel.font = [UIFont fus_themeFont:12];
self.subTitleLabel.textColor = [UIColor colorWithHex:@"#999999"];
[self.contentView addSubview:self.subTitleLabel];
self.itemSwitch = [[UISwitch alloc] initWithFrame:CGRectZero];
self.itemSwitch.onTintColor = [UIColor colorWithHex:@"#01D9E0"];
[self.itemSwitch addTarget:self action:@selector(onSwitchChanged:) forControlEvents:UIControlEventValueChanged];
[self.contentView addSubview:self.itemSwitch];
self.deleteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[self.deleteBtn setImage:[FUSShowRoomCenterBunble imageNamed:@"Live_bottom_delete"] forState:UIControlStateNormal];
[self.deleteBtn addTarget:self action:@selector(onClickDelete) forControlEvents:UIControlEventTouchUpInside];
[self.contentView addSubview:self.deleteBtn];
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
CGFloat padding = 16;
CGFloat deleteSize = 24;
CGFloat deleteTapSize = 44;
CGFloat spacing = 12;
CGFloat contentW = self.contentView.bounds.size.width;
CGFloat contentH = self.contentView.bounds.size.height;
self.deleteBtn.frame = CGRectMake(contentW - padding - deleteTapSize,
(contentH - deleteTapSize) / 2.0,
deleteTapSize,
deleteTapSize);
self.deleteBtn.imageEdgeInsets = UIEdgeInsetsMake((deleteTapSize - deleteSize) / 2.0,
(deleteTapSize - deleteSize) / 2.0,
(deleteTapSize - deleteSize) / 2.0,
(deleteTapSize - deleteSize) / 2.0);
CGSize switchSize = self.itemSwitch.intrinsicContentSize;
CGFloat switchX = CGRectGetMinX(self.deleteBtn.frame) - spacing - switchSize.width;
self.itemSwitch.frame = CGRectMake(switchX,
(contentH - switchSize.height) / 2.0,
switchSize.width,
switchSize.height);
CGFloat maxTextW = switchX - padding - spacing;
self.titleLabel.frame = CGRectMake(padding, 10, maxTextW, 22);
self.subTitleLabel.frame = CGRectMake(padding, CGRectGetMaxY(self.titleLabel.frame) + 2, maxTextW, 18);
}
- (void)prepareForReuse {
[super prepareForReuse];
self.itemIndex = NSNotFound;
self.switchChangedHandler = nil;
self.deleteHandler = nil;
}
- (void)fus_setupWithTitle:(NSString *)title
subTitle:(NSString *)subTitle
isOn:(BOOL)isOn
index:(NSInteger)index {
self.itemIndex = index;
self.titleLabel.text = title;
self.subTitleLabel.text = subTitle;
[self.itemSwitch setOn:isOn animated:NO];
}
- (void)onSwitchChanged:(UISwitch *)sender {
if (self.switchChangedHandler && self.itemIndex != NSNotFound) {
self.switchChangedHandler(self.itemIndex, sender.isOn);
}
}
- (void)onClickDelete {
if (self.deleteHandler && self.itemIndex != NSNotFound) {
self.deleteHandler(self.itemIndex);
}
}
@end
......@@ -1140,6 +1140,18 @@ NS_ASSUME_NONNULL_BEGIN
succeed:(void (^)(NSDictionary *dataDict))succeed
failure:(void(^)(NSString *msg,NSInteger code))failure;
/// 礼物互动行为-主播获取任务列表
/// @param uid 用户ID
/// @param roomId 房间ID
/// @param channelId 频道ID
/// @param succeed 成功回调(返回服务端原始数据,调用方自行解析)
/// @param failure 失败回调(msg 错误描述,code 错误码)
+ (void)fus_requestGiftInteractTaskListWithUid:(NSString *)uid
RoomId:(NSString *)roomId
channelId:(NSString *)channelId
succeed:(void (^)(NSDictionary *dataDict))succeed
failure:(void (^)(NSString *msg, NSInteger code))failure;
@end
......
......@@ -122,6 +122,33 @@
}
/// 礼物互动行为-主播获取任务列表
+ (void)fus_requestGiftInteractTaskListWithUid:(NSString *)uid
RoomId:(NSString *)roomId
channelId:(NSString *)channelId
succeed:(void (^)(NSDictionary *dataDict))succeed
failure:(void (^)(NSString *msg, NSInteger code))failure {
if ([NSString isNullWithString:uid] ||
[NSString isNullWithString:roomId] ||
[NSString isNullWithString:channelId]) {
if (failure) {
failure(@"参数错误", ERROR_CODE);
}
return;
}
NSDictionary *params = @{@"uid": uid,
@"roomId": roomId,
@"channelId": channelId};
[FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_interactionGiftTaskList params:params success:^(NSDictionary *dataDict, int code) {
if (succeed) {
succeed(dataDict);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE, code);
}
}];
}
/**
获取包房ip/端口 连接socket
......
......@@ -16,7 +16,8 @@ typedef enum : NSInteger{
FUSFaceBeautyTurnOnLight,
FUSLiveCameraMirror,
FUSLiveSetTheme,
FUSLiveEditQuickChat
FUSLiveEditQuickChat,
FUSLiveGiftInteract
} FUSFaceBeautyType;
@interface FUSBottomOptionalItemView : UIView
......
......@@ -88,21 +88,24 @@
[NSString fus_localString:@"反转镜头"],
[NSString fus_localString:@"闪光关闭"],
[NSString fus_localString:@"镜像"],
[NSString fus_localString:@"直播主题"]]
[NSString fus_localString:@"直播主题"],
[NSString fus_localString:@"礼物互动"]]
withImages:@[@"live_icon_cameraSetting",
@"live_setting_quality",
@"live_setting_close_mic",
@"live_icon_changeCamera",
@"live_icon_turnOffLine",
@"live_setting_video_mirror",
@"live_setting_live_theme"]
@"live_setting_live_theme",
@"live_setting_live_giftInteract"]
withTypes:@[@(FUSFaceBeautySetting),
@(FUSLiveQuality),
@(FUSLiveCameraMic),
@(FUSFaceBeautychangeCamera),
@(FUSFaceBeautyTurnOnLight),
@(FUSLiveCameraMirror),
@(FUSLiveSetTheme)]
@(FUSLiveSetTheme),
@(FUSLiveGiftInteract)]
clickItem:click];
}else if(type == FUSShowFlashLineAndCamera){
......
......@@ -49,6 +49,9 @@ NS_ASSUME_NONNULL_BEGIN
/// - containerView: 建议承载弹窗的父视图
- (void)fus_bottomSubView:(FUSLiveBottomToolSubView *)bottomSubView didClickShowTimeOnView:(UIView *)containerView;
/// 点击“礼物互动设置”(由上层页面决定如何跳转)
- (void)fus_bottomSubViewDidClickGiftInteractSetting:(FUSLiveBottomToolSubView *)bottomSubView;
@end
@interface FUSLiveBottomToolSubView : UIView
......
......@@ -443,6 +443,12 @@
[weakSelf.delegate fus_bottomSubViewDidBeautySetting:weakSelf beautyType:FUSLiveChatToolBeautyTypeQuickChat];
}
break;
case FUSLiveGiftInteract:
[weakOptionalView fus_dismissOptionalView];
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(fus_bottomSubViewDidClickGiftInteractSetting:)]) {
[weakSelf.delegate fus_bottomSubViewDidClickGiftInteractSetting:weakSelf];
}
break;
}
}];
}
......
......@@ -117,6 +117,9 @@ typedef NS_ENUM(NSUInteger, FUSLiveChatToolBeautyType) { //美颜工具按钮
/// - containerView: 建议承载弹窗的父视图
- (void)fus_bottomToolView:(FUSLiveBottomToolView *)bottomToolView didClickShowTimeOnView:(UIView *)containerView;
/// 点击“礼物互动设置”(由上层页面决定如何跳转)
- (void)fus_bottomToolViewDidClickGiftInteractSetting:(FUSLiveBottomToolView *)bottomToolView;
@end
@interface FUSLiveBottomToolView : UIView
......
......@@ -1358,6 +1358,12 @@
}
}
- (void)fus_bottomSubViewDidClickGiftInteractSetting:(FUSLiveBottomToolSubView *)bottomSubView {
if (self.delegate && [self.delegate respondsToSelector:@selector(fus_bottomToolViewDidClickGiftInteractSetting:)]) {
[self.delegate fus_bottomToolViewDidClickGiftInteractSetting:self];
}
}
- (BOOL)fus_changeFrameNotificationsHaveArrived{
if (self.gameEntranceLoaded == NO) {
return NO;
......
......@@ -10,6 +10,7 @@
// Controller
#import "FUSRechargeViewController.h"
#import "FUSLiveGiftInteractSettingViewController.h"
#import "FUSWKWebViewController.h"
// Helper
......@@ -344,6 +345,29 @@
}
/**
* 点击“礼物互动设置”
*/
- (void)fus_chatInputViewDidClickGiftInteractSetting:(FUSLiveChatInputView *)chatInputView
{
if (!self.pushViewControllerHandler) {
return;
}
UIViewController *currentVC = self.pushViewControllerHandler(nil);
if (!currentVC) {
return;
}
FUSLiveGiftInteractSettingViewController *vc = [[FUSLiveGiftInteractSettingViewController alloc] init];
if (currentVC.navigationController) {
[currentVC.navigationController pushViewController:vc animated:YES];
} else {
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
[currentVC presentViewController:nav animated:YES completion:nil];
}
}
/**
* 点击闪光灯按钮
*/
//- (BOOL)fus_chatInputViewDidClickFlashLight:(FUSLiveChatInputView *)chatInputView
......@@ -467,6 +491,10 @@
};
}
- (void)fus_bottomToolViewDidClickGiftInteractSetting:(FUSLiveBottomToolView *)bottomToolView {
[self fus_chatInputViewDidClickGiftInteractSetting:nil];
}
- (void)fus_bottomToolViewDidClickPKBtn:(FUSLiveBottomToolView *)bottomToolView livePkBtnState:(FUSLiveChatToolPKBtnState)livePkBtnState{
// switch (livePkBtnState) {
......
......@@ -80,6 +80,11 @@ typedef NS_ENUM(int, FUSLiveChatToolType) {
- (void)fus_chatInputViewDidClickGift:(FUSLiveChatInputView *)chatInputView;
/**
* 点击“礼物互动设置”
*/
- (void)fus_chatInputViewDidClickGiftInteractSetting:(FUSLiveChatInputView *)chatInputView;
/**
* 点击PK按钮
*/
- (void)fus_chatInputViewDidClickPKBtn:(FUSLiveChatInputView *)chatInputView livePkBtnState:(FUSLiveChatToolPKBtnState)livePkBtnState;
......
......@@ -896,6 +896,12 @@
[self.delegate fus_chatInputViewDidClickChangeCameraSide:self];
}
break;
case FUSLiveGiftInteract:
[OptionalView fus_dismissOptionalView];
if (self.delegate && [self.delegate respondsToSelector:@selector(fus_chatInputViewDidClickGiftInteractSetting:)]) {
[self.delegate fus_chatInputViewDidClickGiftInteractSetting:self];
}
break;
default:
break;
}
......
......@@ -484,6 +484,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 奖励中心批量领取 sidList: sid集合json,例如:[11122,3333,4444,555]
+ (NSString *)fus_URL_getTaskRewardMultiReceive;
/// 礼物互动行为-主播获取任务列表
+ (NSString *)fus_URL_interactionGiftTaskList;
/// 获取模式列表
+ (NSString *)fus_URL_vsTypeGetList;
......
......@@ -788,6 +788,11 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/task/reward/receive/getBatch"];
}
/// 礼物互动行为-主播获取任务列表
+ (NSString *)fus_URL_interactionGiftTaskList{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/interaction/gift/taskdata/list"];
}
/// 获取模式列表
+ (NSString *)fus_URL_vsTypeGetList{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/vs/type/getList"];
......
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