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
95d8a6b4
authored
Mar 12, 2026
by
suolong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加socket 通知刷新付费屋的弹窗信息
parent
91513c4b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Socket/SocketMessage/FUSSocketMessageDelegate.h
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PayRoom/FusAnchorPayRoomView.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Socket/SocketMessage/FUSSocketMessageDelegate.h
View file @
95d8a6b4
...
...
@@ -93,6 +93,11 @@
/// 用户截图开关变化通知
#define ROOM_CID_RECEIVE_SCREENSHOT_STATE 11035
/// 切换付费房
#define ROOM_CID_PAYROOM_SWITCH 11036
/// 付费房实时变化的业务数据推送
#define ROOM_CID_PAYROOM_REALTIME_DATA 11037
// 更新直播间互动游戏开关状态socket
#define ROOM_CID_liveInteractionGameStateDidChanged 20204
...
...
@@ -129,4 +134,3 @@
Modules/FUSShowRoomModule/FUSShowRoomModule/Features/NewLive/Main/View/FunctionView/PayRoom/FusAnchorPayRoomView.m
View file @
95d8a6b4
...
...
@@ -108,9 +108,8 @@
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fus_recieveGiftChangeNotification:) name:STR(ROOM_CID_GIFT_CHANGE) object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fus_recieveSomeoneEnterRoomNotification:) name:STR(ROOM_CID_SOMEBODY_JOIN) object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fus_recieveSomeoneExitRoomNotification:) name:STR(ROOM_CID_EXIT) object:nil];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
fus_receivePayRoomRealtimeDataNotification
:
)
name
:
STR
(
ROOM_CID_PAYROOM_REALTIME_DATA
)
object
:
nil
];
self
.
backgroundColor
=
UIColor
.
clearColor
;
self
.
clipsToBounds
=
NO
;
...
...
@@ -398,6 +397,46 @@
self
.
incomeLabel
.
attributedText
=
[
self
fus_incomeLineWithValue
:
incomeValue
];
}
-
(
void
)
fus_receivePayRoomRealtimeDataNotification
:
(
NSNotification
*
)
notification
{
FUSSocketMessageModel
*
messageModel
=
notification
.
object
;
if
(
!
messageModel
)
{
return
;
}
if
(
!
[[[[
FUSLiveHelper
shareInstance
]
roomInfoModel
]
roomId
]
isEqualToString
:[
NSString
stringWithFormat
:
@"%d"
,
messageModel
.
extend1
]])
{
return
;
}
NSDictionary
*
dict
=
[
messageModel
fus_getJsonDict
];
NSInteger
dataType
=
[
dict
[
@"dataType"
]
integerValue
];
if
(
dataType
<=
0
)
{
return
;
}
if
(
!
self
.
payRoomDataModel
)
{
self
.
payRoomDataModel
=
[[
FUSPayRoomGetPayRoomDataModel
alloc
]
init
];
}
if
(
dataType
==
1
)
{
NSDictionary
*
data
=
dict
[
@"payViewingData"
];
if
([
data
isKindOfClass
:
NSDictionary
.
class
])
{
self
.
payRoomDataModel
.
payViewingData
=
[
FUSPayRoomPayViewingData
fus_modelWithDict
:
data
];
}
}
else
if
(
dataType
==
2
)
{
NSDictionary
*
data
=
dict
[
@"previewData"
];
if
([
data
isKindOfClass
:
NSDictionary
.
class
])
{
self
.
payRoomDataModel
.
previewData
=
[
FUSPayRoomPreviewData
fus_modelWithDict
:
data
];
}
}
else
if
(
dataType
==
3
)
{
NSDictionary
*
data
=
dict
[
@"incomeData"
];
if
([
data
isKindOfClass
:
NSDictionary
.
class
])
{
self
.
payRoomDataModel
.
incomeData
=
[
FUSPayRoomIncomeData
fus_modelWithDict
:
data
];
}
}
[
self
fus_refreshContentTexts
];
}
//- (void)fus_recieveGiftChangeNotification:(NSNotification *)notification {
// FUSSocketMessageModel *messageModel = notification.object;
// if (![[[[FUSLiveHelper shareInstance] roomInfoModel] roomId] isEqualToString:[NSString stringWithFormat:@"%d", messageModel.extend1]]) {
...
...
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