Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0d5eb2b5
authored
Mar 26, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改api 修复bug
parent
70447a07
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
172 additions
and
102 deletions
FuSiLive.xcworkspace/xcuserdata/server.xcuserdatad/UserInterfaceState.xcuserstate
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractAddPopView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractAddPopView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractGiftDropdownView.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractGiftDropdownView.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractSettingViewController.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/Model/FUSLiveGiftInteractOptionModel.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/Model/FUSLiveGiftInteractOptionModel.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/cell/FUSLiveGiftInteractGiftDropdownCell.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/cell/FUSLiveGiftInteractGiftDropdownCell.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/CompleteUserInfo/View/FUSCompleteUserInfoVoiceSignView.swift
FuSiLive.xcworkspace/xcuserdata/server.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0d5eb2b5
No preview for this file type
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/project.pbxproj
View file @
0d5eb2b5
This diff is collapsed.
Click to expand it.
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractAddPopView.h
View file @
0d5eb2b5
#import <UIKit/UIKit.h>
@class
FUSLiveGift
Data
Model
;
@class
FUSLiveGift
InteractOption
Model
;
NS_ASSUME_NONNULL_BEGIN
@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
);
/// 请求礼物列表数据回调(外部获取后给 giftList 赋值并调用 fus_presentGiftPicker)
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
requestGiftListHandler
)(
void
);
-
(
void
)
show
;
-
(
void
)
showInView
:(
UIView
*
)
view
;
-
(
void
)
dismiss
;
/// 外部获取数据并赋值 giftList 后,调用此方法展示下拉框
-
(
void
)
fus_presentGiftPicker
;
@end
NS_ASSUME_NONNULL_END
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractAddPopView.m
View file @
0d5eb2b5
#import "FUSLiveGiftInteractAddPopView.h"
#import "FUSGiftDataCenter.h"
#import "FUSDialogView.h"
#import "FUSLiveGift
Data
Model.h"
#import "FUSLiveGift
InteractOption
Model.h"
#import "FUSLiveGiftInteractGiftDropdownView.h"
#import "FUSTextField.h"
#import "UIViewController+FUSExpand.h"
...
...
@@ -35,8 +34,7 @@
@property
(
nonatomic
,
strong
)
UIButton
*
cancelBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
saveBtn
;
@property
(
nonatomic
,
strong
)
FUSLiveGiftDataModel
*
selectedGift
;
@property
(
nonatomic
,
copy
)
NSArray
<
FUSLiveGiftDataModel
*>
*
giftList
;
@property
(
nonatomic
,
strong
)
FUSLiveGiftInteractOptionModel
*
selectedGift
;
@end
...
...
@@ -242,9 +240,9 @@
FUSLiveGiftInteractGiftDropdownView
*
dropdown
=
[[
FUSLiveGiftInteractGiftDropdownView
alloc
]
initWithFrame
:
CGRectZero
];
dropdown
.
hidden
=
YES
;
__weak
typeof
(
self
)
weakSelf
=
self
;
dropdown
.
selectHandler
=
^
(
FUSLiveGift
Data
Model
*
gift
)
{
dropdown
.
selectHandler
=
^
(
FUSLiveGift
InteractOption
Model
*
gift
)
{
weakSelf
.
selectedGift
=
gift
;
NSString
*
name
=
gift
.
name
.
length
?
gift
.
n
ame
:
[
NSString
fus_localString
:
@"礼物"
];
NSString
*
name
=
gift
.
giftName
.
length
?
gift
.
giftN
ame
:
[
NSString
fus_localString
:
@"礼物"
];
weakSelf
.
giftLabel
.
textColor
=
[
UIColor
colorWithHex
:
@"#22222B"
];
weakSelf
.
giftLabel
.
text
=
name
;
[
weakSelf
fus_hideGiftDropdown
];
...
...
@@ -351,31 +349,9 @@
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
:
@"礼物加载失败"
])];
});
}];
if
(
self
.
requestGiftListHandler
)
{
self
.
requestGiftListHandler
();
}
}
-
(
void
)
fus_presentGiftPicker
{
...
...
@@ -434,55 +410,12 @@
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
;
-
(
void
)
fus_updateCountOptionsForGift
:
(
FUSLiveGiftInteractOptionModel
*
)
gift
{
if
(
gift
.
giftNumList
.
count
>
0
)
{
self
.
countOptions
=
gift
.
giftNumList
;
}
else
{
self
.
countOptions
=
@[
@1
,
@10
,
@66
,
@99
,
@188
,
@520
,
@1314
,
@3344
,
@5200
];
}
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
];
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractGiftDropdownView.h
View file @
0d5eb2b5
#import <UIKit/UIKit.h>
@class
FUSLiveGift
Data
Model
;
@class
FUSLiveGift
InteractOption
Model
;
NS_ASSUME_NONNULL_BEGIN
@interface
FUSLiveGiftInteractGiftDropdownView
:
UIView
@property
(
nonatomic
,
copy
)
NSArray
<
FUSLiveGift
Data
Model
*>
*
giftList
;
@property
(
nonatomic
,
strong
,
nullable
)
FUSLiveGift
Data
Model
*
selectedGift
;
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
selectHandler
)(
FUSLiveGift
Data
Model
*
gift
);
@property
(
nonatomic
,
copy
)
NSArray
<
FUSLiveGift
InteractOption
Model
*>
*
giftList
;
@property
(
nonatomic
,
strong
,
nullable
)
FUSLiveGift
InteractOption
Model
*
selectedGift
;
@property
(
nonatomic
,
copy
,
nullable
)
void
(
^
selectHandler
)(
FUSLiveGift
InteractOption
Model
*
gift
);
-
(
CGFloat
)
fus_preferredHeightWithMaxHeight
:(
CGFloat
)
maxHeight
;
-
(
void
)
fus_reload
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractGiftDropdownView.m
View file @
0d5eb2b5
#import "FUSLiveGiftInteractGiftDropdownView.h"
#import "FUSLiveGift
Data
Model.h"
#import "FUSLiveGift
InteractOption
Model.h"
#import "FUSLiveGiftInteractGiftDropdownCell.h"
@interface
FUSLiveGiftInteractGiftDropdownView
()
<
UITableViewDataSource
,
UITableViewDelegate
>
...
...
@@ -62,8 +62,8 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
FUSLiveGiftInteractGiftDropdownCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"FUSLiveGiftInteractGiftDropdownCell"
forIndexPath
:
indexPath
];
if
(
indexPath
.
row
<
self
.
giftList
.
count
)
{
FUSLiveGift
Data
Model
*
model
=
self
.
giftList
[
indexPath
.
row
];
BOOL
selected
=
(
self
.
selectedGift
&&
[
self
.
selectedGift
.
gi
d
isEqualToString
:
model
.
gi
d
]);
FUSLiveGift
InteractOption
Model
*
model
=
self
.
giftList
[
indexPath
.
row
];
BOOL
selected
=
(
self
.
selectedGift
&&
[
self
.
selectedGift
.
gi
ftId
isEqualToString
:
model
.
giftI
d
]);
[
cell
fus_setupWithModel
:
model
selected
:
selected
];
}
return
cell
;
...
...
@@ -73,7 +73,7 @@
if
(
indexPath
.
row
>=
self
.
giftList
.
count
)
{
return
;
}
FUSLiveGift
Data
Model
*
model
=
self
.
giftList
[
indexPath
.
row
];
FUSLiveGift
InteractOption
Model
*
model
=
self
.
giftList
[
indexPath
.
row
];
self
.
selectedGift
=
model
;
[
self
.
tableView
reloadData
];
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/FUSLiveGiftInteractSettingViewController.m
View file @
0d5eb2b5
...
...
@@ -6,7 +6,7 @@
#import "FUSLiveGiftInteractSettingEnableCell.h"
#import "FUSLiveGiftInteractSettingItemCell.h"
#import "FUSLiveGiftInteractSettingItemModel.h"
#import "FUSLiveGift
Data
Model.h"
#import "FUSLiveGift
InteractOption
Model.h"
#import "FUSLiveHelper.h"
#import "FUSLiveHttpHelper.h"
...
...
@@ -122,13 +122,40 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 6;
weakSelf
.
addPopView
.
dismissHandler
=
^
{
weakSelf
.
addPopView
=
nil
;
};
weakSelf
.
addPopView
.
saveHandler
=
^
(
NSString
*
_Nonnull
desc
,
FUSLiveGift
Data
Model
*
_Nonnull
gift
,
NSInteger
count
)
{
weakSelf
.
addPopView
.
saveHandler
=
^
(
NSString
*
_Nonnull
desc
,
FUSLiveGift
InteractOption
Model
*
_Nonnull
gift
,
NSInteger
count
)
{
[
weakSelf
fus_addGiftInteractWithDesc
:
desc
gift
:
gift
count
:
count
];
};
weakSelf
.
addPopView
.
requestGiftListHandler
=
^
{
[
weakSelf
fus_requestGiftListForPopView
];
};
[
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
)
{
[
FUSDialogView
fus_showDialog
:[
NSString
fus_localString
:
@"互动内容数量已达上限"
]];
return
;
...
...
@@ -136,7 +163,7 @@ static NSInteger const FUSLiveGiftInteractMaxItemCount = 6;
NSString
*
uid
=
FUSCacheDataShare
.
shareStore
.
userDetailInfo
.
uid
?:
@""
;
NSString
*
roomId
=
[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
roomId
?:
@""
;
NSString
*
channelId
=
[
FUSLiveHelper
shareInstance
].
roomInfoModel
.
channelId
?:
@""
;
NSString
*
giftId
=
gift
.
gid
?:
@""
;
NSString
*
giftId
=
gift
.
gi
ftI
d
?:
@""
;
[
FUSLiveHttpHelper
fus_requestGiftInteractManageAddWithUid
:
uid
roomId
:
roomId
channelId
:
channelId
name
:
desc
giftId
:
giftId
giftNum
:
count
succeed
:^
{
[
self
fus_fetchManageList
];
}
failure
:^
(
NSString
*
msg
,
NSInteger
code
)
{
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/Model/FUSLiveGiftInteractOptionModel.h
0 → 100644
View file @
0d5eb2b5
//
// 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
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/Model/FUSLiveGiftInteractOptionModel.m
0 → 100644
View file @
0d5eb2b5
//
// FUSLiveGiftInteractOptionModel.m
// FUSShowRoomModule
//
#import "FUSLiveGiftInteractOptionModel.h"
@implementation
FUSLiveGiftInteractOptionModel
@end
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/cell/FUSLiveGiftInteractGiftDropdownCell.h
View file @
0d5eb2b5
#import <UIKit/UIKit.h>
@class
FUSLiveGift
Data
Model
;
@class
FUSLiveGift
InteractOption
Model
;
NS_ASSUME_NONNULL_BEGIN
@interface
FUSLiveGiftInteractGiftDropdownCell
:
UITableViewCell
-
(
void
)
fus_setupWithModel
:(
FUSLiveGift
Data
Model
*
)
model
selected
:(
BOOL
)
selected
;
-
(
void
)
fus_setupWithModel
:(
FUSLiveGift
InteractOption
Model
*
)
model
selected
:(
BOOL
)
selected
;
@end
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Controller/cell/FUSLiveGiftInteractGiftDropdownCell.m
View file @
0d5eb2b5
#import "FUSLiveGiftInteractGiftDropdownCell.h"
#import "FUSLiveGift
Data
Model.h"
#import "FUSLiveGift
InteractOption
Model.h"
@interface
FUSLiveGiftInteractGiftDropdownCell
()
...
...
@@ -69,12 +69,11 @@
[
self
.
priceButton
setTitle
:
nil
forState
:
UIControlStateNormal
];
}
-
(
void
)
fus_setupWithModel
:
(
FUSLiveGift
Data
Model
*
)
model
selected
:
(
BOOL
)
selected
{
NSString
*
name
=
model
.
name
.
length
?
model
.
n
ame
:
[
NSString
fus_localString
:
@"礼物"
];
-
(
void
)
fus_setupWithModel
:
(
FUSLiveGift
InteractOption
Model
*
)
model
selected
:
(
BOOL
)
selected
{
NSString
*
name
=
model
.
giftName
.
length
?
model
.
giftN
ame
:
[
NSString
fus_localString
:
@"礼物"
];
self
.
nameLabel
.
text
=
name
;
[
self
.
giftImageView
setWebImageWithSubURLString
:
model
.
resource
];
NSString
*
price
=
model
.
price
.
length
?
model
.
price
:
@""
;
[
self
.
priceButton
setTitle
:
price
forState
:
UIControlStateNormal
];
[
self
.
giftImageView
setWebImageWithSubURLString
:
model
.
giftIcon
];
self
.
priceButton
.
hidden
=
YES
;
self
.
selectedBackgroundView
.
hidden
=
!
selected
;
}
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.h
View file @
0d5eb2b5
...
...
@@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@class
FUSTicketShowUserBuyResultModel
;
@class
FUSBarrageCardModel
;
@class
FUSLiveGiftInteractOptionModel
;
@interface
FUSLiveHttpHelper
:
NSObject
...
...
@@ -1305,6 +1306,18 @@ NS_ASSUME_NONNULL_BEGIN
succeed
:(
void
(
^
)(
NSArray
*
dataList
))
succeed
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 roomId 房间ID
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/Other/FUSLiveHttpHelper.m
View file @
0d5eb2b5
...
...
@@ -29,6 +29,8 @@
#define FUS_LIVE_FONT(fontSize) [UIFont fus_themeMediumFont:fontSize]
#import "FUSLiveGiftInteractOptionModel.h"
@implementation
FUSLiveHttpHelper
/**
...
...
@@ -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
RoomId
:(
NSString
*
)
roomId
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.h
View file @
0d5eb2b5
...
...
@@ -513,6 +513,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 礼物互动行为-管理更新状态
+
(
NSString
*
)
fus_URL_interactionGiftManageUpdStatus
;
/// 礼物互动行为-可选的礼物列表
+
(
NSString
*
)
fus_URL_interactionGiftManageOptionList
;
/// 获取模式列表
+
(
NSString
*
)
fus_URL_vsTypeGetList
;
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule/Others/FUSShowRoomURLs.m
View file @
0d5eb2b5
...
...
@@ -832,6 +832,11 @@
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
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/vs/type/getList"
];
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/CompleteUserInfo/View/FUSCompleteUserInfoVoiceSignView.swift
View file @
0d5eb2b5
...
...
@@ -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_resetRecordState
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment