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
3c4f4385
authored
Jan 15, 2025
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息推送相关的配送
parent
b83b878b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
16 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.h
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.m
FuSiLive/AppDelegate.m
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMUserService.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.h
View file @
3c4f4385
...
@@ -184,6 +184,9 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -184,6 +184,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取背包最后更新的时间
/// 获取背包最后更新的时间
+
(
NSString
*
)
fus_URL_requestBackpackTimeUpdateGet
;
+
(
NSString
*
)
fus_URL_requestBackpackTimeUpdateGet
;
// 用户点击个推消息-记录
+
(
NSString
*
)
fus_URL_UploadPushClickLog
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/Http/FUSCommonURLs.m
View file @
3c4f4385
...
@@ -288,4 +288,9 @@
...
@@ -288,4 +288,9 @@
}
}
// 用户点击个推消息-记录
+
(
NSString
*
)
fus_URL_UploadPushClickLog
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/stat/clickPushMsg/log"
];
}
@end
@end
FuSiLive/AppDelegate.m
View file @
3c4f4385
This diff is collapsed.
Click to expand it.
Modules/FUSChatCenterModule/FUSChatCenterModule/Features/InstantMessaging/Other/FUSIMUserService.m
View file @
3c4f4385
...
@@ -176,32 +176,21 @@
...
@@ -176,32 +176,21 @@
// 重置重试次数
// 重置重试次数
_retryCount
=
0
;
self
.
retryCount
=
0
;
dispatch_async
(
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_DEFAULT
,
0
),
^
{
NSData
*
token
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_DEVICE_TOKEN_DATA
];
[[
EMClient
sharedClient
]
bindDeviceToken
:
token
];
[[
EMClient
sharedClient
]
registerForRemoteNotificationsWithDeviceToken
:
token
completion
:
^
(
EMError
*
aError
)
{
FUSLogInfo
(
@""
);
}];
// 设置离线推送
[
self
fus_bindAPNsToken
];
[[
EMClient
sharedClient
].
pushManager
updatePushDisplayName
:[
FUSCacheDataShare
shareStore
].
userDetailInfo
.
nickname
];
[[
EMClient
sharedClient
].
pushManager
updatePushDisplayStyle
:
EMPushDisplayStyleMessageSummary
];
});
}
failure
:^
(
NSString
*
errorMsg
)
{
}
failure
:^
(
NSString
*
errorMsg
)
{
// 重试次数加1
// 重试次数加1
_
retryCount
++
;
self
.
retryCount
++
;
if
(
_
retryCount
<=
3
)
{
// 重试3次
if
(
self
.
retryCount
<=
3
)
{
// 重试3次
[
self
fus_autoLoginWithAccount
:
account
];
[
self
fus_autoLoginWithAccount
:
account
];
}
else
{
}
else
{
// 重置重试次数
// 重置重试次数
_
retryCount
=
0
;
self
.
retryCount
=
0
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
// 更新到最新的离线会话
// 更新到最新的离线会话
...
@@ -211,6 +200,21 @@
...
@@ -211,6 +200,21 @@
}];
}];
}
}
-
(
void
)
fus_bindAPNsToken
{
dispatch_async
(
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_DEFAULT
,
0
),
^
{
NSData
*
token
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
FUSChatUDKeys
.
fus_DEVICE_TOKEN_DATA
];
[[
EMClient
sharedClient
]
bindDeviceToken
:
token
];
[[
EMClient
sharedClient
]
registerForRemoteNotificationsWithDeviceToken
:
token
completion
:
^
(
EMError
*
aError
)
{
FUSLogInfo
(
@""
);
}];
// 设置离线推送
[[
EMClient
sharedClient
].
pushManager
updatePushDisplayName
:[
FUSCacheDataShare
shareStore
].
userDetailInfo
.
nickname
];
[[
EMClient
sharedClient
].
pushManager
updatePushDisplayStyle
:
EMPushDisplayStyleMessageSummary
];
});
}
-
(
void
)
fus_logOffWithSuccess
:
(
void
(
^
)(
void
))
success
failure
:
(
void
(
^
)(
void
))
failure
-
(
void
)
fus_logOffWithSuccess
:
(
void
(
^
)(
void
))
success
failure
:
(
void
(
^
)(
void
))
failure
{
{
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
...
...
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