Commit e2dba143 by suolong

互动礼物ui

parent 365c58d3
Showing with 1223 additions and 6 deletions
...@@ -32,7 +32,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -32,7 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL strangerState; @property (nonatomic, assign) BOOL strangerState;
/// 虚拟漂流瓶状态(0:开启,1:关闭) /// 虚拟漂流瓶状态(0:开启,1:关闭)
@property (nonatomic, assign) BOOL virtualState; @property (nonatomic, assign) BOOL virtualState;
/// 设置礼物互动开关(0:关闭、1:开启)
@property (nonatomic, assign) BOOL giftinteractionstate;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
/// 互动直播游戏开关(0:关闭、1:开启) /// 互动直播游戏开关(0:关闭、1:开启)
@property (nonatomic, assign) BOOL liveGameState; @property (nonatomic, assign) BOOL liveGameState;
/// 礼物互动开关(0:关闭、1:开启)
@property (nonatomic, assign) BOOL giftinteractionstate;
/// 禁止截屏(0:关闭、1:开启) /// 禁止截屏(0:关闭、1:开启)
@property (nonatomic, assign) BOOL screenshotState; @property (nonatomic, assign) BOOL screenshotState;
......
...@@ -1334,6 +1334,14 @@ ...@@ -1334,6 +1334,14 @@
BED6586A2C5B745E00668116 /* FUSZhaixinRecommendedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED655562C5B745D00668116 /* FUSZhaixinRecommendedViewController.m */; }; BED6586A2C5B745E00668116 /* FUSZhaixinRecommendedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED655562C5B745D00668116 /* FUSZhaixinRecommendedViewController.m */; };
BED6586B2C5B745E00668116 /* FUSLiveMainViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BED655582C5B745D00668116 /* FUSLiveMainViewController.h */; }; BED6586B2C5B745E00668116 /* FUSLiveMainViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BED655582C5B745D00668116 /* FUSLiveMainViewController.h */; };
BED6586C2C5B745E00668116 /* FUSLiveMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED655592C5B745D00668116 /* FUSLiveMainViewController.m */; }; 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 */; }; BED6586D2C5B745E00668116 /* VELPictureInPictureController.h in Headers */ = {isa = PBXBuildFile; fileRef = BED6555A2C5B745D00668116 /* VELPictureInPictureController.h */; };
BED6586E2C5B745E00668116 /* VELPictureInPictureController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */; }; BED6586E2C5B745E00668116 /* VELPictureInPictureController.m in Sources */ = {isa = PBXBuildFile; fileRef = BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */; };
BED6586F2C5B745E00668116 /* FUSBarrageCardModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BED6555D2C5B745D00668116 /* FUSBarrageCardModel.h */; }; BED6586F2C5B745E00668116 /* FUSBarrageCardModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BED6555D2C5B745D00668116 /* FUSBarrageCardModel.h */; };
...@@ -3711,6 +3719,14 @@ ...@@ -3711,6 +3719,14 @@
BED655592C5B745D00668116 /* FUSLiveMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSLiveMainViewController.m; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; BED655612C5B745D00668116 /* FUSGiftSendToModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUSGiftSendToModel.h; sourceTree = "<group>"; };
...@@ -6554,10 +6570,26 @@ ...@@ -6554,10 +6570,26 @@
BED655592C5B745D00668116 /* FUSLiveMainViewController.m */, BED655592C5B745D00668116 /* FUSLiveMainViewController.m */,
BED6555A2C5B745D00668116 /* VELPictureInPictureController.h */, BED6555A2C5B745D00668116 /* VELPictureInPictureController.h */,
BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */, BED6555B2C5B745D00668116 /* VELPictureInPictureController.m */,
BEEF8E492F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.h */,
BEEF8E4A2F6F0C7E00A1B2C3 /* FUSLiveGiftInteractSettingViewController.m */,
BEEF8E562F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.h */,
BEEF8E572F7B000100A1B2C3 /* FUSLiveGiftInteractAddPopView.m */,
BEEF8E552F6F0C7E00A1B2C3 /* cell */,
); );
path = Controller; path = Controller;
sourceTree = "<group>"; 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 */ = { BED6557E2C5B745D00668116 /* Model */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -8764,6 +8796,10 @@ ...@@ -8764,6 +8796,10 @@
BED65A422C5B745F00668116 /* JYEqualCellSpaceFlowLayout.h in Headers */, BED65A422C5B745F00668116 /* JYEqualCellSpaceFlowLayout.h in Headers */,
BED65A322C5B745F00668116 /* FUSLiveShareToChatView.h in Headers */, BED65A322C5B745F00668116 /* FUSLiveShareToChatView.h in Headers */,
BED6586B2C5B745E00668116 /* FUSLiveMainViewController.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 */, BE189DC12C733B460008418B /* FSRActiveViewController.h in Headers */,
BED658F72C5B745E00668116 /* FUSLiveChatFastInputCell.h in Headers */, BED658F72C5B745E00668116 /* FUSLiveChatFastInputCell.h in Headers */,
BED65AAA2C5B745F00668116 /* FUSHomeView.h in Headers */, BED65AAA2C5B745F00668116 /* FUSHomeView.h in Headers */,
...@@ -10918,6 +10954,10 @@ ...@@ -10918,6 +10954,10 @@
BED659A42C5B745F00668116 /* FUSLinkMicroTableViewCell.m in Sources */, BED659A42C5B745F00668116 /* FUSLinkMicroTableViewCell.m in Sources */,
BED658CA2C5B745E00668116 /* FUSContributeListModel.m in Sources */, BED658CA2C5B745E00668116 /* FUSContributeListModel.m in Sources */,
BED6586C2C5B745E00668116 /* FUSLiveMainViewController.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 */, BED659A82C5B745F00668116 /* FUSLinkMicSettingView.m in Sources */,
BED65A3A2C5B745F00668116 /* FUSTreasureBoxInfoModel.m in Sources */, BED65A3A2C5B745F00668116 /* FUSTreasureBoxInfoModel.m in Sources */,
BED6589E2C5B745E00668116 /* FUSBlurImageView.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 "FUSLiveGiftInteractAddPopView.h"
#import "FUSGiftDataCenter.h"
#import "FUSTextField.h"
#import "UIViewController+FUSExpand.h"
@interface FUSLiveGiftInteractAddPopView ()
@property (nonatomic, strong) UIControl *maskView;
@property (nonatomic, strong) UIView *contentView;
@property (nonatomic, assign) BOOL isDismissing;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *descTitleLabel;
@property (nonatomic, strong) FUSTextField *descField;
@property (nonatomic, strong) UILabel *giftTitleLabel;
@property (nonatomic, strong) UIControl *giftSelectView;
@property (nonatomic, strong) UILabel *giftLabel;
@property (nonatomic, strong) UIImageView *giftArrowView;
@property (nonatomic, strong) UILabel *countTitleLabel;
@property (nonatomic, strong) UILabel *countLabel;
@property (nonatomic, strong) UIButton *minusBtn;
@property (nonatomic, strong) UIButton *plusBtn;
@property (nonatomic, assign) NSInteger count;
@property (nonatomic, copy) NSArray<NSNumber *> *countOptions;
@property (nonatomic, assign) NSInteger countIndex;
@property (nonatomic, strong) UIButton *cancelBtn;
@property (nonatomic, strong) UIButton *saveBtn;
@property (nonatomic, strong) FUSLiveGiftDataModel *selectedGift;
@property (nonatomic, copy) NSArray<FUSLiveGiftDataModel *> *giftList;
@end
@implementation FUSLiveGiftInteractAddPopView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = UIColor.clearColor;
[self fus_buildUI];
}
return self;
}
- (void)showInView:(UIView *)view {
if (!view) {
return;
}
if (self.superview) {
return;
}
self.frame = view.bounds;
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[view addSubview:self];
self.maskView.alpha = 0;
self.contentView.transform = CGAffineTransformMakeScale(0.3, 0.3);
self.selectedGift = nil;
self.giftLabel.textColor = [UIColor colorWithHex:@"#999999"];
self.giftLabel.text = [NSString fus_localString:@"请选择礼物"];
self.descField.text = @"";
[self fus_setGiftArrowExpanded:NO];
self.countOptions = @[@(1)];
self.countIndex = 0;
[self fus_applyCountIndex:0];
[UIView animateWithDuration:0.3 animations:^{
self.maskView.alpha = 1;
self.contentView.transform = CGAffineTransformIdentity;
}];
}
- (void)dismiss {
if (self.isDismissing) {
return;
}
self.isDismissing = YES;
[self endEditing:YES];
[UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
self.maskView.alpha = 0;
self.contentView.transform = CGAffineTransformMakeScale(0.3, 0.3);
} completion:^(BOOL finished) {
[self removeFromSuperview];
if (self.dismissHandler) {
self.dismissHandler();
}
}];
}
- (void)layoutSubviews {
[super layoutSubviews];
self.maskView.frame = self.bounds;
CGFloat w = self.bounds.size.width;
CGFloat h = self.bounds.size.height;
CGFloat desiredW = 285;
CGFloat desiredH = 360;
CGFloat contentW = MIN(desiredW, w - 40);
CGFloat contentH = MIN(desiredH, h - 80);
self.contentView.bounds = CGRectMake(0, 0, contentW, contentH);
self.contentView.center = CGPointMake(w / 2.0, h / 2.0);
CGFloat padding = 16;
CGFloat labelH = 18;
CGFloat fieldH = 40;
CGFloat gap = 8;
CGFloat sectionGap = 12;
CGFloat fieldW = contentW - padding * 2;
self.titleLabel.frame = CGRectMake(0, 16, contentW, 22);
CGFloat y = CGRectGetMaxY(self.titleLabel.frame) + 12;
self.descTitleLabel.frame = CGRectMake(padding, y, fieldW, labelH);
y = CGRectGetMaxY(self.descTitleLabel.frame) + gap;
self.descField.frame = CGRectMake(padding, y, fieldW, fieldH);
y = CGRectGetMaxY(self.descField.frame) + sectionGap;
self.giftTitleLabel.frame = CGRectMake(padding, y, fieldW, labelH);
y = CGRectGetMaxY(self.giftTitleLabel.frame) + gap;
self.giftSelectView.frame = CGRectMake(padding, y, fieldW, fieldH);
self.giftLabel.frame = CGRectMake(12, 0, fieldW - 12 - 12 - 14, fieldH);
self.giftArrowView.frame = CGRectMake(fieldW - 12 - 14, (fieldH - 14) / 2.0, 14, 14);
y = CGRectGetMaxY(self.giftSelectView.frame) + sectionGap;
self.countTitleLabel.frame = CGRectMake(padding, y, fieldW, labelH);
y = CGRectGetMaxY(self.countTitleLabel.frame) + gap;
CGFloat btnSize = 32;
self.minusBtn.frame = CGRectMake(padding, y, btnSize, btnSize);
self.plusBtn.frame = CGRectMake(padding + fieldW - btnSize, y, btnSize, btnSize);
self.countLabel.frame = CGRectMake(CGRectGetMaxX(self.minusBtn.frame), y, fieldW - btnSize * 2, btnSize);
CGFloat bottomBtnH = 44;
CGFloat bottomY = contentH - 16 - bottomBtnH;
CGFloat btnW = (contentW - padding * 2 - 14) / 2.0;
self.cancelBtn.frame = CGRectMake(padding, bottomY, btnW, bottomBtnH);
self.saveBtn.frame = CGRectMake(CGRectGetMaxX(self.cancelBtn.frame) + 14, bottomY, btnW, bottomBtnH);
}
- (void)fus_buildUI {
UIControl *mask = [[UIControl alloc] initWithFrame:CGRectZero];
mask.backgroundColor = [UIColor colorWithWhite:0 alpha:0.35];
[mask addTarget:self action:@selector(fus_onMaskTouchDown) forControlEvents:UIControlEventTouchDown];
[mask addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:mask];
self.maskView = mask;
UIView *content = [[UIView alloc] initWithFrame:CGRectZero];
content.backgroundColor = UIColor.whiteColor;
content.layer.cornerRadius = 12;
content.clipsToBounds = YES;
[self addSubview:content];
self.contentView = content;
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
titleLabel.textAlignment = NSTextAlignmentCenter;
titleLabel.font = [UIFont fus_themeFont:18];
titleLabel.textColor = [UIColor colorWithHex:@"#22222B"];
titleLabel.text = [NSString fus_localString:@"添加互动"];
[content addSubview:titleLabel];
self.titleLabel = titleLabel;
UILabel *descTitle = [[UILabel alloc] initWithFrame:CGRectZero];
descTitle.font = [UIFont fus_themeFont:12];
descTitle.textColor = [UIColor colorWithHex:@"#666666"];
descTitle.text = [NSString fus_localString:@"互动描述"];
[content addSubview:descTitle];
self.descTitleLabel = descTitle;
FUSTextField *descField = [[FUSTextField alloc] initWithFrame:CGRectZero];
descField.backgroundColor = [UIColor colorWithHex:@"#F5F5F5"];
descField.layer.cornerRadius = 8;
descField.clipsToBounds = YES;
descField.font = [UIFont fus_themeFont:14];
descField.textColor = [UIColor colorWithHex:@"#22222B"];
descField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:[NSString fus_localString:@"例如:做鬼脸"] attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#999999"], NSFontAttributeName:[UIFont fus_themeFont:14]}];
descField.checkChineseLen = NO;
descField.textMaxLength = 6;
descField.contentEdgeInsets = UIEdgeInsetsMake(0, 12, 0, 12);
[content addSubview:descField];
self.descField = descField;
UILabel *giftTitle = [[UILabel alloc] initWithFrame:CGRectZero];
giftTitle.font = [UIFont fus_themeFont:12];
giftTitle.textColor = [UIColor colorWithHex:@"#666666"];
giftTitle.text = [NSString fus_localString:@"绑定礼物"];
[content addSubview:giftTitle];
self.giftTitleLabel = giftTitle;
UIControl *giftSelect = [[UIControl alloc] initWithFrame:CGRectZero];
giftSelect.backgroundColor = [UIColor colorWithHex:@"#F5F5F5"];
giftSelect.layer.cornerRadius = 8;
giftSelect.clipsToBounds = YES;
[giftSelect addTarget:self action:@selector(fus_onTapGiftSelect) forControlEvents:UIControlEventTouchUpInside];
[content addSubview:giftSelect];
self.giftSelectView = giftSelect;
UILabel *giftValue = [[UILabel alloc] initWithFrame:CGRectZero];
giftValue.font = [UIFont fus_themeFont:14];
giftValue.textColor = [UIColor colorWithHex:@"#999999"];
giftValue.text = [NSString fus_localString:@"请选择礼物"];
[giftSelect addSubview:giftValue];
self.giftLabel = giftValue;
UIImageView *arrow = [[UIImageView alloc] initWithFrame:CGRectZero];
arrow.contentMode = UIViewContentModeScaleAspectFit;
arrow.image = [FUSShowRoomCenterBunble imageNamed:@"Live_bottom_down"];
[giftSelect addSubview:arrow];
self.giftArrowView = arrow;
UILabel *countTitle = [[UILabel alloc] initWithFrame:CGRectZero];
countTitle.font = [UIFont fus_themeFont:12];
countTitle.textColor = [UIColor colorWithHex:@"#666666"];
countTitle.text = [NSString fus_localString:@"礼物数量"];
[content addSubview:countTitle];
self.countTitleLabel = countTitle;
UIButton *minusBtn = [UIButton buttonWithType:UIButtonTypeCustom];
minusBtn.layer.borderWidth = 1;
minusBtn.layer.borderColor = [UIColor colorWithHex:@"#DADDE1"].CGColor;
minusBtn.layer.cornerRadius = 8;
[minusBtn setTitle:@"-" forState:UIControlStateNormal];
[minusBtn setTitleColor:[UIColor colorWithHex:@"#22222B"] forState:UIControlStateNormal];
minusBtn.titleLabel.font = [UIFont fus_themeFont:18];
[minusBtn addTarget:self action:@selector(fus_onClickMinus) forControlEvents:UIControlEventTouchUpInside];
[content addSubview:minusBtn];
self.minusBtn = minusBtn;
UILabel *countValue = [[UILabel alloc] initWithFrame:CGRectZero];
countValue.textAlignment = NSTextAlignmentCenter;
countValue.font = [UIFont fus_themeFont:14];
countValue.textColor = [UIColor colorWithHex:@"#22222B"];
countValue.text = @"1";
[content addSubview:countValue];
self.countLabel = countValue;
UIButton *plusBtn = [UIButton buttonWithType:UIButtonTypeCustom];
plusBtn.layer.borderWidth = 1;
plusBtn.layer.borderColor = [UIColor colorWithHex:@"#DADDE1"].CGColor;
plusBtn.layer.cornerRadius = 8;
[plusBtn setTitle:@"+" forState:UIControlStateNormal];
[plusBtn setTitleColor:[UIColor colorWithHex:@"#22222B"] forState:UIControlStateNormal];
plusBtn.titleLabel.font = [UIFont fus_themeFont:18];
[plusBtn addTarget:self action:@selector(fus_onClickPlus) forControlEvents:UIControlEventTouchUpInside];
[content addSubview:plusBtn];
self.plusBtn = plusBtn;
UIButton *cancelBtn = [UIButton buttonWithType:UIButtonTypeCustom];
cancelBtn.backgroundColor = [UIColor colorWithHex:@"#D8D8D8"];
cancelBtn.layer.cornerRadius = 22;
cancelBtn.clipsToBounds = YES;
cancelBtn.titleLabel.font = [UIFont fus_themeFont:16];
[cancelBtn setTitleColor:[UIColor colorWithHex:@"#22222B"] forState:UIControlStateNormal];
[cancelBtn setTitle:[NSString fus_localString:@"取消"] forState:UIControlStateNormal];
[cancelBtn addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
[content addSubview:cancelBtn];
self.cancelBtn = cancelBtn;
UIButton *saveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
saveBtn.backgroundColor = [UIColor colorWithHex:@"#01D9E0"];
saveBtn.layer.cornerRadius = 22;
saveBtn.clipsToBounds = YES;
saveBtn.titleLabel.font = [UIFont fus_themeFont:16];
[saveBtn setTitleColor:[UIColor colorWithHex:@"#FFFFFF"] forState:UIControlStateNormal];
[saveBtn setTitle:[NSString fus_localString:@"保存"] forState:UIControlStateNormal];
[saveBtn addTarget:self action:@selector(fus_onClickSave) forControlEvents:UIControlEventTouchUpInside];
[content addSubview:saveBtn];
self.saveBtn = saveBtn;
self.countOptions = @[@(1)];
self.countIndex = 0;
[self fus_applyCountIndex:0];
}
- (void)fus_onMaskTouchDown {
[self endEditing:YES];
}
- (void)fus_onClickMinus {
if (self.countOptions.count <= 1) {
return;
}
NSInteger next = self.countIndex - 1;
if (next < 0) {
return;
}
[self fus_applyCountIndex:next];
}
- (void)fus_onClickPlus {
if (self.countOptions.count <= 1) {
return;
}
NSInteger next = self.countIndex + 1;
if (next >= self.countOptions.count) {
return;
}
[self fus_applyCountIndex:next];
}
- (void)fus_onTapGiftSelect {
if (self.giftList.count > 0) {
[self fus_presentGiftPicker];
return;
}
[FUSDialogView fus_showDialog:[NSString fus_localString:@"正在加载礼物..."]];
__weak typeof(self) weakSelf = self;
[[FUSGiftDataCenter sharedCenter] fus_fetchLiveGiftDataWithType:ReadMemoryBegin success:^(NSArray<FUSLiveGiftDataModel *> *liveGiftArr, NSArray<FUSLiveGiftCategoryDataModel *> *liveGiftCategoryArr) {
dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.giftList = liveGiftArr ?: @[];
if (weakSelf.giftList.count == 0) {
[[FUSGiftDataCenter sharedCenter] fus_fetchLiveGiftDataWithType:ReadServerBegin success:^(NSArray<FUSLiveGiftDataModel *> *liveGiftArr2, NSArray<FUSLiveGiftCategoryDataModel *> *liveGiftCategoryArr2) {
dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.giftList = liveGiftArr2 ?: @[];
[weakSelf fus_presentGiftPicker];
});
} failure:^(NSString *msg, int code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_showDialog:(msg.length ? msg : [NSString fus_localString:@"礼物加载失败"])];
});
}];
return;
}
[weakSelf fus_presentGiftPicker];
});
} failure:^(NSString *msg, int code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_showDialog:(msg.length ? msg : [NSString fus_localString:@"礼物加载失败"])];
});
}];
}
- (void)fus_presentGiftPicker {
if (self.giftList.count == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"暂无可选礼物"]];
return;
}
[self fus_setGiftArrowExpanded:YES];
UIAlertController *ac = [UIAlertController alertControllerWithTitle:[NSString fus_localString:@"请选择礼物"] message:nil preferredStyle:UIAlertControllerStyleActionSheet];
__weak typeof(self) weakSelf = self;
NSInteger maxCount = MIN(self.giftList.count, 30);
for (NSInteger i = 0; i < maxCount; i++) {
FUSLiveGiftDataModel *model = self.giftList[i];
NSString *name = model.name.length ? model.name : [NSString stringWithFormat:@"%@%ld", [NSString fus_localString:@"礼物"], (long)i];
[ac addAction:[UIAlertAction actionWithTitle:name style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
weakSelf.selectedGift = model;
weakSelf.giftLabel.textColor = [UIColor colorWithHex:@"#22222B"];
weakSelf.giftLabel.text = name;
[weakSelf fus_setGiftArrowExpanded:NO];
[weakSelf fus_updateCountOptionsForGift:model];
}]];
}
[ac addAction:[UIAlertAction actionWithTitle:[NSString fus_localString:@"取消"] style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[weakSelf fus_setGiftArrowExpanded:NO];
}]];
UIPopoverPresentationController *pop = ac.popoverPresentationController;
if (pop && self.giftSelectView) {
pop.sourceView = self.giftSelectView;
pop.sourceRect = self.giftSelectView.bounds;
}
UIViewController *topVC = [UIViewController fus_topViewController];
[topVC presentViewController:ac animated:YES completion:nil];
}
- (void)fus_onClickSave {
NSString *desc = [self.descField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (desc.length == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"请输入互动描述"]];
return;
}
if (!self.selectedGift || self.giftLabel.text.length == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"请选择礼物"]];
return;
}
if (self.count <= 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"请输入正确礼物数量"]];
return;
}
if (self.saveHandler) {
self.saveHandler(desc, self.selectedGift, self.count);
}
[self dismiss];
}
- (void)fus_setGiftArrowExpanded:(BOOL)expanded {
NSString *imgName = expanded ? @"Live_bottom_up" : @"Live_bottom_down";
self.giftArrowView.image = [FUSShowRoomCenterBunble imageNamed:imgName];
}
- (void)fus_updateCountOptionsForGift:(FUSLiveGiftDataModel *)gift {
NSArray *batchs = gift.batchs;
if (![batchs isKindOfClass:[NSArray class]] || batchs.count == 0) {
self.countOptions = @[@(1)];
[self fus_applyCountIndex:0];
return;
}
NSMutableArray<NSNumber *> *numbers = [NSMutableArray arrayWithCapacity:batchs.count];
for (id obj in batchs) {
NSInteger value = 0;
if ([obj respondsToSelector:@selector(integerValue)]) {
value = [obj integerValue];
}
if (value > 0 && value != INT_MAX) {
[numbers addObject:@(value)];
}
}
if (numbers.count == 0) {
self.countOptions = @[@(1)];
[self fus_applyCountIndex:0];
return;
}
NSArray<NSNumber *> *sorted = [numbers sortedArrayUsingComparator:^NSComparisonResult(NSNumber * _Nonnull obj1, NSNumber * _Nonnull obj2) {
if (obj1.integerValue < obj2.integerValue) {
return NSOrderedAscending;
} else if (obj1.integerValue > obj2.integerValue) {
return NSOrderedDescending;
}
return NSOrderedSame;
}];
NSMutableArray<NSNumber *> *unique = [NSMutableArray array];
NSNumber *last = nil;
for (NSNumber *n in sorted) {
if (!last || n.integerValue != last.integerValue) {
[unique addObject:n];
last = n;
}
}
if (unique.count == 0) {
self.countOptions = @[@(1)];
[self fus_applyCountIndex:0];
return;
}
self.countOptions = [unique copy];
[self fus_applyCountIndex:0];
}
- (void)fus_applyCountIndex:(NSInteger)index {
if (self.countOptions.count == 0) {
self.countOptions = @[@(1)];
}
if (index < 0) {
index = 0;
}
if (index >= self.countOptions.count) {
index = self.countOptions.count - 1;
}
self.countIndex = index;
self.count = self.countOptions[index].integerValue;
self.countLabel.text = [@(self.count) description];
BOOL canMulti = self.countOptions.count > 1;
BOOL canMinus = canMulti && self.countIndex > 0;
BOOL canPlus = canMulti && self.countIndex < (self.countOptions.count - 1);
[self fus_setStepperButton:self.minusBtn enabled:canMinus];
[self fus_setStepperButton:self.plusBtn enabled:canPlus];
}
- (void)fus_setStepperButton:(UIButton *)button enabled:(BOOL)enabled {
button.enabled = enabled;
UIColor *color = enabled ? [UIColor colorWithHex:@"#22222B"] : [UIColor colorWithHex:@"#CCCCCC"];
[button setTitleColor:color forState:UIControlStateNormal];
button.layer.borderColor = (enabled ? [UIColor colorWithHex:@"#DADDE1"] : [UIColor colorWithHex:@"#EFEFEF"]).CGColor;
}
@end
#import "FUSBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractSettingViewController : FUSBaseViewController
@end
NS_ASSUME_NONNULL_END
#import "FUSLiveGiftInteractSettingViewController.h"
#import "FUSCacheDataShare.h"
#import "FUSDialogView.h"
#import "FUSLiveGiftInteractAddPopView.h"
#import "FUSLiveGiftInteractSettingEnableCell.h"
#import "FUSLiveGiftInteractSettingItemCell.h"
#import "FUSLiveGiftDataModel.h"
static NSInteger const FUSLiveGiftInteractMaxItemCount = 6;
static NSString * const FUSLiveGiftInteractEnabledUDKey = @"FUSLiveGiftInteractEnabledUDKey";
static NSString * const FUSLiveGiftInteractItemsUDKey = @"FUSLiveGiftInteractItemsUDKey";
@interface FUSLiveGiftInteractSettingViewController () <UITableViewDataSource, UITableViewDelegate>
/// 设置页主列表:分组结构(开关 + 互动条目列表)
@property (nonatomic, strong) UITableView *tableView;
/// 互动条目数据源:以可变字典承载本地开关状态与展示文案,便于增删改后直接持久化
@property (nonatomic, strong) NSMutableArray<NSMutableDictionary *> *items;
/// 总开关:控制礼物互动功能是否在直播间展示
@property (nonatomic, assign) BOOL isEnabled;
@property (nonatomic, strong) FUSLiveGiftInteractAddPopView *addPopView;
@end
@implementation FUSLiveGiftInteractSettingViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = [NSString fus_localString:@"礼物互动设置"];
[self fus_enableNavigationBackWithPopFunction:popViewController withAnimated:YES];
self.view.backgroundColor = UIColor.whiteColor;
// 优先加载本地状态,保证页面展示与持久化一致
[self loadLocalData];
[self setupTableView];
}
/// 初始化表格视图(使用 grouped 样式贴近设置页表现)
- (void)setupTableView {
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.tableView.dataSource = self;
self.tableView.delegate = self;
self.tableView.backgroundColor = UIColor.whiteColor;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
[self.tableView registerClass:[FUSLiveGiftInteractSettingEnableCell class] forCellReuseIdentifier:@"FUSLiveGiftInteractSettingEnableCell"];
[self.tableView registerClass:[FUSLiveGiftInteractSettingItemCell class] forCellReuseIdentifier:@"FUSLiveGiftInteractSettingItemCell"];
if (@available(iOS 15.0, *)) {
self.tableView.sectionHeaderTopPadding = 0;
}
[self.view addSubview:self.tableView];
}
/// 获取用户维度的本地存储(未登录场景回落到 standardUserDefaults)
- (NSUserDefaults *)userDefaults {
NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid;
if (![NSString isNull:uid]) {
return [[NSUserDefaults alloc] initWithSuiteName:uid];
}
return [NSUserDefaults standardUserDefaults];
}
/// 读取本地配置(首次进入时写入一份默认数据,避免空态影响体验)
- (void)loadLocalData {
NSUserDefaults *ud = [self userDefaults];
self.isEnabled = [ud boolForKey:FUSLiveGiftInteractEnabledUDKey];
NSArray *savedItems = [ud arrayForKey:FUSLiveGiftInteractItemsUDKey];
if (![NSArray isNull:savedItems]) {
self.items = [NSMutableArray arrayWithCapacity:savedItems.count];
for (NSDictionary *dict in savedItems) {
if (![dict isKindOfClass:[NSDictionary class]]) {
continue;
}
[self.items addObject:[dict mutableCopy]];
}
} else {
self.items = [NSMutableArray array];
[self.items addObject:[@{@"title":[NSString fus_localString:@"唱歌"], @"costDesc":[NSString fus_localString:@"扣豆:棒棒糖 x 66"], @"enabled":@(YES)} mutableCopy]];
[self.items addObject:[@{@"title":[NSString fus_localString:@"跳舞"], @"costDesc":[NSString fus_localString:@"扣豆:棒棒糖 x 66"], @"enabled":@(YES)} mutableCopy]];
[self.items addObject:[@{@"title":[NSString fus_localString:@"秀腹肌"], @"costDesc":[NSString fus_localString:@"扣豆:棒棒糖 x 66"], @"enabled":@(YES)} mutableCopy]];
[self.items addObject:[@{@"title":[NSString fus_localString:@"换一套"], @"costDesc":[NSString fus_localString:@"扣豆:棒棒糖 x 66"], @"enabled":@(YES)} mutableCopy]];
[self.items addObject:[@{@"title":[NSString fus_localString:@"穿丝袜"], @"costDesc":[NSString fus_localString:@"扣豆:棒棒糖 x 66"], @"enabled":@(YES)} mutableCopy]];
[self.items addObject:[@{@"title":[NSString fus_localString:@"提要求"], @"costDesc":[NSString fus_localString:@"扣豆:棒棒糖 x 66"], @"enabled":@(YES)} mutableCopy]];
[self saveLocalData];
}
}
/// 保存本地配置(开关/列表变更后立即落盘)
- (void)saveLocalData {
NSUserDefaults *ud = [self userDefaults];
[ud setBool:self.isEnabled forKey:FUSLiveGiftInteractEnabledUDKey];
[ud setObject:[self.items copy] forKey:FUSLiveGiftInteractItemsUDKey];
[ud synchronize];
}
/// 新增一条互动内容(超过上限时给出提示)
- (void)onClickAdd {
if (self.items.count >= FUSLiveGiftInteractMaxItemCount) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"互动内容数量已达上限"]];
return;
}
__weak typeof(self) weakSelf = self;
if (weakSelf.addPopView.superview) {
return;
}
weakSelf.addPopView = [[FUSLiveGiftInteractAddPopView alloc] initWithFrame:CGRectZero];
weakSelf.addPopView.dismissHandler = ^{
weakSelf.addPopView = nil;
};
weakSelf.addPopView.saveHandler = ^(NSString * _Nonnull desc, FUSLiveGiftDataModel * _Nonnull gift, NSInteger count) {
if (weakSelf.items.count >= FUSLiveGiftInteractMaxItemCount) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"互动内容数量已达上限"]];
return;
}
NSString *giftName = gift.name.length ? gift.name : [NSString fus_localString:@"礼物"];
NSString *subTitle = [NSString stringWithFormat:@"%@:%@ x %ld", [NSString fus_localString:@"绑定礼物"], giftName, (long)count];
NSMutableDictionary *item = [@{@"title":desc,
@"costDesc":subTitle,
@"enabled":@(YES),
@"giftId":(gift.gid ?: @""),
@"giftName":(giftName ?: @""),
@"giftCount":@(count)} mutableCopy];
[weakSelf.items addObject:item];
[weakSelf saveLocalData];
[weakSelf.tableView reloadData];
};
[weakSelf.addPopView showInView:weakSelf.view];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 1;
}
return self.items.count;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
if (section == 1) {
return 44;
}
return CGFLOAT_MIN;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
if (section != 1) {
return nil;
}
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 44)];
header.backgroundColor = UIColor.whiteColor;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, header.bounds.size.width - 16 - 16 - 120, 44)];
label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
label.font = [UIFont fus_themeFont:14];
label.textColor = [UIColor colorWithHex:@"#999999"];
label.text = [NSString stringWithFormat:@"%@(%ld/%ld)", [NSString fus_localString:@"互动内容"], (long)self.items.count, (long)FUSLiveGiftInteractMaxItemCount];
[header addSubview:label];
UIButton *addBtn = [UIButton buttonWithType:UIButtonTypeCustom];
addBtn.frame = CGRectMake(header.bounds.size.width - 16 - 108, 8, 108, 28);
addBtn.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
addBtn.titleLabel.font = [UIFont fus_themeFont:12];
[addBtn setTitleColor:[UIColor colorWithHex:@"#22222B"] forState:UIControlStateNormal];
[addBtn setTitle:[NSString fus_localString:@"新增表演"] forState:UIControlStateNormal];
[addBtn setImage:[FUSShowRoomCenterBunble imageNamed:@"Live_bottom_addAct"] forState:UIControlStateNormal];
addBtn.backgroundColor = [UIColor colorWithHex:@"#EFEFEF"];
addBtn.layer.cornerRadius = 14;
addBtn.clipsToBounds = YES;
addBtn.contentEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 10);
addBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 6);
[addBtn addTarget:self action:@selector(onClickAdd) forControlEvents:UIControlEventTouchUpInside];
[header addSubview:addBtn];
return header;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 70;
}
return 60;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
FUSLiveGiftInteractSettingEnableCell *cell = [tableView dequeueReusableCellWithIdentifier:@"FUSLiveGiftInteractSettingEnableCell" forIndexPath:indexPath];
[cell fus_setupWithEnabled:self.isEnabled];
__weak typeof(self) weakSelf = self;
cell.switchChangedHandler = ^(BOOL isOn) {
weakSelf.isEnabled = isOn;
[weakSelf saveLocalData];
};
return cell;
}
NSMutableDictionary *item = self.items[indexPath.row];
FUSLiveGiftInteractSettingItemCell *cell = [tableView dequeueReusableCellWithIdentifier:@"FUSLiveGiftInteractSettingItemCell" forIndexPath:indexPath];
NSString *title = [item[@"title"] description];
NSString *subTitle = [item[@"costDesc"] description];
BOOL isOn = [item[@"enabled"] boolValue];
[cell fus_setupWithTitle:title subTitle:subTitle isOn:isOn index:indexPath.row];
__weak typeof(self) weakSelf = self;
cell.switchChangedHandler = ^(NSInteger index, BOOL isOn) {
if (index < 0 || index >= weakSelf.items.count) {
return;
}
weakSelf.items[index][@"enabled"] = @(isOn);
[weakSelf saveLocalData];
};
cell.deleteHandler = ^(NSInteger index) {
if (index < 0 || index >= weakSelf.items.count) {
return;
}
[weakSelf.items removeObjectAtIndex:index];
[weakSelf saveLocalData];
[weakSelf.tableView reloadData];
};
return cell;
}
@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 ...@@ -1140,6 +1140,18 @@ NS_ASSUME_NONNULL_BEGIN
succeed:(void (^)(NSDictionary *dataDict))succeed succeed:(void (^)(NSDictionary *dataDict))succeed
failure:(void(^)(NSString *msg,NSInteger code))failure; 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 @end
......
...@@ -122,6 +122,33 @@ ...@@ -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 获取包房ip/端口 连接socket
......
...@@ -16,7 +16,8 @@ typedef enum : NSInteger{ ...@@ -16,7 +16,8 @@ typedef enum : NSInteger{
FUSFaceBeautyTurnOnLight, FUSFaceBeautyTurnOnLight,
FUSLiveCameraMirror, FUSLiveCameraMirror,
FUSLiveSetTheme, FUSLiveSetTheme,
FUSLiveEditQuickChat FUSLiveEditQuickChat,
FUSLiveGiftInteract
} FUSFaceBeautyType; } FUSFaceBeautyType;
@interface FUSBottomOptionalItemView : UIView @interface FUSBottomOptionalItemView : UIView
......
...@@ -88,21 +88,24 @@ ...@@ -88,21 +88,24 @@
[NSString fus_localString:@"反转镜头"], [NSString fus_localString:@"反转镜头"],
[NSString fus_localString:@"闪光关闭"], [NSString fus_localString:@"闪光关闭"],
[NSString fus_localString:@"镜像"], [NSString fus_localString:@"镜像"],
[NSString fus_localString:@"直播主题"]] [NSString fus_localString:@"直播主题"],
[NSString fus_localString:@"礼物互动"]]
withImages:@[@"live_icon_cameraSetting", withImages:@[@"live_icon_cameraSetting",
@"live_setting_quality", @"live_setting_quality",
@"live_setting_close_mic", @"live_setting_close_mic",
@"live_icon_changeCamera", @"live_icon_changeCamera",
@"live_icon_turnOffLine", @"live_icon_turnOffLine",
@"live_setting_video_mirror", @"live_setting_video_mirror",
@"live_setting_live_theme"] @"live_setting_live_theme",
@"live_setting_live_giftInteract"]
withTypes:@[@(FUSFaceBeautySetting), withTypes:@[@(FUSFaceBeautySetting),
@(FUSLiveQuality), @(FUSLiveQuality),
@(FUSLiveCameraMic), @(FUSLiveCameraMic),
@(FUSFaceBeautychangeCamera), @(FUSFaceBeautychangeCamera),
@(FUSFaceBeautyTurnOnLight), @(FUSFaceBeautyTurnOnLight),
@(FUSLiveCameraMirror), @(FUSLiveCameraMirror),
@(FUSLiveSetTheme)] @(FUSLiveSetTheme),
@(FUSLiveGiftInteract)]
clickItem:click]; clickItem:click];
}else if(type == FUSShowFlashLineAndCamera){ }else if(type == FUSShowFlashLineAndCamera){
......
...@@ -49,6 +49,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -49,6 +49,9 @@ NS_ASSUME_NONNULL_BEGIN
/// - containerView: 建议承载弹窗的父视图 /// - containerView: 建议承载弹窗的父视图
- (void)fus_bottomSubView:(FUSLiveBottomToolSubView *)bottomSubView didClickShowTimeOnView:(UIView *)containerView; - (void)fus_bottomSubView:(FUSLiveBottomToolSubView *)bottomSubView didClickShowTimeOnView:(UIView *)containerView;
/// 点击“礼物互动设置”(由上层页面决定如何跳转)
- (void)fus_bottomSubViewDidClickGiftInteractSetting:(FUSLiveBottomToolSubView *)bottomSubView;
@end @end
@interface FUSLiveBottomToolSubView : UIView @interface FUSLiveBottomToolSubView : UIView
......
...@@ -443,6 +443,12 @@ ...@@ -443,6 +443,12 @@
[weakSelf.delegate fus_bottomSubViewDidBeautySetting:weakSelf beautyType:FUSLiveChatToolBeautyTypeQuickChat]; [weakSelf.delegate fus_bottomSubViewDidBeautySetting:weakSelf beautyType:FUSLiveChatToolBeautyTypeQuickChat];
} }
break; 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) { //美颜工具按钮 ...@@ -117,6 +117,9 @@ typedef NS_ENUM(NSUInteger, FUSLiveChatToolBeautyType) { //美颜工具按钮
/// - containerView: 建议承载弹窗的父视图 /// - containerView: 建议承载弹窗的父视图
- (void)fus_bottomToolView:(FUSLiveBottomToolView *)bottomToolView didClickShowTimeOnView:(UIView *)containerView; - (void)fus_bottomToolView:(FUSLiveBottomToolView *)bottomToolView didClickShowTimeOnView:(UIView *)containerView;
/// 点击“礼物互动设置”(由上层页面决定如何跳转)
- (void)fus_bottomToolViewDidClickGiftInteractSetting:(FUSLiveBottomToolView *)bottomToolView;
@end @end
@interface FUSLiveBottomToolView : UIView @interface FUSLiveBottomToolView : UIView
......
...@@ -1358,6 +1358,12 @@ ...@@ -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{ - (BOOL)fus_changeFrameNotificationsHaveArrived{
if (self.gameEntranceLoaded == NO) { if (self.gameEntranceLoaded == NO) {
return NO; return NO;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
// Controller // Controller
#import "FUSRechargeViewController.h" #import "FUSRechargeViewController.h"
#import "FUSLiveGiftInteractSettingViewController.h"
#import "FUSWKWebViewController.h" #import "FUSWKWebViewController.h"
// Helper // Helper
...@@ -344,6 +345,29 @@ ...@@ -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 //- (BOOL)fus_chatInputViewDidClickFlashLight:(FUSLiveChatInputView *)chatInputView
...@@ -467,6 +491,10 @@ ...@@ -467,6 +491,10 @@
}; };
} }
- (void)fus_bottomToolViewDidClickGiftInteractSetting:(FUSLiveBottomToolView *)bottomToolView {
[self fus_chatInputViewDidClickGiftInteractSetting:nil];
}
- (void)fus_bottomToolViewDidClickPKBtn:(FUSLiveBottomToolView *)bottomToolView livePkBtnState:(FUSLiveChatToolPKBtnState)livePkBtnState{ - (void)fus_bottomToolViewDidClickPKBtn:(FUSLiveBottomToolView *)bottomToolView livePkBtnState:(FUSLiveChatToolPKBtnState)livePkBtnState{
// switch (livePkBtnState) { // switch (livePkBtnState) {
......
...@@ -80,6 +80,11 @@ typedef NS_ENUM(int, FUSLiveChatToolType) { ...@@ -80,6 +80,11 @@ typedef NS_ENUM(int, FUSLiveChatToolType) {
- (void)fus_chatInputViewDidClickGift:(FUSLiveChatInputView *)chatInputView; - (void)fus_chatInputViewDidClickGift:(FUSLiveChatInputView *)chatInputView;
/** /**
* 点击“礼物互动设置”
*/
- (void)fus_chatInputViewDidClickGiftInteractSetting:(FUSLiveChatInputView *)chatInputView;
/**
* 点击PK按钮 * 点击PK按钮
*/ */
- (void)fus_chatInputViewDidClickPKBtn:(FUSLiveChatInputView *)chatInputView livePkBtnState:(FUSLiveChatToolPKBtnState)livePkBtnState; - (void)fus_chatInputViewDidClickPKBtn:(FUSLiveChatInputView *)chatInputView livePkBtnState:(FUSLiveChatToolPKBtnState)livePkBtnState;
......
...@@ -896,6 +896,12 @@ ...@@ -896,6 +896,12 @@
[self.delegate fus_chatInputViewDidClickChangeCameraSide:self]; [self.delegate fus_chatInputViewDidClickChangeCameraSide:self];
} }
break; break;
case FUSLiveGiftInteract:
[OptionalView fus_dismissOptionalView];
if (self.delegate && [self.delegate respondsToSelector:@selector(fus_chatInputViewDidClickGiftInteractSetting:)]) {
[self.delegate fus_chatInputViewDidClickGiftInteractSetting:self];
}
break;
default: default:
break; break;
} }
......
...@@ -484,6 +484,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -484,6 +484,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 奖励中心批量领取 sidList: sid集合json,例如:[11122,3333,4444,555] /// 奖励中心批量领取 sidList: sid集合json,例如:[11122,3333,4444,555]
+ (NSString *)fus_URL_getTaskRewardMultiReceive; + (NSString *)fus_URL_getTaskRewardMultiReceive;
/// 礼物互动行为-主播获取任务列表
+ (NSString *)fus_URL_interactionGiftTaskList;
/// 获取模式列表 /// 获取模式列表
+ (NSString *)fus_URL_vsTypeGetList; + (NSString *)fus_URL_vsTypeGetList;
......
...@@ -788,6 +788,11 @@ ...@@ -788,6 +788,11 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/task/reward/receive/getBatch"]; 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{ + (NSString *)fus_URL_vsTypeGetList{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/vs/type/getList"]; 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