Commit 0d5eb2b5 by suolong

修改api 修复bug

parent 70447a07
Showing with 171 additions and 101 deletions
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@class FUSLiveGiftDataModel; @class FUSLiveGiftInteractOptionModel;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractAddPopView : UIView @interface FUSLiveGiftInteractAddPopView : UIView
@property (nonatomic, copy) void (^saveHandler)(NSString *desc, FUSLiveGiftDataModel *gift, NSInteger count); /// 可选择的礼物列表
@property (nonatomic, copy) NSArray<FUSLiveGiftInteractOptionModel *> *giftList;
/// 保存回调
@property (nonatomic, copy) void (^saveHandler)(NSString *desc, FUSLiveGiftInteractOptionModel *gift, NSInteger count);
/// 消失回调
@property (nonatomic, copy, nullable) void (^dismissHandler)(void); @property (nonatomic, copy, nullable) void (^dismissHandler)(void);
/// 请求礼物列表数据回调(外部获取后给 giftList 赋值并调用 fus_presentGiftPicker)
@property (nonatomic, copy, nullable) void (^requestGiftListHandler)(void);
- (void)show; - (void)show;
- (void)showInView:(UIView *)view; - (void)showInView:(UIView *)view;
- (void)dismiss; - (void)dismiss;
/// 外部获取数据并赋值 giftList 后,调用此方法展示下拉框
- (void)fus_presentGiftPicker;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
#import "FUSLiveGiftInteractAddPopView.h" #import "FUSLiveGiftInteractAddPopView.h"
#import "FUSGiftDataCenter.h"
#import "FUSDialogView.h" #import "FUSDialogView.h"
#import "FUSLiveGiftDataModel.h" #import "FUSLiveGiftInteractOptionModel.h"
#import "FUSLiveGiftInteractGiftDropdownView.h" #import "FUSLiveGiftInteractGiftDropdownView.h"
#import "FUSTextField.h" #import "FUSTextField.h"
#import "UIViewController+FUSExpand.h" #import "UIViewController+FUSExpand.h"
...@@ -35,8 +34,7 @@ ...@@ -35,8 +34,7 @@
@property (nonatomic, strong) UIButton *cancelBtn; @property (nonatomic, strong) UIButton *cancelBtn;
@property (nonatomic, strong) UIButton *saveBtn; @property (nonatomic, strong) UIButton *saveBtn;
@property (nonatomic, strong) FUSLiveGiftDataModel *selectedGift; @property (nonatomic, strong) FUSLiveGiftInteractOptionModel *selectedGift;
@property (nonatomic, copy) NSArray<FUSLiveGiftDataModel *> *giftList;
@end @end
...@@ -242,9 +240,9 @@ ...@@ -242,9 +240,9 @@
FUSLiveGiftInteractGiftDropdownView *dropdown = [[FUSLiveGiftInteractGiftDropdownView alloc] initWithFrame:CGRectZero]; FUSLiveGiftInteractGiftDropdownView *dropdown = [[FUSLiveGiftInteractGiftDropdownView alloc] initWithFrame:CGRectZero];
dropdown.hidden = YES; dropdown.hidden = YES;
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
dropdown.selectHandler = ^(FUSLiveGiftDataModel *gift) { dropdown.selectHandler = ^(FUSLiveGiftInteractOptionModel *gift) {
weakSelf.selectedGift = gift; weakSelf.selectedGift = gift;
NSString *name = gift.name.length ? gift.name : [NSString fus_localString:@"礼物"]; NSString *name = gift.giftName.length ? gift.giftName : [NSString fus_localString:@"礼物"];
weakSelf.giftLabel.textColor = [UIColor colorWithHex:@"#22222B"]; weakSelf.giftLabel.textColor = [UIColor colorWithHex:@"#22222B"];
weakSelf.giftLabel.text = name; weakSelf.giftLabel.text = name;
[weakSelf fus_hideGiftDropdown]; [weakSelf fus_hideGiftDropdown];
...@@ -351,31 +349,9 @@ ...@@ -351,31 +349,9 @@
return; return;
} }
[FUSDialogView fus_showDialog:[NSString fus_localString:@"正在加载礼物..."]]; if (self.requestGiftListHandler) {
__weak typeof(self) weakSelf = self; self.requestGiftListHandler();
[[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 { - (void)fus_presentGiftPicker {
...@@ -434,55 +410,12 @@ ...@@ -434,55 +410,12 @@
self.giftArrowView.image = [FUSShowRoomCenterBunble imageNamed:imgName]; self.giftArrowView.image = [FUSShowRoomCenterBunble imageNamed:imgName];
} }
- (void)fus_updateCountOptionsForGift:(FUSLiveGiftDataModel *)gift { - (void)fus_updateCountOptionsForGift:(FUSLiveGiftInteractOptionModel *)gift {
NSArray *batchs = gift.batchs; if (gift.giftNumList.count > 0) {
if (![batchs isKindOfClass:[NSArray class]] || batchs.count == 0) { self.countOptions = gift.giftNumList;
self.countOptions = @[@(1)]; } else {
[self fus_applyCountIndex:0]; self.countOptions = @[@1, @10, @66, @99, @188, @520, @1314, @3344, @5200];
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]; [self fus_applyCountIndex:0];
} }
......
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@class FUSLiveGiftDataModel; @class FUSLiveGiftInteractOptionModel;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractGiftDropdownView : UIView @interface FUSLiveGiftInteractGiftDropdownView : UIView
@property (nonatomic, copy) NSArray<FUSLiveGiftDataModel *> *giftList; @property (nonatomic, copy) NSArray<FUSLiveGiftInteractOptionModel *> *giftList;
@property (nonatomic, strong, nullable) FUSLiveGiftDataModel *selectedGift; @property (nonatomic, strong, nullable) FUSLiveGiftInteractOptionModel *selectedGift;
@property (nonatomic, copy, nullable) void (^selectHandler)(FUSLiveGiftDataModel *gift); @property (nonatomic, copy, nullable) void (^selectHandler)(FUSLiveGiftInteractOptionModel *gift);
- (CGFloat)fus_preferredHeightWithMaxHeight:(CGFloat)maxHeight; - (CGFloat)fus_preferredHeightWithMaxHeight:(CGFloat)maxHeight;
- (void)fus_reload; - (void)fus_reload;
......
#import "FUSLiveGiftInteractGiftDropdownView.h" #import "FUSLiveGiftInteractGiftDropdownView.h"
#import "FUSLiveGiftDataModel.h" #import "FUSLiveGiftInteractOptionModel.h"
#import "FUSLiveGiftInteractGiftDropdownCell.h" #import "FUSLiveGiftInteractGiftDropdownCell.h"
@interface FUSLiveGiftInteractGiftDropdownView () <UITableViewDataSource, UITableViewDelegate> @interface FUSLiveGiftInteractGiftDropdownView () <UITableViewDataSource, UITableViewDelegate>
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
FUSLiveGiftInteractGiftDropdownCell *cell = [tableView dequeueReusableCellWithIdentifier:@"FUSLiveGiftInteractGiftDropdownCell" forIndexPath:indexPath]; FUSLiveGiftInteractGiftDropdownCell *cell = [tableView dequeueReusableCellWithIdentifier:@"FUSLiveGiftInteractGiftDropdownCell" forIndexPath:indexPath];
if (indexPath.row < self.giftList.count) { if (indexPath.row < self.giftList.count) {
FUSLiveGiftDataModel *model = self.giftList[indexPath.row]; FUSLiveGiftInteractOptionModel *model = self.giftList[indexPath.row];
BOOL selected = (self.selectedGift && [self.selectedGift.gid isEqualToString:model.gid]); BOOL selected = (self.selectedGift && [self.selectedGift.giftId isEqualToString:model.giftId]);
[cell fus_setupWithModel:model selected:selected]; [cell fus_setupWithModel:model selected:selected];
} }
return cell; return cell;
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
if (indexPath.row >= self.giftList.count) { if (indexPath.row >= self.giftList.count) {
return; return;
} }
FUSLiveGiftDataModel *model = self.giftList[indexPath.row]; FUSLiveGiftInteractOptionModel *model = self.giftList[indexPath.row];
self.selectedGift = model; self.selectedGift = model;
[self.tableView reloadData]; [self.tableView reloadData];
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#import "FUSLiveGiftInteractSettingEnableCell.h" #import "FUSLiveGiftInteractSettingEnableCell.h"
#import "FUSLiveGiftInteractSettingItemCell.h" #import "FUSLiveGiftInteractSettingItemCell.h"
#import "FUSLiveGiftInteractSettingItemModel.h" #import "FUSLiveGiftInteractSettingItemModel.h"
#import "FUSLiveGiftDataModel.h" #import "FUSLiveGiftInteractOptionModel.h"
#import "FUSLiveHelper.h" #import "FUSLiveHelper.h"
#import "FUSLiveHttpHelper.h" #import "FUSLiveHttpHelper.h"
...@@ -122,13 +122,40 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 6; ...@@ -122,13 +122,40 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 6;
weakSelf.addPopView.dismissHandler = ^{ weakSelf.addPopView.dismissHandler = ^{
weakSelf.addPopView = nil; weakSelf.addPopView = nil;
}; };
weakSelf.addPopView.saveHandler = ^(NSString * _Nonnull desc, FUSLiveGiftDataModel * _Nonnull gift, NSInteger count) { weakSelf.addPopView.saveHandler = ^(NSString * _Nonnull desc, FUSLiveGiftInteractOptionModel * _Nonnull gift, NSInteger count) {
[weakSelf fus_addGiftInteractWithDesc:desc gift:gift count:count]; [weakSelf fus_addGiftInteractWithDesc:desc gift:gift count:count];
}; };
weakSelf.addPopView.requestGiftListHandler = ^{
[weakSelf fus_requestGiftListForPopView];
};
[weakSelf.addPopView show]; [weakSelf.addPopView show];
} }
- (void)fus_addGiftInteractWithDesc:(NSString *)desc gift:(FUSLiveGiftDataModel *)gift count:(NSInteger)count { - (void)fus_requestGiftListForPopView {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"正在加载礼物..."] autoDismiss:NO];
NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid ?: @"";
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
__weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_requestGiftInteractManageOptionListWithUid:uid roomId:roomId channelId:channelId succeed:^(NSArray<FUSLiveGiftInteractOptionModel *> * _Nonnull dataList) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_dismissDialog];
if (dataList.count == 0) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"暂无可用礼物"]];
return;
}
weakSelf.addPopView.giftList = dataList;
[weakSelf.addPopView fus_presentGiftPicker];
});
} failure:^(NSString * _Nonnull msg, NSInteger code) {
dispatch_async(dispatch_get_main_queue(), ^{
[FUSDialogView fus_dismissDialog];
[FUSDialogView fus_showDialog:(msg.length ? msg : [NSString fus_localString:@"礼物加载失败"])];
});
}];
}
- (void)fus_addGiftInteractWithDesc:(NSString *)desc gift:(FUSLiveGiftInteractOptionModel *)gift count:(NSInteger)count {
if (self.items.count >= FUSLiveGiftInteractMaxItemCount) { if (self.items.count >= FUSLiveGiftInteractMaxItemCount) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"互动内容数量已达上限"]]; [FUSDialogView fus_showDialog:[NSString fus_localString:@"互动内容数量已达上限"]];
return; return;
...@@ -136,7 +163,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 6; ...@@ -136,7 +163,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 6;
NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid ?: @""; NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid ?: @"";
NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @""; NSString *roomId = [FUSLiveHelper shareInstance].roomInfoModel.roomId ?: @"";
NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @""; NSString *channelId = [FUSLiveHelper shareInstance].roomInfoModel.channelId ?: @"";
NSString *giftId = gift.gid ?: @""; NSString *giftId = gift.giftId ?: @"";
[FUSLiveHttpHelper fus_requestGiftInteractManageAddWithUid:uid roomId:roomId channelId:channelId name:desc giftId:giftId giftNum:count succeed:^{ [FUSLiveHttpHelper fus_requestGiftInteractManageAddWithUid:uid roomId:roomId channelId:channelId name:desc giftId:giftId giftNum:count succeed:^{
[self fus_fetchManageList]; [self fus_fetchManageList];
} failure:^(NSString *msg, NSInteger code) { } failure:^(NSString *msg, NSInteger code) {
......
//
// FUSLiveGiftInteractOptionModel.h
// FUSShowRoomModule
//
#import "FUSBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractOptionModel : FUSBaseModel
/// 礼物ID
@property (nonatomic, copy) NSString *giftId;
/// 礼物图标
@property (nonatomic, copy) NSString *giftIcon;
/// 礼物名称
@property (nonatomic, copy) NSString *giftName;
/// 礼物数量集合
@property (nonatomic, copy) NSArray<NSNumber *> *giftNumList;
@end
NS_ASSUME_NONNULL_END
//
// FUSLiveGiftInteractOptionModel.m
// FUSShowRoomModule
//
#import "FUSLiveGiftInteractOptionModel.h"
@implementation FUSLiveGiftInteractOptionModel
@end
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@class FUSLiveGiftDataModel; @class FUSLiveGiftInteractOptionModel;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGiftInteractGiftDropdownCell : UITableViewCell @interface FUSLiveGiftInteractGiftDropdownCell : UITableViewCell
- (void)fus_setupWithModel:(FUSLiveGiftDataModel *)model selected:(BOOL)selected; - (void)fus_setupWithModel:(FUSLiveGiftInteractOptionModel *)model selected:(BOOL)selected;
@end @end
......
#import "FUSLiveGiftInteractGiftDropdownCell.h" #import "FUSLiveGiftInteractGiftDropdownCell.h"
#import "FUSLiveGiftDataModel.h" #import "FUSLiveGiftInteractOptionModel.h"
@interface FUSLiveGiftInteractGiftDropdownCell () @interface FUSLiveGiftInteractGiftDropdownCell ()
...@@ -69,12 +69,11 @@ ...@@ -69,12 +69,11 @@
[self.priceButton setTitle:nil forState:UIControlStateNormal]; [self.priceButton setTitle:nil forState:UIControlStateNormal];
} }
- (void)fus_setupWithModel:(FUSLiveGiftDataModel *)model selected:(BOOL)selected { - (void)fus_setupWithModel:(FUSLiveGiftInteractOptionModel *)model selected:(BOOL)selected {
NSString *name = model.name.length ? model.name : [NSString fus_localString:@"礼物"]; NSString *name = model.giftName.length ? model.giftName : [NSString fus_localString:@"礼物"];
self.nameLabel.text = name; self.nameLabel.text = name;
[self.giftImageView setWebImageWithSubURLString:model.resource]; [self.giftImageView setWebImageWithSubURLString:model.giftIcon];
NSString *price = model.price.length ? model.price : @""; self.priceButton.hidden = YES;
[self.priceButton setTitle:price forState:UIControlStateNormal];
self.selectedBackgroundView.hidden = !selected; self.selectedBackgroundView.hidden = !selected;
} }
......
...@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@class FUSTicketShowUserBuyResultModel; @class FUSTicketShowUserBuyResultModel;
@class FUSBarrageCardModel; @class FUSBarrageCardModel;
@class FUSLiveGiftInteractOptionModel;
@interface FUSLiveHttpHelper : NSObject @interface FUSLiveHttpHelper : NSObject
...@@ -1305,6 +1306,18 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -1305,6 +1306,18 @@ NS_ASSUME_NONNULL_BEGIN
succeed:(void (^)(NSArray *dataList))succeed succeed:(void (^)(NSArray *dataList))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 成功回调(返回 FUSLiveGiftInteractOptionModel 数组)
/// @param failure 失败回调
+ (void)fus_requestGiftInteractManageOptionListWithUid:(NSString *)uid
roomId:(NSString *)roomId
channelId:(NSString *)channelId
succeed:(void (^)(NSArray<FUSLiveGiftInteractOptionModel *> *dataList))succeed
failure:(void (^)(NSString *msg, NSInteger code))failure;
/// 礼物互动行为-管理获取配置列表 /// 礼物互动行为-管理获取配置列表
/// @param uid 用户ID /// @param uid 用户ID
/// @param roomId 房间ID /// @param roomId 房间ID
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#define FUS_LIVE_FONT(fontSize) [UIFont fus_themeMediumFont:fontSize] #define FUS_LIVE_FONT(fontSize) [UIFont fus_themeMediumFont:fontSize]
#import "FUSLiveGiftInteractOptionModel.h"
@implementation FUSLiveHttpHelper @implementation FUSLiveHttpHelper
/** /**
...@@ -400,6 +402,44 @@ ...@@ -400,6 +402,44 @@
}]; }];
} }
/// 礼物互动行为-可选的礼物列表
+ (void)fus_requestGiftInteractManageOptionListWithUid:(NSString *)uid
roomId:(NSString *)roomId
channelId:(NSString *)channelId
succeed:(void (^)(NSArray<FUSLiveGiftInteractOptionModel *> *dataList))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_interactionGiftManageOptionList params:params success:^(NSDictionary *dataDict, int code) {
NSArray *list = [dataDict[@"dataList"] isKindOfClass:NSArray.class] ? dataDict[@"dataList"] : @[];
NSMutableArray *modelList = [NSMutableArray array];
for (NSDictionary *dict in list) {
if ([dict isKindOfClass:[NSDictionary class]]) {
FUSLiveGiftInteractOptionModel *model = [FUSLiveGiftInteractOptionModel fus_modelWithDict:dict];
if (model) {
[modelList addObject:model];
}
}
}
if (succeed) {
succeed(modelList);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE, code);
}
}];
}
/// 礼物互动行为-管理获取配置列表 /// 礼物互动行为-管理获取配置列表
+ (void)fus_requestGiftInteractManageListWithUid:(NSString *)uid + (void)fus_requestGiftInteractManageListWithUid:(NSString *)uid
RoomId:(NSString *)roomId RoomId:(NSString *)roomId
......
...@@ -513,6 +513,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -513,6 +513,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 礼物互动行为-管理更新状态 /// 礼物互动行为-管理更新状态
+ (NSString *)fus_URL_interactionGiftManageUpdStatus; + (NSString *)fus_URL_interactionGiftManageUpdStatus;
/// 礼物互动行为-可选的礼物列表
+ (NSString *)fus_URL_interactionGiftManageOptionList;
/// 获取模式列表 /// 获取模式列表
+ (NSString *)fus_URL_vsTypeGetList; + (NSString *)fus_URL_vsTypeGetList;
......
...@@ -832,6 +832,11 @@ ...@@ -832,6 +832,11 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/interaction/gift/manage/updstatus"]; return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/interaction/gift/manage/updstatus"];
} }
/// 礼物互动行为-可选的礼物列表
+ (NSString *)fus_URL_interactionGiftManageOptionList{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/interaction/gift/manage/optionlist"];
}
/// 获取模式列表 /// 获取模式列表
+ (NSString *)fus_URL_vsTypeGetList{ + (NSString *)fus_URL_vsTypeGetList{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/vs/type/getList"]; return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/vs/type/getList"];
......
...@@ -229,7 +229,12 @@ class FUSCompleteUserInfoVoiceSignView: FUSBaseView { ...@@ -229,7 +229,12 @@ class FUSCompleteUserInfoVoiceSignView: FUSBaseView {
} }
// 初始化时随机一个位置,避免每次进来都是同一个提示 // 初始化时随机一个位置,避免每次进来都是同一个提示
self.voiceDemoTipIndex = Int(arc4random())%(FUSCacheDataShare.shareStore().voiceSignArray.count) let voiceSignArrayCount = FUSCacheDataShare.shareStore().voiceSignArray?.count ?? 0
if voiceSignArrayCount > 0 {
self.voiceDemoTipIndex = Int(arc4random()) % voiceSignArrayCount
} else {
self.voiceDemoTipIndex = 0
}
self.fus_updateSignExampleContent() self.fus_updateSignExampleContent()
self.fus_resetRecordState() self.fus_resetRecordState()
} }
......
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